OpenRouter applications
Connect a Chat Completions application while keeping its provider key on your machine.
On this page
One local key, one protected route
Choose OpenRouter application in Quick setup. Leash connects your account through browser approval, encrypts your existing provider key locally and starts the local proxy. OpenRouter is a provider, not a separate coding agent. Native Codex Responses and Claude Messages integrations keep their direct-provider adapters.
Import from your own shell environment; never paste credentials into a chat. Configure your application to use OPENAI_BASE_URL, the placeholder OPENAI_API_KEY and the x-leash-local-token header provided by leash run.
leash secrets import --provider openrouter --from-env OPENROUTER_API_KEY
leash connect --agent openrouter-sdk --api https://useleash.dev --mode device
leash run --provider openrouter -- node agent.mjsExplicit models and bounded requests
Text Chat Completions, client function tools and streaming usage are supported. The reviewed catalog includes openai/gpt-4.1-mini and anthropic/claude-sonnet-4.5. Unpriced IDs are rejected before upstream; add an explicit reviewed price override to expand it.
Leash caps provider prompt/completion rates, disables provider fallbacks and blocks unpriced plugins, presets, media, server tools and model-router aliases. Its local model-selection policy preserves the exact OpenRouter model. Reservations are deliberately conservative and can reject a small request when its maximum priced context cannot fit your cap.
Use the same code memory in your MCP-aware agent
The local MCP index does not depend on a model provider. Codex and Claude Code get project configuration through leash setup. Other clients can launch leash memory serve --repo /absolute/project as a stdio MCP server. OpenRouter itself does not install or configure an MCP client.