English
English
/status and read the Setting sources line.Claude Code reads settings from JSON files, and which file a setting comes from decides who it applies to:
| Scope | File | Applies to | Use it for |
|---|---|---|---|
| User | ~/.claude/settings.json | You, in every project on this machine | Personal defaults, your own permission rules |
| Project | .claude/settings.json | Everyone working in that folder | Team-wide settings — commit it so teammates get them |
| Local | project-local overrides | You, in that project | Machine-specific experiments you do not want to commit |
| Managed | organisation policy | Everyone, and nothing local overrides it | Only if your organisation centrally manages Claude Code |
The same keys can also be set per session from the command line or from the environment, and those overrides take precedence over your files. That is convenient for a one-off test, and a common source of "I changed it but nothing happened".
How to check: run /status inside Claude Code. The Setting sources line names each settings file that loaded for the current session, in precedence order. If your edit is not in that list, it is not in effect — no amount of retrying the request will change that.
This is the part worth understanding before you migrate anything.
A chat client sends one question and gets one answer. Claude Code is an agent: it reads files, calls tools, and comes back with the result, then does it again — one task can be dozens of requests, and each request carries the conversation so far. If that prefix were billed as new input every turn, agentic coding would be unaffordable at any rate.
Prompt caching is what prevents that. The stable prefix is stored, and later turns pay a cache read instead of a full fresh input. Claude Code exposes exactly this: once a session has produced its first response, it prints a prompt-cache line reporting how many requests were made, what fraction of the input came from cache, how many misses occurred, and whether the cache is warm at that moment. The /usage view breaks the same session down by model into input, output, cache read and cache write.
Two consequences follow, and they matter more than the per-token rate:
How to check: run a real task, then open /usage and read the prompt-cache line. If there is no cache line at all, the endpoint is not reporting cache tokens — and you have just found your answer about that platform.
Because the cache rewards continuity, the useful question is not "which model is best" but what shape of work am I about to hand over:
| Shape of work | What it needs | Practical rule |
|---|---|---|
| Repo-wide refactor, multi-file change, long-horizon task | Large context plus many tool turns | Keep it on one model for the whole task |
| Mechanical, high-volume edits: renames, boilerplate, test scaffolding | Cheap turns, little judgement | A cheaper tier is usually the right call — and a separate session |
| Deep single-file reasoning, architecture, tricky debugging | The strongest reasoning you can get | Use sparingly, and start a fresh session so the context is clean |
| Exploration and search: "where is this handled?" | Fast turnaround, small output | Do not spend a frontier model on it |
The practical version of this: decide the model at the start of the task, not in the middle. If you genuinely need to change mid-task, change at a natural boundary — after a commit, or after /clear — rather than in the middle of a long conversation that is currently cached.
These are the ones that show up in the session data, not opinions:
CLAUDE.md. Project rules, conventions and commands belong there rather than being retyped into the chat. A stable prefix is also a cacheable prefix./clear between unrelated tasks. Session totals reset when a new session starts, so clearing also gives you a clean cost reading per task.Everything above depends on the endpoint behaving like the API Claude Code was built against. Three questions decide whether it does:
A platform that answers all three in writing, and shows the numbers in a per-request usage record, is behaving like an endpoint you can audit. One that answers none of them is asking you to find out later.
If those reconcile, the endpoint is honest about tokens. If the platform has no per-request usage record at all, that is a more useful finding than the token counts, and it is worth knowing before you move a real workflow onto it.
| Symptom | Most likely cause |
|---|---|
| Authentication error immediately | Wrong credential for that endpoint, or the key belongs to a different group on the platform |
| 404 on every request | The endpoint only implements the OpenAI chat shape, not the Anthropic Messages API that Claude Code requires |
| Bill higher than the token count suggests | Cache misses — check the prompt-cache line before blaming the rate |
| One unusually expensive request right after a model switch | Expected: the newly selected model ingests the conversation once with nothing cached |
| Works, but the model feels wrong | The requested name is being mapped to a different model behind the endpoint. Compare responses and usage records, not labels |
| Intermittent timeouts | Routing behind the endpoint. Check whether failed requests are billed before deciding how much it matters |
Which model should I choose inside Claude Code? Choose by the shape of the work, then stay on it for the session: long multi-file tasks want large context and many tool turns, mechanical edits want a cheap tier, and hard single-file reasoning wants the strongest model you are willing to pay for. Because cached state is not shared between models, the switch itself carries a cost — so it is worth deciding once, at the start.
Can one API key be used for multiple projects? Yes. Use separate keys that share one account so you can revoke or rotate per project, and so usage stays attributable. That is usually the reason people move to an aggregator in the first place: one balance, several projects, no juggling of subscriptions.
Do I have to change my code to switch providers? No. Claude Code is not modified — only the endpoint and credential it reads. Reverting is the same edit in reverse, and /status tells you which settings source won.
Why is my usage higher than the conversation looks? Because an agent session sends the conversation again on every turn, and the tools it calls produce output you never see in the transcript. The cache line is the honest view of that: it separates what was re-sent cheaply from what was billed fresh.
Two public pages do most of the groundwork before you move a workflow: the model plaza publishes per-model rates and group multipliers without a login, and the status page shows how each group is running right now, including when it is not running well.
The English docs cover endpoint and credential setup, and the refund page states the process in writing. If you are still choosing between platforms, Is a Cheap Claude API Reseller Safe? 5 Things to Check covers the operator-level questions, and What Is an AI API Aggregator? 7 Things to Check Before You Pay starts one level up.
Ready to start calling?
Create an account, generate a key and make your first multi-model call in five minutes. One key for GPT, Claude, Gemini, Grok, DeepSeek and Chinese models.