You’ve got your workflow running smoothly in Claude Code, and now you want to switch the backend model to Ergo 1.0—only to find that what’s blocking you isn’t the code, but a handful of config settings. Which base URL to use, which token group to pick, and how high to set the output limit: get any one of these three wrong, and the error message won’t tell you the reason directly.
This isn’t a migration that requires rewriting your project. Claude Code accesses models through the Anthropic-compatible protocol, so switching models is really just changing a few connection parameters—your business code, prompts, and tool-calling chains don’t need to change. What actually takes time is figuring out two other things: how to choose the billing group on the platform side, and where the model’s hard constraints on reasoning and output length come from.
The key takeaway: By the end of this article, you’ll be able to get Claude Code up and running with Ergo 1.0 in ten minutes, understand where the ClaudeCode group saves you compared with the default group, and see why the 8192 output floor and the fact that “reasoning can’t be turned off” keep tripping people up. If you haven’t got a token yet, head over to APIYI at apiyi.com to sign up—new users get free testing credits.

Three Things to Confirm Before Connecting Claude Code to Ergo 1.0
Before you change any configuration, get the key values aligned first. The table below is the whole article in a nutshell; the four steps that follow all revolve around it.
| Configuration item | Correct value | What happens if you get it wrong |
|---|---|---|
| Model ID | ergo-1.0 |
Adding the amazon. prefix means the model won’t be matched |
| Token group | ClaudeCode (group_ratio 0.95) | Leaving it in the default group bills at 1.0x |
| Base URL | APIYI’s Anthropic-compatible endpoint | Requests still go to the official address and fail outright |
| Output limit | At least 8192 | Long responses get cut off halfway |
| Reasoning switch | Keep it on | Setting effort to none returns a 400 |
Ergo 1.0’s Model ID Is Just ergo-1.0
The model ID registered in the pricing API is ergo-1.0, with no extra prefix. Many people come over from AWS’s model card page and reflexively copy the amazon. prefix into their config, only to send a request that doesn’t match any model. The model card page uses Bedrock’s naming system; model IDs on an aggregation platform are written another way, and the two can’t be mixed. When you enter the model name, write ergo-1.0 exactly as-is—one extra prefix is wrong, and one missing character is wrong too.
Ergo 1.0 Offers Both Anthropic and OpenAI Interfaces
The pricing API’s supported_endpoint_types field lists both anthropic and openai. What that really means is that the same model has two ways to connect: Claude Code takes the Anthropic-compatible route, while your own scripts use the OpenAI SDK on the chat completions route. Both routes share the same token and the same billing. For people already using Claude Code, this means you don’t need two separate accounts for the command-line tool and your business scripts. That’s exactly the kind of unified entry point APIYI (apiyi.com) provides here: one API key covers both types of calls, and the only switching cost is the model name on that one line.
What Does the 1M Context Window Solve?
The 1M context window mentioned in the title isn’t about “being able to cram in more words” in day-to-day coding—it’s about fitting all the relevant modules into a single request at once. Changing one interface often touches three or four files. If the model can only see part of them, the solution it gives you will plant inconsistencies somewhere else, and you won’t discover them until the build fails. When the context is long enough, the model can judge the scope of the change based on the full call chain, saving you those back-and-forth rounds of adding context.
One caveat: a long context doesn’t mean you should just dump everything in. Unrelated files only dilute the model’s attention and drive up input costs. A safer approach is to state the change goal first, then attach the few files that are actually relevant—not throw the entire repository in at once.

Four Steps to Connect Claude Code to Ergo 1.0
The whole configuration breaks down into four actions, and don’t mix up the order: grab the token first, then change the address, then fill in the model, and finally raise the output limit. The first two steps determine whether the request can go out at all; the last two determine whether what comes back is actually usable.
| Step | Where to change | What to fill in | How to confirm it’s right |
|---|---|---|---|
| 1 | Console token management | Set group to ClaudeCode | Token list shows group as ClaudeCode |
| 2 | Anthropic variable in the docs (base URL item) | APIYI’s compatible base URL | Requests no longer point to the official domain |
| 3 | Anthropic variable in the docs (model item) | ergo-1.0 |
No more “model does not exist” errors |
| 4 | The output limit item | At least 8192 | Long answers no longer get cut off midway |
Step 1: Create a Token in the ClaudeCode Group
Log in to the apiyi.com console, go to token management, create a new token, and select ClaudeCode for the group — don’t leave it on the default group. The group determines your billing multiplier: ClaudeCode’s group_ratio is 0.95 while default is 1, so the same call volume on the ClaudeCode group is billed at 95%. You won’t notice this difference at all during debugging — a few hundred calls a day only amounts to a few cents — but once your daily call volume ramps up, it turns into real money.
Once the token is created, copy out the Key; all the later configuration uses this one. While you’re at it, give the token a recognizable name, like “claude-code-ergo”, so you can match it to its source at a glance when you’re later digging through billing.
Step 2: Point the base URL at APIYI’s Anthropic-compatible endpoint
Claude Code talks to models through the set of Anthropic environment variables described in the docs, and the base URL entry needs to be set to https://api.apiyi.com. The easiest way to trip up here is copying online tutorials word for word: different installation methods and different versions of Claude Code don’t read environment variables in exactly the same order, so hardcoding one name can actually send you down the wrong path. For the exact spelling, go by the Claude Code docs (docs.apiyi.com). The same group of variables also includes a token entry — put the API key you copied in the previous step there.
Once you’ve made the change, restart the terminal or reload the environment variables so the new values actually take effect. People skip this step all the time, and the result is that you’ve edited the config file correctly but the running process is still using the old address — so you end up suspecting the API key and going in circles for nothing.
If you have other scripts that go through the OpenAI-compatible route, fill in the path as the docs describe it, and don’t mix the addresses from the two compatibility modes. The same API key can serve both kinds of calls, but the address formats differ — mix them up and you’ll get a 404.
Step 3: Set the model name to ergo-1.0
Enter the model as ergo-1.0 exactly, with no amazon. prefix and no version suffix of any kind. This step has no ambiguity in itself — all the pitfalls are in the prefix. When you get it wrong, the symptom is usually an explicit error rather than a silent failure, so if you see “model does not exist,” go back and check whether you added a couple of extra characters.
Step 4: Set the output limit to at least 8192
Bedrock’s coding tool documentation states that the output limit should be at least 8192, and this one is especially critical for Claude Code. In a single run it may need to produce an entire refactored file, or a diff spanning multiple files. If the limit is set too low, the model will stop halfway through writing — what you see is an incomplete chunk of code rather than a clear error. This is the biggest time sink of all, because it’s hard to tell whether the model didn’t think it through or the output just got truncated.
So this isn’t an optional tuning parameter — it’s a required field. After setting it to 8192, keep an eye on the actual output length. If it’s often bumping right up against the limit, that means the task should be broken up, not that you should keep raising the ceiling.
Tip: If you don’t have a token ready yet, you can first use APIYI apiyi.com’s free trial credits to get the whole pipeline working — confirm that the base URL, model name, and output limit are all correct — then switch over to your production key. That way, even if something goes wrong, you’ll know it’s a configuration issue and not a credit issue.

Two hard constraints of Ergo 1.0: reasoning can’t be turned off, and a lower bound on output
Once you start using Ergo 1.0, two things won’t match the habits you’ve built up on other models. Knowing them early saves you a lot of “did I misconfigure something?” self-doubt.
Ergo 1.0’s reasoning can’t be disabled — setting effort to none returns a 400
The official coding tool docs state it plainly: reasoning can’t be turned off, and setting effort to none returns a 400. That runs counter to what many people expect from a “fast mode.” Most models let you dial down thinking intensity to gain speed, but Ergo 1.0 doesn’t open that door in coding scenarios.
The practical consequence is that you can’t cut time-to-first-token by disabling reasoning. If you want speed, you have to attack it from somewhere else: shrink the context you feed in at once, reduce back-and-forth tool calls, and hand repeated file-reading operations off to the cache. Looked at another way, this constraint also explains why the cache-read price is as low as $0.03 per million tokens. Reasoning is always running, so the cost-optimization headroom lands on “don’t let the model re-read the same content” rather than “make it think less.”
One more thing worth saying up front: when you see a 400, don’t keep tweaking parameters trying to work around it — that’s not a configuration error, it’s a restriction on the model side. Switch it back to the enabled state and the problem goes away on its own.
Ergo 1.0’s billing structure and group comparison
The pricing endpoint at APIYI apiyi.com doesn’t give out many numbers, but they’re enough to work out the cost structure clearly.
| Item | Value | Meaning |
|---|---|---|
| Input price | $1 per million tokens | The context you feed in is billed at this rate |
| Output price | $3 per million tokens | The output unit price is 3x the input |
| Cache-read price | $0.03 per million tokens | Reusing existing context costs almost nothing |
| ClaudeCode group multiplier | 0.95 | Settled at 95% |
| default group multiplier | 1 | The default when no group is specified |
The thing to remember most from this table is the 3x relationship: input is cheap and output is expensive, so it pays to have the model read more rather than write more. The value of long context lands right on this price gap — feeding a whole module in at once and having the model get it right in one pass based on complete information saves far more than repeatedly asking follow-up questions and repeatedly rewriting. If it doesn’t get it right and you have to start over, what you burn isn’t just the output cost, but also your time.
Another common misunderstanding is that the output ceiling equals the bill. The ceiling is just a cap; you’re charged for the tokens actually generated. Raising the ceiling above 8192 won’t magically cost more — instead it helps you avoid retries caused by truncation. What you really should watch is the cache hit rate: when it’s high, the cost of repeated context is almost negligible.
Claude Code + Ergo 1.0 FAQ: Common Issues
When things don’t line up, run through this table first — most problems can be pinned down in under thirty seconds.
| Symptom | Most likely cause | Fix |
|---|---|---|
| Returns 400 saying the effort isn’t supported | Reasoning was set to none | Turn the reasoning switch back on; don’t try to disable it |
| Says the model doesn’t exist | Model name has the amazon. prefix |
Change it to ergo-1.0 |
| Output gets cut off midway | Max output is below 8192 | Raise it to 8192 or higher |
| Requests never go out at all | Base URL wasn’t changed and still points at the official address | Point it at APIYI’s compatible base URL |
| Bill is higher than expected | Token was created in the default group | Create a new ClaudeCode group token |
Q1: How is Ergo 1.0 actually invoked inside Claude Code?
Claude Code sends requests over the Anthropic-compatible protocol, and as long as the model ID matches, the platform routes them to Ergo 1.0. On the client side you only need three things: a ClaudeCode group token, a base URL pointing at APIYI, and the model name `ergo-1.0`. With all three in place, nothing on the application side needs to change.
Q2: Why can’t the model ID be written as amazon.ergo-1.0?
Because that’s a different naming scheme. Bedrock model card pages use the `amazon.` prefix to identify models they host themselves, while the ID registered in the aggregation platform’s pricing API is `ergo-1.0`. Each system is valid on its own terms, but mixing them means the model won’t be matched.
Q3: What’s the difference between the ClaudeCode group and the default group?
Only the billing multiplier. ClaudeCode’s group_ratio is 0.95, and default is 1 — the same token consumption settles at 95% under the former. There’s no functional difference: models, endpoints, and rate limits are all unaffected, so there’s no reason to stay in the default group.
Q4: What exactly are the environment variables called?
This article deliberately doesn’t list variable names. Different versions and installation methods of Claude Code don’t read exactly the same set of environment variables, and hardcoding a single name is more likely to mislead readers. You just need to remember the mapping: the base URL slot, the model slot, and the token slot correspond to the Anthropic-compatible variables in the docs — check the Claude Code documentation for the exact spelling.
Q5: Why does setting effort to none return a 400?
The official coding tool documentation states plainly that reasoning can’t be turned off — an effort of none returns a 400 outright. That’s a hard constraint of the model, not a configuration error. Don’t keep retrying it; just turn reasoning back on.
Q6: Does setting a smaller max output save money?
No. The limit is just the maximum allowed output length, and you’re billed for the tokens actually generated. The only consequence of setting it low is that long code gets truncated and you have to retry — and that retry ends up costing more.
Q7: How do I quickly get a token I can actually use?
Just register in the APIYI console and create a ClaudeCode group token. New users get free testing credits, which are enough to verify all three items: base URL, model name, and max output. Use the free credits during validation, then swap in your production key for the real integration — that’s the least painful order.
Key Takeaways: Connecting Claude Code to Ergo 1.0
- Model ID: Use
ergo-1.0, without theamazon.prefix — this is the most common source of errors. - Token group: Choose ClaudeCode, group_ratio 0.95 — 5% cheaper than the default value of 1.
- Base URL: Change it to APIYI’s Anthropic-compatible endpoint; use the variable names specified in the Claude Code documentation.
- Max output: At least 8192 — this isn’t a tuning option; below it, long code gets silently truncated.
- Reasoning toggle: You can’t turn it off; setting effort to none returns 400. If you want more speed, you’ll have to look at context and tool calls instead.
- Cost structure: Output is priced 3x higher than input, and cache reads cost only $0.03 per million tokens — reading more and writing less is the better deal.
- Quick verification: Use APIYI apiyi.com’s free quota to get the pipeline working first, then switch to your production key.
Summary
When connecting Claude Code to Ergo 1.0, there are really only three things you need to remember: write the model name as ergo-1.0, use the ClaudeCode token group, and keep the max output at 8192 or above.
- Align the values first: The model ID, group, base URL, and max output must all be locked down before you touch the config. Get the order wrong and troubleshooting costs double.
- Then understand the constraints: Reasoning can’t be disabled, and output has a floor of 8192. Both are model-side limitations, not config options you can work around.
- Finally, look at cost: Output costs 3x input, and cache reads are nearly free. Using long context well is how you save money.
Once it’s set up, if you want to verify how it performs across different invocation styles, APIYI apiyi.com is the fast way to check — the platform offers a unified compatible interface and free quota, and switching models only requires changing a single model name.
References
- APIYI pricing API: The source for model IDs, group ratios, and price data
- Link:
apiyi.com - Notes: Query
ergo-1.0‘s supported_endpoint_types, group_ratio, and input/output pricing
- Link:
- AWS Bedrock Model Card – Amazon Ergo 1.0: Official capabilities and constraint documentation
- Link:
docs.aws.amazon.com/bedrock/latest/userguide/model-card-amazon-ergo-1-0.html - Notes: Reasoning can’t be disabled, effort set to none returns 400, and the minimum output of 8192 all come from the coding tool documentation
- Link:
- Claude Code documentation: The Anthropic-compatible variable list
- Link:
docs.apiyi.com - Notes: The specific variable names for base URL, model, and token settings are authoritative here
- Link:
Author: APIYI Technical Team
Technical discussion: Feel free to contact us via the APIYI homepage. The Claude Code documentation has the complete variable list and integration examples.