Skip to Content
kosemdocs
GuidesLLM GatewayProviders

OpenAI

Add OpenAI's API as a provider, with an organization or project of your account, and call GPT models through the LLM Gateway.

Connect OpenAI's API using your API key to serve GPT and o-series models such as gpt-5-mini. Adding a provider requires Owner or LLM Gateway Admin on the organization, or on a project for a project-scoped provider.

Add OpenAI

  1. Create an API key in OpenAI's platform.
  2. In your organization, click LLM Gateway, then Providers, then Add a provider, then OpenAI under Model providers.
  3. For a key that belongs to several OpenAI organizations or projects, enter the Organization ID (optional), org-…, or the Project ID (optional), proj_…, that requests count against.
  4. Paste the key into API key, select which projects can create models with this provider, click Test and click Add provider.

See Add a provider for adding a project provider, sharing and key rotation.

What kosem uses

  • API: OpenAI's Responses and Chat Completions at https://api.openai.com/v1. kosem translates calls with Anthropic's Messages to Responses.
  • Type, for the API: providerTypes/openai, with organization and project in config.
  • Models to start with: gpt-6.2-sol and gpt-5-mini. The provider list omits models the LLM Gateway doesn't serve, such as embedding, speech, image and realtime models.
  • Prices: OpenAI's list prices, for usage and spend limits.

Through Anthropic's SDK, token counting returns 501 for OpenAI models, since only Anthropic supports token counting; SDKs then fall back to local estimation.

On this page