# magpie An open-source local AI gateway that connects coding agents to model providers, translates API formats, and routes requests across models. - Findings24: - Website: - Pricing: Free - Categories: AI Gateway And Routing, AI Developer Tools, AI Agent Infrastructure ## What is magpie? magpie is an open-source AI gateway that runs on your computer. It connects coding agents such as Claude Code, Codex, Gemini CLI, and OpenCode to compatible model providers by translating between OpenAI, Anthropic, and Google Gemini API formats. You can set a model per agent, save model profiles, and group providers for routing and failover. The gateway can also replace detected sensitive values with placeholders before it sends a prompt to a provider. ## What can magpie do? ### Provider configuration Connect supported AI providers through their available authentication methods and select from the models exposed by the gateway. ### Local API translation gateway Runs locally and translates between OpenAI Chat and Responses, Anthropic Messages, and Google Gemini interfaces, including streaming, tool calls, and reasoning. ### Account routing and failover Pools multiple accounts or keys and routes requests according to smart, ordered, round-robin, or least-used strategies. Rate limits, quota exhaustion, and failures can cause magpie to pass a request to another account. ### Model and profile management Shows which model each agent uses, edits only the selected configuration value, and supports saved profiles for switching several agents together. ### Privacy masking Replaces detected API keys, private keys, tokens, emails, and certain card or ID numbers with placeholders before a request is sent, then restores placeholders in replies and tool calls. ### Provider discovery Includes provider presets and asks vendors which models they serve so newly available models can appear in the model picker after refresh. ## Use Cases ### Connect several coding agents to one gateway Configure supported model providers once, then choose compatible models for each coding agent from a single local gateway. ### Keep requests moving across accounts Users with several accounts or keys can pool them so requests move to another available account when one reaches a quota, rate limit, balance limit, or temporary failure. ### Connect agents to different model APIs Teams using agents with different native API formats can place magpie between the agents and providers to translate requests and responses locally. ### Switch models for different workflows Developers can assign models to agents, use model names in an agent’s own picker, and save profiles such as budget-focused or task-focused configurations. ### Reduce exposure of secrets in prompts Users handling repositories, logs, configuration files, or tool-driven tasks can mask recognized sensitive values before prompts leave the computer, while retaining local restoration for replies. ## Frequently Asked Questions ### Where does magpie run? magpie runs a gateway on the local computer at 127.0.0.1:3425. Provider keys are kept in magpie rather than exposed directly to agents. ### Which agents and providers can it connect? The site lists agents including Claude Code, Codex, Gemini CLI, OpenCode, Pi, Goose, Cursor CLI, Copilot CLI, and others. Provider examples include Anthropic, OpenAI, Google Gemini, DeepSeek, Kimi, GLM, Qwen, MiniMax, Mistral, xAI, Groq, OpenRouter, and local servers. ### How does routing respond to limits or failures? magpie can skip accounts affected by rate limits or quota exhaustion and retry through another account. It uses vendor retry and reset information where available and applies a backoff after failures. ### Can masking be customized? Yes. Users can choose what to mask, add their own words, or configure the system to warn or block instead. Values needed for a task can be placed under Never mask. ### Does magpie modify agent configuration? Its menu-bar controls can change the selected model and rewrite an agent’s configuration while preserving comments, ordering, and indentation. The site says writes are atomic. ## Quick Facts - **Category**: AI Gateway and Routing - **Primary users**: Developers using coding agents and multiple AI model providers - **Deployment**: Local gateway at 127.0.0.1:3425 - **Supported interfaces**: OpenAI Chat and Responses, Anthropic Messages, and Google Gemini - **Source domain**: usemagpie.ai - **License**: MIT