Use GPT models in Claude Code
Run Claude Code on GPT-6.2 Sol and other GPT models through Claude Code Router and /model: the models to pick, and the settings that keep the prompt cached.
Checked November 28, 2026
Claude Code speaks Anthropic's Messages format. GPT models answer on OpenAI's chat completions and Responses APIs instead, so Claude Code needs Claude Code Router in between to translate. This page gives the router's choices for GPT models. We ran it with Claude Code 2.1.332 and Claude Code Router 3.1.6 against /model, on 28 Nov 2026.
Before you start
- A /model API key: create one on the API keys page and add credit on the credits page.
- Node.js 22 or later, and Claude Code.
Set it up
Install Claude Code Router and go through its setup wizard as the Claude Code Router guide shows, with these choices:
- Choose provider: name the provider
slashmodel, with the API endpoint below. - Pick models: click GPT-6.2 Sol and GPT-6.2 Astra. If the router has added a Claude model by itself, remove it with the cross beside it.
- Verify connection: under Advanced settings, switch off Auto detect protocols and leave only OpenAI Responses ticked. In the check, each model should come back as Connection verified.
- Connect agent: set Default model to
slashmodel/gpt-6.2-soland Haiku model toslashmodel/gpt-6.2-sol. Leave the other model fields on Keep Claude Code default.
API endpoint
https://api.slashmodel.com/v1When the wizard ends, start Claude Code through the router, with the profile's name:
ccr smPick a model
- GPT-6.2 Sol,
gpt-6.2-sol: the default and Haiku model in the steps above. - GPT-6.2 Astra,
gpt-6.2-astra: costs more than Sol.
Each model's price is on the pricing page. A model is written as the provider's name, a slash and the model's id, so this starts a session on Astra:
ccr sm -- --model slashmodel/gpt-6.2-astraClaude Code also uses the Haiku model for small jobs in the background, so with Sol there every request stays on Sol.
Good to know
- Prompt caching works on the Responses format. Claude Code sends its long instructions again with every request. In our run, a small task of three requests read over half of its prompt tokens from the cache, at the cache price. See the Responses API.
- Claude Code warns that it doesn't recognise the model's name, then goes on: in our runs it wrote a file and ran it, as it does on Claude.
- Gemini and other models that aren't on the Responses API need a provider on OpenAI Chat: see the router guide. Claude models need no router: point Claude Code straight at /model.
- A key can cap what a session costs. Give Claude Code a key of its own with a daily or monthly limit: see key settings.
- Every request shows under Usage with its model, its tokens and its cost.