Use Claude Code and Cursor from Iran with one key

Coding tools usually need a foreign account and card. Point them at IranRouter instead: one ir- key, working from inside Iran, billed in Rial.

Which tools connect

  • Claude Code with the /anthropic base URL.
  • Codex through /responses. Its web search works too, and each search has its own fixed charge on top of the tokens.
  • Gemini CLI with the /genai base URL.
  • Cursor, Continue, LangChain and anything that takes a base URL.
  • Open agents like OpenClaw and Hermes.

Why one key

Instead of an account per tool, you hold one key and choose the model for each job: a strong model for hard work, a cheaper one for simple steps.

Keep an agent's cost in view

Agents send many requests with large contexts. Give the agent's key a daily limit, and let prompt caching bill repeated tokens at its much lower rate.

How the connection looks

Shell
export ANTHROPIC_BASE_URL="https://iranrouter.com/anthropic"
export ANTHROPIC_API_KEY="ir-..."

The agents guide

Frequently asked questions

Does Claude Code work without a foreign subscription?

Yes. Set ANTHROPIC_BASE_URL to the /anthropic address, use your ir- key, and it bills your Rial wallet.

How do I connect Cursor?

Set the OpenAI base URL in Cursor's settings to ours and enter your ir- key. The agents guide has the details.

Can I cap an agent's spending?

Yes. Set a daily or monthly Rial limit on its key; requests past it do not run.

Get connected today

Create an account, top up your wallet and make your first request in minutes — no contract, no foreign card.

Create a free accounthttps://iranrouter.com/v1