I was 15 weeks, your regular Dr would probably do it later than that, but just look for an ultrasound clinic.. thats what i did, paid out of pocket insurance doesn't cover that.
Sex, not gender. And unless you are particularly high risk for some reason the genetic blood testing option likely wouldn't be covered by your insurance, just btw - and it can cost thousands of dollars out of pocket. Most people just wait for the anatomy ultrasound at 16-20 weeks gestation.
You can find out as early as 9 weeks with a blood.test called panorama it also allows you know for other things like down syndrome. And no risk
My doctor wouldn't do it earlier than 19 weeks, but my sister found out when she was only 15 weeks!