> ## Documentation Index
> Fetch the complete documentation index at: https://oximy.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Connect the OpenAI API

> Add an OpenAI API key and optionally restrict it to Oximy source IPs.

Oximy connects to the OpenAI API with a project API key. ChatGPT subscription sign-in is a separate personal connection flow and does not use these instructions.

## Connect an API key

<Steps>
  <Step title="Create a project API key">
    Open [OpenAI API keys](https://platform.openai.com/api-keys) and create a dedicated key with access to the models your workspace will use.
  </Step>

  <Step title="Add the key in Oximy">
    Open **Models → Providers → Add provider**, choose **OpenAI**, paste the key, and optionally give the connection a display name.
  </Step>

  <Step title="Verify the connection">
    Save the connection and run **Check now**. A successful check displays **Working**.
  </Step>
</Steps>

See the [OpenAI API authentication reference](https://platform.openai.com/docs/api-reference/authentication) for credential details.

## Optional source-IP restriction

Expand **Restrict access by IP**, copy all displayed CIDRs, and add every address to the API key's allowlist. Follow [OpenAI's IP allowlisting instructions](https://help.openai.com/en/articles/20001201-ip-allowlisting-for-the-openai-api) and the [Oximy source-IP guide](/docs/sidekick/admin/provider-network-access).

If the provider row reports **Network blocked**, compare the current displayed list with the key allowlist and check the connection again. A generic `401` or `403` without an explicit IP-restriction response remains an authentication or access error.
