Skip to main content

ChatGPT Subscription

ChatGPT Subscription is available on the Spanway gateway through the chatgpt/ model prefix. You register a ChatGPT Subscription model once in the gateway's config.yaml (or through the Admin UI), and every application then calls it through the gateway's OpenAI-compatible API with a Spanway virtual key. The provider credential stays on the gateway, and every request is authenticated, rate limited, logged and costed in the same way as any other provider.

The gateway translates requests and responses for ChatGPT Subscription natively, so provider specific parameters and errors are mapped to the OpenAI format for you.

Supported endpoints​

The gateway's endpoint support matrix lists the following endpoints for ChatGPT Subscription. Each link explains the request shape and the gateway features that apply to that endpoint.

Model types​

The bundled price map lists 19 ChatGPT Subscription models across these modes: Responses. The mode decides which gateway endpoint a model is meant for, and it is also used by the gateway's health checks to send the right kind of test request.

Environment variables​

The ChatGPT Subscription integration reads the following environment variables. Variables marked as required are the ones the gateway's environment validation checks for this provider. You can also pass any of these values directly in spanway_params (for example api_key or api_base), and the per-model value wins over the environment.

VariableRequiredPurpose
CHATGPT_TOKEN_DIRNoRead by the provider integration
CHATGPT_AUTH_FILENoRead by the provider integration
CHATGPT_API_BASENoOverrides the provider base URL
OPENAI_CHATGPT_API_BASENoOverrides the provider base URL
TERM_PROGRAMNoRead by the provider integration
TERM_PROGRAM_VERSIONNoAPI version sent with each request
WEZTERM_VERSIONNoAPI version sent with each request
ITERM_SESSION_IDNoRead by the provider integration
ITERM_PROFILENoAlternative credential source
ITERM_PROFILE_NAMENoRead by the provider integration
TERM_SESSION_IDNoRead by the provider integration
KITTY_WINDOW_IDNoRead by the provider integration
TERMNoRead by the provider integration
ALACRITTY_SOCKETNoRead by the provider integration
KONSOLE_VERSIONNoAPI version sent with each request
GNOME_TERMINAL_SCREENNoRead by the provider integration
VTE_VERSIONNoAPI version sent with each request
WT_SESSIONNoRead by the provider integration
CHATGPT_ORIGINATORNoRead by the provider integration
CHATGPT_USER_AGENTNoRead by the provider integration
CHATGPT_USER_AGENT_SUFFIXNoRead by the provider integration
CHATGPT_DEFAULT_INSTRUCTIONSNoRead by the provider integration

Reference a variable from config.yaml with the os.environ/ prefix so that the secret never appears in the file itself. Secrets can also come from a secret manager, see secret managers.

Models and pricing​

The table lists every ChatGPT Subscription model in the gateway's bundled price map. Prices are shown in US dollars per 1 million tokens, computed from the per-token values the gateway uses for spend tracking. Context window sizes are the provider limits recorded in the same file. Capabilities are the supports_* flags set for each model.

info

Prices come from the price map bundled with this Spanway build. They are used to calculate the spend recorded for each request, key, team and user. Your negotiated rates may differ, and you can override them per deployment with custom pricing.

Model (model value)ModeMax input tokensMax output tokensInput per 1M tokensOutput per 1M tokensOther pricingCapabilities
chatgpt/gpt-5.1-codex-maxResponses128,000128,000tools, vision, reasoning, structured output
chatgpt/gpt-5.1-codex-miniResponses128,00064,000tools, vision, reasoning, structured output
chatgpt/gpt-5.2Responses128,00064,000tools, vision, reasoning, structured output
chatgpt/gpt-5.2-codexResponses128,000128,000tools, vision, reasoning, structured output
chatgpt/gpt-5.3-chat-latestResponses128,00064,000tools, vision, reasoning, structured output
chatgpt/gpt-5.3-codexResponses128,000128,000tools, vision, reasoning, structured output
chatgpt/gpt-5.3-codex-sparkResponses128,000128,000tools, vision, structured output
chatgpt/gpt-5.3-instantResponses128,00064,000tools, vision, structured output
chatgpt/gpt-5.4Responses1,050,000128,000tools, vision, reasoning, structured output
chatgpt/gpt-5.4-proResponses1,050,000128,000tools, vision, reasoning, structured output
chatgpt/gpt-5.5Responses1,050,000128,000tools, vision, reasoning, structured output
chatgpt/gpt-5.6-lunaResponses1,050,000128,000tools, vision, reasoning, structured output
chatgpt/gpt-5.6-solResponses1,050,000128,000tools, vision, reasoning, structured output
chatgpt/gpt-5.6-terraResponses1,050,000128,000tools, vision, reasoning, structured output
chatgpt/gpt-6-astraResponses922,000128,000tools, vision, reasoning, structured output
chatgpt/gpt-6-lunaResponses922,000128,000tools, vision, reasoning, structured output
chatgpt/gpt-6-solResponses922,000128,000tools, vision, reasoning, structured output
chatgpt/gpt-6.1-solResponses922,000128,000tools, vision, reasoning, structured output
chatgpt/gpt-rosalind-discoveryResponses