The Amazon Ergo context window
The Amazon Ergo context window is 1,048,576 tokens, and the model can write up to 131,072 tokens in one reply. That is enough room for a whole repository or a book-length document in a single request. This page covers how to get the full window in your client, what a large prompt costs, and how the model's always-on reasoning uses the output budget.
Calling the hosted API needs an ergo_live_ key. Grab one → Creating a key is free; calls draw on prepaid credits (packs from $5). Ergo Model is an independent service, not affiliated with Amazon or AWS.
The numbers
| Model | Context window | Max output | Input / 1M tokens | Output / 1M tokens |
|---|---|---|---|---|
ergo-1.0 | 1,048,576 tokens | 131,072 tokens | $1.50 | $4.50 |
Prices are for our hosted API. The window itself is a property of the model: Amazon describes it as 1M tokens of context and 128K of output, and Amazon Bedrock endpoints list the context as 1,048,568 tokens. Input is text only — there is no image input.
How big is 1,048,576 tokens?
As a rough rule of thumb, one token is about ¾ of an English word, so the window holds on the order of 750,000 words. In coding terms that is a mid-sized repository, several long design documents or a large log file in one request, without a chunking or retrieval step in between. The 131,072-token output limit is similarly large: long enough for a multi-file patch or a full report in one reply.
Input and output share the window. A prompt that fills nearly all of it leaves little room for the answer, so keep the prompt plus your max_tokens under the limit.
Getting the full context window in your client
A client that registers Ergo as a custom OpenAI-compatible model has no built-in entry for it, so it may assume a smaller window than the model has and trim or refuse long prompts. The fix is to declare the limits yourself: context 1048576, output 131072.
opencode
Add a limit block to the model entry in your opencode config so it plans around the real Amazon Ergo context window:
{
"$schema": "https://opencode.ai/config.json",
"provider": {
"ergomodel": {
"npm": "@ai-sdk/openai-compatible",
"name": "Ergo Model",
"options": {
"baseURL": "https://ergomodel.net/api/v1",
"apiKey": "{env:ERGO_API_KEY}"
},
"models": {
"ergo-1.0": {
"name": "Amazon Ergo",
"limit": { "context": 1048576, "output": 131072 }
}
}
}
},
"model": "ergomodel/ergo-1.0"
}Full walkthrough on the opencode integration page.
LlamaIndex and other OpenAI-compatible clients
The same rule applies anywhere you add the model by hand. In LlamaIndex it is the context_window argument on OpenAILike:
import os
from llama_index.llms.openai_like import OpenAILike
llm = OpenAILike(
model="ergo-1.0",
api_base="https://ergomodel.net/api/v1",
api_key=os.environ["ERGO_API_KEY"], # ergo_live_...
is_chat_model=True,
context_window=1048576, # declare the full window
max_tokens=8192, # reasoning comes out of this budget
)Clients that read a model list can take the number from our public endpoint, which returns the model with its context length and prices:
# public, no key needed: returns the model with its context length and prices
curl https://ergomodel.net/api/v1/modelsSetup for other tools is on the Cline, Cursor and integrations pages.
Not every provider serves the full window
The Amazon Ergo context window depends on who hosts the model. On OpenRouter, where the model is listed as amazon/ergo-1.0, one provider (Featherless) caps context at 262K. If a request is routed there, a long prompt will not fit even though the model supports 1M.
Our endpoint reaches the model through OpenRouter and is pinned to providers that serve the full 1M context; the 262K provider is excluded. If you use OpenRouter directly, check the context length of the provider your request lands on.
What a large context costs
The hosted API bills input at $1.50 per 1M tokens and output at $4.50 per 1M tokens, with reasoning counted as output. A large prompt is a real, measurable cost:
- A 100,000-token prompt costs $0.15 of input (100,000 ÷ 1,000,000 × $1.50).
- A 500,000-token prompt costs $0.75; a full 1,000,000-token prompt costs $1.50 — before any output.
- Output is separate: 2,000 output tokens cost $0.009, and a reply that uses the full 8,192-token budget costs about $0.037.
- Agent loops multiply the input. An agent that resends a 200,000-token context on each of 50 turns sends 10,000,000 input tokens: $15.00. Cached input is billed at the normal input rate here, so there is no discount for the repeated prefix.
Treat the window as a ceiling, not a target: send the context the task needs. Amazon Bedrock and OpenRouter list the model at lower per-token prices (and Bedrock has a discounted cache-read rate); the API provider comparison and our pricing page have the full numbers.
Reasoning tips for long prompts
- Ergo always reasons before it answers, and this cannot be turned off. Reasoning tokens come out of
max_tokensand are billed as output. - Give it room. With a small
max_tokens(for example 300) the reply can come back with empty content andfinish_reason: "length". Use at least 2048 for short answers; AWS's own guidance is an output limit of 8,192 or higher. - To spend less on thinking, send
"reasoning": {"effort": "low"}or cap it with"reasoning": {"max_tokens": N}. Usemediumorhighfor hard, long-context tasks. - One large request uses one slot of the 30 requests/minute per-key limit. Details on the rate limits page.
FAQ
How big is the Amazon Ergo context window?
1,048,576 tokens, usually written as 1M. Amazon Bedrock endpoints list 1,048,568. The maximum output is 131,072 tokens (128K), and reasoning tokens count toward that output.
Why does my client use less than the full window?
Usually because of a client default. A tool that registers the model as a custom OpenAI-compatible provider has no built-in entry for it, so it may assume a smaller window. Declare it yourself: context 1048576 and output 131072 in opencode's limit block, or context_window=1048576 in LlamaIndex. If you call the model through OpenRouter directly, also check the provider: one provider there (Featherless) caps context at 262K.
Does a bigger context cost more?
Yes. Input is billed at $1.50 per 1M tokens on our hosted API, so a 100,000-token prompt costs $0.15, a 500,000-token prompt $0.75 and a full 1,000,000-token prompt $1.50, before output. Cached input is billed at the normal input rate, so resending the same large prompt costs the same each time.
Can I send images or PDFs into the window?
No. Amazon Ergo is text in, text out with no image input. Convert documents to text before sending them.
Can I try the full window in the free playground?
No. The free browser playground accepts up to 12,000 characters of input and returns up to 3,072 output tokens. The full window is available through the hosted API with an ergo_live_ key and a prepaid balance.
See also: What is Amazon Ergo · OpenAI-compatible API · opencode · Rate limits · Pricing
Put the full context window to work
Create a key, point your OpenAI client at Ergo Model and send the whole repository in one request. Short prompts can be tried in the free playground first.