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.
- OpenAI Chat Completions API (
/chat/completions) - Anthropic Messages API (
/messages) - OpenAI Responses API (
/responses)
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.
| Variable | Required | Purpose |
|---|---|---|
CHATGPT_TOKEN_DIR | No | Read by the provider integration |
CHATGPT_AUTH_FILE | No | Read by the provider integration |
CHATGPT_API_BASE | No | Overrides the provider base URL |
OPENAI_CHATGPT_API_BASE | No | Overrides the provider base URL |
TERM_PROGRAM | No | Read by the provider integration |
TERM_PROGRAM_VERSION | No | API version sent with each request |
WEZTERM_VERSION | No | API version sent with each request |
ITERM_SESSION_ID | No | Read by the provider integration |
ITERM_PROFILE | No | Alternative credential source |
ITERM_PROFILE_NAME | No | Read by the provider integration |
TERM_SESSION_ID | No | Read by the provider integration |
KITTY_WINDOW_ID | No | Read by the provider integration |
TERM | No | Read by the provider integration |
ALACRITTY_SOCKET | No | Read by the provider integration |
KONSOLE_VERSION | No | API version sent with each request |
GNOME_TERMINAL_SCREEN | No | Read by the provider integration |
VTE_VERSION | No | API version sent with each request |
WT_SESSION | No | Read by the provider integration |
CHATGPT_ORIGINATOR | No | Read by the provider integration |
CHATGPT_USER_AGENT | No | Read by the provider integration |
CHATGPT_USER_AGENT_SUFFIX | No | Read by the provider integration |
CHATGPT_DEFAULT_INSTRUCTIONS | No | Read 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.
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) | Mode | Max input tokens | Max output tokens | Input per 1M tokens | Output per 1M tokens | Other pricing | Capabilities |
|---|---|---|---|---|---|---|---|
chatgpt/gpt-5.1-codex-max | Responses | 128,000 | 128,000 | tools, vision, reasoning, structured output | |||
chatgpt/gpt-5.1-codex-mini | Responses | 128,000 | 64,000 | tools, vision, reasoning, structured output | |||
chatgpt/gpt-5.2 | Responses | 128,000 | 64,000 | tools, vision, reasoning, structured output | |||
chatgpt/gpt-5.2-codex | Responses | 128,000 | 128,000 | tools, vision, reasoning, structured output | |||
chatgpt/gpt-5.3-chat-latest | Responses | 128,000 | 64,000 | tools, vision, reasoning, structured output | |||
chatgpt/gpt-5.3-codex | Responses | 128,000 | 128,000 | tools, vision, reasoning, structured output | |||
chatgpt/gpt-5.3-codex-spark | Responses | 128,000 | 128,000 | tools, vision, structured output | |||
chatgpt/gpt-5.3-instant | Responses | 128,000 | 64,000 | tools, vision, structured output | |||
chatgpt/gpt-5.4 | Responses | 1,050,000 | 128,000 | tools, vision, reasoning, structured output | |||
chatgpt/gpt-5.4-pro | Responses | 1,050,000 | 128,000 | tools, vision, reasoning, structured output | |||
chatgpt/gpt-5.5 | Responses | 1,050,000 | 128,000 | tools, vision, reasoning, structured output | |||
chatgpt/gpt-5.6-luna | Responses | 1,050,000 | 128,000 | tools, vision, reasoning, structured output | |||
chatgpt/gpt-5.6-sol | Responses | 1,050,000 | 128,000 | tools, vision, reasoning, structured output | |||
chatgpt/gpt-5.6-terra | Responses | 1,050,000 | 128,000 | tools, vision, reasoning, structured output | |||
chatgpt/gpt-6-astra | Responses | 922,000 | 128,000 | tools, vision, reasoning, structured output | |||
chatgpt/gpt-6-luna | Responses | 922,000 | 128,000 | tools, vision, reasoning, structured output | |||
chatgpt/gpt-6-sol | Responses | 922,000 | 128,000 | tools, vision, reasoning, structured output | |||
chatgpt/gpt-6.1-sol | Responses | 922,000 | 128,000 | tools, vision, reasoning, structured output | |||
chatgpt/gpt-rosalind-discovery | Responses |