Free Claude Opus (4.x & 5) using AgentRouter A developer has published a guide to using Claude Opus models (4.x and 5) with AI coding tools like Claude Code, Cursor, Cline, and Claude Desktop by routing them through AgentRouter, a third-party API gateway offering promotional free credits. The guide details registration, claiming daily check-in credits, and configuring base URLs for different tools, while cautioning that AgentRouter is unofficial and not affiliated with Anthropic. A short, copy-paste guide to using Claude Opus models with Claude Code , Cursor , Cline , and Claude Desktop by pointing them at AgentRouter https://agentrouter.org — a third-party API gateway that currently provides promotional/free credits for AI-coding tools. 📚 Cross‑checked against AgentRouter's official docs: https://agentrouter.org/docs/index.html https://agentrouter.org/docs/index.html ⚠️ Heads up read this : AgentRouter is an unofficial, third‑party gateway. It is not Anthropic and is not affiliated with Anthropic. Free-credit promotions, eligibility, model names, limits, and uptime can change often and may disappear or change without notice. Great for experimenting and learning — don't push private, proprietary, or client code / secrets through it, and use the official Anthropic API https://console.anthropic.com or a Claude subscription for anything production or confidential. See Good to know good-to-know--honest-caveats . 👉 Sign up here: https://agentrouter.org/register?aff=kgU5 https://agentrouter.org/register?aff=kgU5 If AgentRouter's referral program is active and you are eligible, registering through a referral link may give both you and the referrer bonus credits . Using the link above supports the person who shared this guide. 1. Register: https://agentrouter.org/register?aff=kgU5 https://agentrouter.org/register?aff=kgU5 2. Claim promotional credit: if your account is eligible, complete the daily check-in . At the time of writing, AgentRouter shows a +$25 check-in credit . You may need to log out and back in for the balance to update. 3. Create an API key: https://agentrouter.org/console/token https://agentrouter.org/console/token 4. Point your tool at AgentRouter: - Claude Code / Cline Anthropic mode → Base URL https://agentrouter.org no /v1 - Cursor / Cline OpenAI mode → Base URL https://agentrouter.org/v1 with /v1 5. Claude Code / Cline Anthropic mode → Base URL 6. Pick a model: claude-opus-4-8 or claude-opus-5 . 7. Ask it to "reply with only OK" to confirm it works. 🎉 AgentRouter is a free API gateway that exposes popular large models behind Anthropic‑compatible and OpenAI‑compatible endpoints, so tools that already speak those protocols Claude Code, Cursor, Cline, Codex, Roo Code, and more can use it with zero code changes. You can receive promotional credits through mechanisms such as daily check-ins and referrals. Availability of credits, top-up options, and program rules are controlled by AgentRouter and may change. At the time of writing, the following Opus models are available through AgentRouter's promotional/free-credit offering: | Model ID | Notes | |---|---| | claude-opus-4-8 | Recommended default, very capable | | claude-opus-5 | Newest Opus | It also serves other free models such as glm-5.3 , deepseek-v4-flash , and gpt-5.6-sol . 🔁 Model IDs change over time. New Opus versions ship and old IDs get retired. AgentRouter's own per‑tool docs sometimes lag they may still mention claude-opus-4-5 , claude-opus-4-6 , or claude-opus-4-7 . Always treat the model list in your console as the source of truth: open https://agentrouter.org/console https://agentrouter.org/console and use whatever Opus IDs are live. If a model ID errors out, it was probably renamed — swap in the current one. 1. Go to https://agentrouter.org/register?aff=kgU5 https://agentrouter.org/register?aff=kgU5 . 2. Sign in with GitHub or LinkDo . Email verification is not required. 🇨🇳 Can't reach the site e.g. mainland China ? Use the official backup domain https://ps.air-outer.com https://ps.air-outer.com — it mirrors both the site and the API and works identically. Everywhere this guide says agentrouter.org , you can substitute ps.air-outer.com . - Daily check‑in: click the check‑in / sign‑in button in the console for +$25 credit . You must log out and log back in for the credit to show up. - Referrals: share your own referral link find it in the console — you and each new user both get bonus credit. 💡 If your balance shows $0 right after claiming, it's usually just a display glitch — wait a moment and refresh. 1. Open the token page: https://agentrouter.org/console/token https://agentrouter.org/console/token 2. Create a new token - Click on create token - Provide a name for example claude token - Enable Unlimited quota - Click on submit 3. Click on 4. Copy the Key looks like sk-... . Treat it like a password. You'll paste this key into whichever tool you use below. The one thing to get right: the base URL depends on which protocol the tool speaks. Protocol Base URL Used by Anthropic‑compatible https://agentrouter.org Claude Code, Cline Anthropic provider OpenAI‑compatible https://agentrouter.org/v1 Cursor, Cline OpenAI Compatible provider ❗ For the Anthropic endpoint, do not add /v1 . Mixing these up is the 1 cause of errors. Claude Code uses the Anthropic‑compatible config. 1. Make sure you have Node.js 18+ node --version 2. Install Claude Code npm install -g @anthropic-ai/claude-code@latest 3. Verify the install claude --version 4. Set the AgentRouter environment variables macOS / Linux: export ANTHROPIC AUTH TOKEN="YOUR AGENTROUTER API KEY" export ANTHROPIC BASE URL="https://agentrouter.org" export ANTHROPIC MODEL="claude-opus-4-8" or: claude-opus-5 Windows PowerShell : $env:ANTHROPIC AUTH TOKEN="YOUR AGENTROUTER API KEY" $env:ANTHROPIC BASE URL="https://agentrouter.org" $env:ANTHROPIC MODEL="claude-opus-4-8" or: claude-opus-5 To make it stick across terminal sessions, add the three export lines to your ~/.zshrc or ~/.bashrc macOS/Linux , or on Windows run setx ANTHROPIC BASE URL "https://agentrouter.org" and the others once, then reopen the terminal. 5. Launch and test claude then type: reply with only OK then try: list the files in this folder and tell me if a README exists — don't modify anything If it replies OK , you're connected. If the first launch asks whether to use the API key from your environment, confirm yes . ⚠️ Already logged into Claude Pro / Max / Team? These environment variables override your subscription login. To go back to your subscription, unset them and restart: unset ANTHROPIC AUTH TOKEN ANTHROPIC BASE URL ANTHROPIC MODEL claude Cursor talks to the OpenAI‑compatible endpoint. 1. Download, install, and log in to Cursor model settings are locked until you sign in . 2. Go to Cursor Settings → Models . 3. Under OpenAI API Key , paste your AgentRouter API key and enable the toggle. 4. Enable Override OpenAI Base URL and set it to https://agentrouter.org/v1 . 5. Test by sending "reply with only OK" in chat. ⚠️ Cursor limitation: on Cursor's free tier, a custom third‑party API often can't pick a specific model — you may be stuck in Auto mode. If you specifically want to choose Opus, Claude Code or Cline give you far more control. Cline supports both protocols. For Claude Opus, use the Anthropic path. 1. In VS Code, open Extensions , search Cline , and install it. 2. Get your API key from https://agentrouter.org/console/token https://agentrouter.org/console/token . 3. Open the Cline panel → Settings / API Configuration . For Claude Opus recommended : - API Provider: Anthropic - Check Use custom base URL - Custom Base URL: https://agentrouter.org ← no /v1 - API Key: your AgentRouter key - Model: claude-opus-4-8 or claude-opus-5 - Save, then send "reply with only OK" to test. For OpenAI‑style models e.g. gpt-5.6-sol , glm-5.3 : - API Provider: OpenAI Compatible - Base URL: https://agentrouter.org/v1 ← with /v1 - API Key: your AgentRouter key - Model ID: e.g. gpt-5.6-sol or glm-5.3 Keep the two methods separate — don't mix the Anthropic base URL with the OpenAI provider or vice‑versa. Beyond the three above, AgentRouter documents setups for: Codex, Qwen Code, Roo Code, Kilo Code, GitHub Copilot, OpenCode, OpenClaw, Hermes Agent, Pi, Trae, Claude App, and Gemini CLI. See https://agentrouter.org/docs/index.html https://agentrouter.org/docs/index.html . | Symptom | Likely cause & fix | |---|---| | 401 Unauthorized | Wrong base URL for the protocol, or an unsupported client. Double‑check Anthropic = https://agentrouter.org no /v1 , OpenAI = .../v1 . Use an officially supported client. | | 400 content blocked | Your request contains an unsupported language. AgentRouter currently only allows Chinese, English, French, German, Russian . Rewrite the prompt and retry. | | Model not found / errors on a model ID | The ID was probably renamed. Open https://agentrouter.org/console https://agentrouter.org/console and use a currently‑listed Opus ID e.g. claude-opus-4-8 / claude-opus-5 . | | Balance shows $0 | Usually a display glitch — wait and refresh. Also make sure you logged out/in after the check‑in. | | Claude Code complains about a background/"small/fast" model | Optionally set ANTHROPIC SMALL FAST MODEL to a model that's actually available e.g. claude-opus-4-8 . | | Can't open the site | Use the backup domain https://ps.air-outer.com https://ps.air-outer.com . | - It's unofficial. AgentRouter is a third‑party gateway, not Anthropic. Your prompts pass through their servers — never send secrets, credentials, or confidential/proprietary code. - Reliability varies. The service has had upstream outages and has temporarily lost Claude models in the past. If it's down, that's normal for a free service — check their status/announcements. - Free credits & models can change or end at any time. Don't build anything you depend on around it. - For serious/production use, use the official Anthropic API https://console.anthropic.com or a Claude Pro/Max subscription. AgentRouter bans abuse and will ban accounts for it. Don't: mass‑register or farm credits, run automated arbitrage/scraping, resell or share accounts/credits, do fake‑invite fraud, or try to bypass limits. Full terms: https://agentrouter.org/docs/terms.html https://agentrouter.org/docs/terms.html . - Official AgentRouter docs: https://agentrouter.org/docs/index.html https://agentrouter.org/docs/index.html - Sign up referral : https://agentrouter.org/register?aff=kgU5 https://agentrouter.org/register?aff=kgU5 This guide is provided as‑is for educational purposes. Model availability and platform terms are controlled by AgentRouter and may change. 1. Go to https://agentrouter.org/register?aff=kgU5 https://agentrouter.org/register?aff=kgU5 . 2. Sign in with GitHub or LinkDo . Email verification is not required. 1. Open the token page: https://agentrouter.org/console/token https://agentrouter.org/console/token 2. Create a new token - Click on create token - Provide a name for example claude token - Enable Unlimited quota - Click on submit 3. Click on 4. Copy the Key looks like sk-... . Treat it like a password. 1. Open the Claude Desktop application 2. Ensure Developer Mode is active found via Help → Troubleshooting → Enable Developer Mode 3. Locate the new Developer tab in your top application menu bar 4. Click Configure Third-Party Inference ... to open the setup window - Set the Connection or Provider type as Gateway - Credential kind as Static API key - Gateway base URL as https://agentrouter.org/ https://agentrouter.org/ - Gateway API key as your token you created in step2 - Gateway auth scheme as bearer 5. Set the 6. Click on Save Changes then Apply Changes 7. Restart popup will come so restart it 8. Tada now you are good to use Claude