Q&A · Updated
How to choose an AI coding API relay
When choosing an AI coding API relay, check six things: billing, whether the balance expires, which tools and models it supports, whether setup is just a global config change, whether you can switch channels, and who supports you. Going direct suits people who can reliably use official accounts and payment; a relay suits people who want to pay per token and use one key across tools. AICodeWith is pay as you go, the balance stays valid for 12 months with no monthly reset, and the Base URL is https://api.aicodewith.ai.
Symptoms
| Symptom | Likely cause | What to do |
|---|---|---|
| Subscription quota runs out, you wait for resets | Subscriptions cap usage per window | Consider a pay-as-you-go API key |
| You use Claude Code, Codex and other tools | Each tool needs its own subscription | Pick a relay where one key covers several tools |
| Official payment or region is restricted | Official payment and region limits | Check the relay's payment options and supported regions |
| Worried about unused balance expiring | Some services reset monthly | Check balance validity; AICodeWith balance lasts 12 months |
Official vs relay
| Official direct | API relay (AICodeWith) | |
|---|---|---|
| Billing | Subscription or official API billing | Pay as you go, no monthly or yearly plan |
| Balance | Official rules | Valid for 12 months, no monthly reset |
| Tools | One account per vendor | One key for Claude Code, Codex, OpenCode, Cline, Cursor and more |
| Setup | Account login or official key | Base URL and key in the global config |
| Channels | Single official route | Several channels per model with different prices and routes |
Minimal setup: point your global config at AICodeWith
Only the global config changes; project files stay as they are. Other tools: integration guides.
1. Create a key
Sign up, open API Keys in the dashboard and create a key. See how to get an API key.
2. Edit Claude Code's global config
Open the global config
~/.claude/settings.json, put the Base URL and key inenv, save and restart Claude Code. The Base URL is the bare domain, with no/v1.~/.claude/settings.json{ "env": { "ANTHROPIC_BASE_URL": "https://api.aicodewith.ai", "ANTHROPIC_AUTH_TOKEN": "sk-你的Key" } }3. Verify
Run
claude, then/status. If the Base URL showshttps://api.aicodewith.ai, you are connected.
Channel tips
- Pay as you go, no monthly or yearly plan: top up a balance and pay per token used. The balance stays valid for 12 months and does not reset monthly.
- One model can run through several channels with different prices (discounts) and routes. New accounts have the recommended channels on by default.
- If one channel errors or slows down, switch to another channel for the same model in the dashboard. See the pricing page for current prices.
Get connected now
Sign up, create a key and edit your global config as shown above.
FAQ
Are relay models the same as official ones?
Requests go to the corresponding model APIs; see the models page for names and availability.
Can a relay guarantee account safety?
We make no promises about bans or official account status; the relay never logs in to your official account.
Should the Base URL include /v1?
For Claude Code use https://api.aicodewith.ai with no /v1. A few tools need a specific path; follow their setup guide.
Does the balance expire?
The balance stays valid for 12 months and does not reset monthly.
How do I set up other tools?
See the integration guides for Codex, OpenCode, Cline, Cursor and more.
Updated: