Connect
Magpie
Magpie is the recommended way to connect. It is a local gateway and menu bar app where Claude Code, Codex, OpenCode, Gemini CLI, Hermes and dozens of other agents pick their models. Add CoreCode once with a key in the auto group, and every agent can use CoreCode's Claude, GPT, Grok and Gemini.
https://corecode.live (without /v1)https://corecode.live/v1, for both Chat Completions and ResponsesInstall Magpie
Download it from the Magpie download page, for macOS, Windows or Linux. Once installed, its icon appears in the menu bar and the magpie command works in a terminal.
Create a key
Create a key on the API Keys page and leave the group on auto. Requests Magpie forwards do not come straight from Claude Code, so do not use the 仅限CC group. Auto bills Claude at the 可外接 price; see Auto routing.
One-click import
With Magpie installed, click the button below, paste your key in the window Magpie opens, and click Add:
The link carries CoreCode's three API addresses and the common models, and each agent uses the one it speaks natively: Anthropic for Claude Code, Responses for Codex, Chat Completions for OpenCode. Your key stays on your computer and never passes through usemagpie.ai.
Add it from the command line
magpie provider add CoreCode id=corecode \
anthropic=https://corecode.live \
url=https://corecode.live/v1 responses=https://corecode.live/v1 \
key=sk-your-key \
models=claude-opus-5-5,claude-sonnet-5-5,claude-haiku-5-5,gpt-6.1-sol,gpt-6-sol,grok-4.7,gemini-3.8-flash-high
magpie provider test corecode
A passing test prints three lines:
✓ chat 1325 ms · claude-opus-5-5
✓ responses 1191 ms · claude-opus-5-5
✓ anthropic 1242 ms · claude-opus-5-5
To add or drop a model, run magpie provider models corecode +grok-4.6 or -gpt-6-sol.
Pick a model for each agent
On the Agents page of the Magpie app, click an agent's model and choose a corecode/… one, or from the command line:
magpie claude corecode/claude-opus-5-5 # Claude Code on Opus
magpie codex corecode/gpt-6.1-sol # Codex on GPT-6.1 Sol
magpie ls # the agents on this computer and their models
Magpie changes only the relevant settings in that agent's configuration, and new sessions pick them up. To put an agent back as it was, run a command such as magpie claude default.
Check that it works
Send a message from the agent, then open the console's usage logs: if the request's model and group match, you are connected.
FAQ
One line of provider test fails
Check the three addresses: Anthropic without /v1, Chat Completions and Responses with /v1. Then check that the key is in auto or 「可外接」.
An agent says the model does not exist
The model name must match the Pricing page and be in the key's group. The auto group covers every model.
I want to stop using Magpie
Run magpie <agent> default for each agent you changed; it returns to the settings it had before Magpie.