inference-providers

OpenAI

first_party

DocsConsoleStatus

Getting credentials

api-key

api_key via header (header Authorization: Bearer)

Key prefix: sk-

Environment: OPENAI_API_KEY

platform.openai.com → API Keys. Project keys (sk-proj-) scope to a project; send OpenAI-Organization / OpenAI-Project when a key spans orgs/projects.

Credentials docs

chatgpt-oauth

oauth via header (header Authorization: Bearer)

Flow: authorization_code_pkce or device code at auth.openai.com (public client; first-party clients only)

Scopes: openid profile email offline_access

codex login (or --device-auth). Tokens persist in ~/.codex/auth.json (or OS keyring); refresh tokens rotate and are effectively single-use. Billed against ChatGPT Plus/Pro/Business plans (5-hour + weekly windows), not API credits.

Credentials docs

Endpoints

IDURLProtocolAuth
v1-chat-completionshttps://api.openai.com/v1/chat/completionsopenai-chatany
v1-responseshttps://api.openai.com/v1/responsesopenai-responsesany
codex-backendhttps://chatgpt.com/backend-api/codex/responsesopenai-responseschatgpt-oauth

API surfaces

textstreamingembeddingsfilesbatchfine_tuningrealtimeimage_genaudio

Quirks

Models offered

ModelWire IDEndpointStatusReasoning
openai/gpt-5gpt-5v1-chat-completionsgaeffort · default on · mandatory · returns hidden
openai/gpt-5gpt-5v1-responsesgaeffort · default on · mandatory · returns hidden · round-trips encrypted_content
openai/gpt-5-1gpt-5.1v1-chat-completionsgaeffort · default off · returns hidden
openai/gpt-5-1gpt-5.1v1-responsesgaeffort · default off · returns reasoning_summary · round-trips encrypted_content
openai/gpt-5-5gpt-5.5v1-chat-completionsgaeffort · default on · returns hidden
openai/gpt-5-5gpt-5.5v1-responsesgaeffort · default on · returns reasoning_summary · round-trips encrypted_content
openai/gpt-5-6gpt-5.6v1-chat-completionsgaeffort · default on · returns hidden
openai/gpt-5-6gpt-5.6-lunacodex-backendgaeffort · default on · returns reasoning_summary · round-trips encrypted_content
openai/gpt-5-6gpt-5.6v1-responsesgaeffort · default on · returns reasoning_summary · round-trips encrypted_content
openai/gpt-5-6gpt-5.6-solcodex-backendgaeffort · default on · returns reasoning_summary · round-trips encrypted_content
openai/gpt-5-6gpt-5.6-terracodex-backendgaeffort · default on · returns reasoning_summary · round-trips encrypted_content
openai/o3o3v1-chat-completionsgaeffort · default on · mandatory · returns hidden
openai/o3o3v1-responsesgaeffort · default on · mandatory · returns hidden · round-trips encrypted_content