Skip to contentSkip to page list

Docs

OpenAI account

Sign in with a ChatGPT account under Settings, Model Providers and call the Responses API through the LangWatch AI Gateway on that subscription.

On this page

What the OpenAI account provider is

The OpenAI account provider is a credential backed by a ChatGPT subscription instead of an API key. Requests go to OpenAI's Codex backend and count against that subscription's plan.

Add the credential

Open Settings > Model Providers, click Add Model Provider and select Codex (OpenAI account). The row has no key fields. Click the sign-in button, open the URL it shows and enter the code. The code is valid for 15 minutes. LangWatch stores the tokens and refreshes them.

The Codex OpenAI account model provider drawer with the Sign in with OpenAI button and the routing handle openai_codex
The Codex (OpenAI account) row: no key field, a Sign in with OpenAI button and the routing handle openai_codex.

Model names

Write openai_codex/<model>, for example openai_codex/gpt-5.6-terra.

Send a request

example.shBash
curl https://gateway.langwatch.ai/v1/responses \  -H "Authorization: Bearer $LANGWATCH_VIRTUAL_KEY" \  -H "Content-Type: application/json" \  -d '{    "model": "openai_codex/gpt-5.6-terra",    "input": "Say hi in one word"  }'

Endpoints

EndpointServed
POST /v1/responsesYes, streamed from OpenAI
POST /v1/messagesYes, translated to Responses
POST /v1/chat/completions, POST /v1/embeddingsNo, rejected with HTTP 400
POST /v1/images/generations, POST /v1/images/editsNo, rejected with HTTP 400. Image traffic needs a direct OpenAI, Azure OpenAI, Gemini, Vertex AI or Bedrock credential. See Images

If OpenAI answers 401, the gateway refreshes the session once. If the refresh is rejected, the request fails with codex_session_expired. Sign in again on the row.

Documentation