agentgate
agentgate guides/use-claude-code-with-openrouter

Claude Code + OpenRouter

Use Claude Code with OpenRouter through AgentGate.

AgentGate keeps Claude Code configured once, then lets you route model requests to OpenRouter or another provider locally.

direct answer

Short answer: AgentGate keeps Claude Code configured once, then lets you route model requests to OpenRouter or another provider locally.

Best fit

  • You want AI apps to keep one stable local endpoint.
  • You need provider switching, request logs, cost visibility, or failover.
  • You want client config changes to be reversible.

Not ideal

  • You use one client, one provider, and the setup rarely changes.
  • You do not need logs, failover, cost tracking, or config rollback.

One stable local endpoint

Instead of repeatedly changing Claude Code settings, point it at AgentGate. Provider selection, model mapping, and failover live in the local AgentGate dashboard.

Setup path

Enable an OpenRouter provider, choose a model, start the gateway, and apply the Claude Code client config. Verify provider selection in request logs before doing long sessions.

What you gain

You get local request history, faster provider experiments, and the ability to return to official client config when needed.

agentgate --faq

FAQ.

Is this a hosted proxy?

No. AgentGate runs locally on your machine.

Can I keep multiple providers?

Yes. You can configure OpenRouter plus direct providers and route between them.