OpenAI Rest API IP CIDR for Connections

We are currently building some services that interact with the OpenAI Rest API and I would like to limit our service egress network to a limited IP CIDR range for the OpenAI rest API. This would allow me to give the service more strict egress rules as opposed to it accessing the entire internet space e.g. I could not find anywhere in the documentation a specification on the IP range for the OpenAI Rest API and was wondering if this could be provided or if there was some specification that exists.

1 Like

I don’t think I’ve seen anything documented. You may also want to look at Azure OpenAI’s APIs. They’re probably going to have better support responses and more support for advanced things like virtual networks.

1 Like

@novaphil Thanks for the response, I will see if I can get a better response over there. If they do give me an answer I will be sure to update this post with it so others can see.

I’m gonna guess the Azure OpenAI IPs are going to be different from the regular OpenAI API IPs.

But if restricting egress traffic is important enough for you, the more “enterprise” offering of Azure OpenAI APIs may be a better fit for you.

@novaphil Yeah we wrote a service which hits the OpenAI API and we are trying to restrict egress from our service to a limited range of IP cidr for the OpenAI servers. We just want to lock our service down so it can only communicate with a limited set of IP Addresses related to OpenAI and no other outside services, our services is hosted in AWS within our kubernetes cluster.

Thank you for the responses!