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

SubscriptionModels areSign in from a terminal
Claude (Pro, Max, Team)claude/…magpie accounts add claude
ChatGPT (Plus, Pro, Business)codex/…magpie accounts add codex
GitHub Copilotcopilot/…magpie accounts add copilot
Gemini (Code Assist)gemini/…magpie accounts add gemini
Antigravityantigravity/…magpie accounts add antigravity

Other subscriptions are added as plugins, from magpie’s Plugins page; see Plugins.

Sign in

  1. Open Add providerIn magpie’s Providers tab, press + Add provider.
  2. 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.
  3. 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:

AgentSubscriptionFrom a terminal
Claude CodeChatGPTmagpie claude codex/gpt-5.5
CodexClaudemagpie codex claude/claude-opus-5-5
Gemini CLIChatGPTmagpie gemini model codex/gpt-5.5
OpenCodeClaudePick 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

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.