Docs · Guide
Use your Claude Pro/Max, ChatGPT Plus/Pro or GitHub Copilot subscription in any coding agent
Sign in to a subscription once, in magpie. Its models then show in every agent magpie sets up: GPT models from your ChatGPT plan in Claude Code, Claude models from your Claude plan in Codex or OpenCode, Copilot’s models in any of them. No API key.
magpie runs a gateway on your computer, at 127.0.0.1:3425. It speaks the OpenAI, Anthropic and Gemini APIs and translates between them, streaming and tool calls included, so an agent that speaks one API can use a model served in another. magpie writes the gateway’s address and key into each agent’s own config file.
Which subscriptions
| Subscription | Models are | Sign in from a terminal |
|---|---|---|
| Claude (Pro, Max, Team) | claude/… | magpie accounts add claude |
| ChatGPT (Plus, Pro, Business) | codex/… | magpie accounts add codex |
| GitHub Copilot | copilot/… | magpie accounts add copilot |
| Gemini (Code Assist) | gemini/… | magpie accounts add gemini |
| Antigravity | antigravity/… | magpie accounts add antigravity |
- Claude. Requests on a Claude subscription run through the Claude Code installed on your computer, so keep it installed.
- Copilot. Copilot gives you a code to enter on GitHub’s page. For GitHub Enterprise on its own domain:
magpie accounts add copilot --host <name>.ghe.com. - Gemini. This is Gemini CLI’s Google sign-in. Google answers it only for a Code Assist Standard or Enterprise account with a Google Cloud project of its own;
magpie accounts project gemini <email> <project>names the project. - Antigravity. Its sign-in gives Antigravity’s Claude and Gemini models.
Other subscriptions are added as plugins, from magpie’s Plugins page; see Plugins.
Sign in
- Open Add providerIn magpie’s Providers tab, press + Add provider.
- Click the subscription’s tilemagpie opens the vendor’s own sign-in page in your browser. The account shows up as soon as you finish.
- Pick its model for an agentIn the Agents tab, click the model on the agent’s row and choose one of the subscription’s models.
An agent you are already signed in to on this machine, such as Claude Code or Codex, shows up as a provider too, signed in as …. magpie accounts discovery off stops magpie reading those sign-ins.
Use it in another agent
A subscription’s models are in every agent’s picker in magpie. A few pairs people ask for:
| Agent | Subscription | From a terminal |
|---|---|---|
| Claude Code | ChatGPT | magpie claude codex/gpt-5.5 |
| Codex | Claude | magpie codex claude/claude-opus-5-5 |
| Gemini CLI | ChatGPT | magpie gemini model codex/gpt-5.5 |
| OpenCode | Claude | Pick a claude/… model on OpenCode’s row |
magpie models lists every model you can pick, as provider/model. Each agent’s guide says what magpie changes in its config and how to undo it: Claude Code, Codex, Gemini CLI. magpie <agent> default takes magpie’s wiring out of an agent and puts back what it had.
Several accounts and failover
- Add another account. Click the Claude or ChatGPT tile again, or run
magpie accounts addagain. Each account is listed under the provider. - Spread requests over them. Open the provider’s row and tick every account to use. Routing says how requests spread: Smart, the default, sends them to the account with quota to spare whose allowance renews soonest; In order, Until used up, In turn, Least used first, Use before expiry, By weight (a Max account 5, a Pro one 1) and Speed first are the others.
- Fall back when they run out. The provider’s Fallback lists models to use when it is out of quota, rate limited or down.
- One model on two subscriptions. Claude Opus from your Claude subscription and from Copilot become one group by themselves,
auto/<model>. Pick it to use both. - See what’s left.
magpie accountslists each account and how much of its allowance is used.
The routing modes are in Get started.
Other tools
Any tool with a base-URL setting can use a subscription through the gateway too. The Gateway tab’s Connect section has the address and key to copy. The base URL is http://127.0.0.1:3425/v1 for an OpenAI client and http://127.0.0.1:3425 for an Anthropic or Gemini one. See Integrate your app.
FAQ
Can I use my ChatGPT Plus or Pro subscription in Claude Code?
Yes. Sign in to ChatGPT in magpie and pick a codex/… model on Claude Code’s row, or run magpie claude codex/gpt-5.5. magpie translates Claude Code’s Anthropic requests for the GPT model and the replies back, tool calls included.
Can I use my Claude Pro or Max subscription in Codex or OpenCode?
Yes. Sign in to Claude in magpie and pick a claude/… model on the agent’s row. Requests on a Claude subscription run through the Claude Code installed on your computer, so keep it installed.
Can I use GitHub Copilot models outside VS Code?
Yes. Sign in to Copilot in magpie (GitHub gives you a code to enter), and its models are copilot/… in Claude Code, Codex, Gemini CLI, OpenCode and the other agents magpie sets up.
Do I need an API key to use a subscription in another agent?
No. magpie signs in on the vendor’s own page and the agent gets the gateway’s key. Your sign-in stays in magpie.
Can I use several Claude or ChatGPT accounts and switch when one hits its limit?
Yes. Add each account in magpie and tick them on the provider’s row. Smart routing, the default, uses an account with quota to spare, and moves on when one is out or rate limited. magpie accounts shows what each has left.
Do my requests go through a magpie server?
No. The gateway runs on your computer. Your prompts, replies, keys and accounts go only to the providers you use; magpie has no server of its own in that path.
Does each agent have to be signed in to the subscription?
No. Subscriptions are added in magpie, not by signing in inside another agent. One sign-in serves every agent you point at it.
Using a key instead? See Models in Claude Code and Models in Codex. Stuck? Ask on Discord.