Skip to content

Tokens, context windows and generative AI pricing

What tokens and context windows are, how they drive cost and speed, and how on-demand, service tiers, batch and Provisioned Throughput are billed.

8 min readBy AI Guru AcademyFacts last checked

By AI Guru Academy

In short

A token is the unit of text a model reads and writes, roughly a word or part of a word. The context window is the maximum number of tokens a model can handle in one request, counting both what you send and what it writes back. On Amazon Bedrock, on-demand use of text models is billed per token, with input and output tokens priced separately, so cost grows with prompt size, answer length and request volume. Other options change the billing unit: Provisioned Throughput bills reserved capacity per model unit per hour, batch inference trades speed for a lower rate on select models, and prompt caching bills reused prompt content at a separate rate. This guide quotes no prices.

What is a token?

A token is a sequence of characters that a model treats as a single unit of meaning. Amazon Bedrock's terminology page gives examples: a token can be a whole word, part of a word with grammatical meaning such as "-ed", a punctuation mark such as "?", or a common phrase such as "a lot".

Tokens matter because on-demand text models are billed by the tokens processed, and because the context window and the maximum response length are both counted in tokens.

Models split text into tokens in different ways, so the same paragraph can be a different number of tokens on two models. Measure with the model you plan to use rather than assuming a ratio.

What is a context window?

The context window is how much information a model can consider in a single request. AWS's service card for Amazon Nova describes the context size as the maximum amount of text, measured in tokens, in a prompt and completion pair, and lists what it constrains: the length of chat history, the length of text that can be summarised, the amount of background information supplied for retrieval-augmented generation (RAG), and the number of examples in few-shot prompting.

Everything you send counts towards it, from system instructions and retrieved documents to the conversation so far, and the answer also has to fit.

A model called through an API does not remember earlier requests. AWS's prompt engineering guidance notes that models do not recall prior prompts unless the earlier interaction is included in the current prompt. So in a chat application, each new turn usually resends the history, and the input grows turn by turn. Long conversations cost more per turn and eventually reach the window limit, which is why applications summarise or trim history.

How does context engineering affect cost and quality?

Context engineering is the practice of deciding what goes into the context window for each request. AWS's prescriptive guidance describes it as designing systems that dynamically assemble the optimal set of information for an LLM to perform a task, and contrasts it with prompt engineering: prompt engineering focuses on what to ask, context engineering on what to show.

The components AWS lists include the system prompt, the user query, a user profile, memory, tool definitions and MCP servers, and knowledge bases used for RAG. Each adds tokens, so including only what the model needs helps both quality and cost.

Example (fictional): Brightwell Legal builds an assistant that answers questions about client contracts. Version one pastes every contract for the client into each prompt. Version two uses Amazon Bedrock Knowledge Bases to retrieve only the most relevant passages. Version two sends far fewer input tokens per question and gives the model less irrelevant text.

How does token-based pricing work on Amazon Bedrock?

On-demand use of text models is billed per token, and the Amazon Bedrock pricing page lists input tokens and output tokens as separate rates. You pay for what you process, with nothing to reserve in advance, and AWS's decision guide notes that on-demand inference has no idle cost, which suits variable, spiky or unpredictable traffic.

For an on-demand text workload, the bill is roughly (input tokens times the input rate, plus output tokens times the output rate) per request, multiplied by the number of requests.

Rates differ by model. AWS's model selection guidance notes that smaller models are usually faster and cheaper, while larger models might give more detailed responses, and the Nova service card advises using the smallest model that gives acceptable results for the use case. Not every model is billed by tokens: the pricing page lists some image models per image generated, for example.

Which pricing options exist besides standard on-demand?

Amazon Bedrock offers several ways to run inference, and each is billed differently. The table summarises the structures as AWS documents them. Check the pricing page for which models support each option.

Which pricing options exist besides standard on-demand?
OptionHow it is billedSuits
Standard tier (on-demand default)Per input and output tokenEveryday workloads, variable traffic
Priority tierPer token at a premium over StandardCustomer-facing work that needs the fastest response, without reserving capacity
Flex tierPer token at a discount to StandardWork that can tolerate longer processing, such as evaluations, summarisation and agentic workflows
Reserved tierFixed price for reserved tokens-per-minute capacity, billed monthly; arranged through the AWS account teamMission-critical applications that need prioritised, reserved capacity
Batch inferencePer token, priced below on-demand for select modelsLarge sets of prompts that do not need an immediate answer
Provisioned ThroughputPer model unit per hourA fixed level of throughput for a specific model at a fixed cost

Service tiers are chosen per request with an optional service_tier parameter. Requests without it go to the Standard tier.

Batch inference processes many prompts asynchronously. You upload input files to Amazon S3, submit a job, and collect the results from S3 when it finishes.

Provisioned Throughput reserves capacity in model units. AWS defines a model unit by how many input tokens it can process and how many output tokens it can generate per minute across all requests. You are billed hourly whether or not you use the capacity, and billing continues until you delete it. You can buy it with no commitment, or with a commitment period that lowers the hourly rate but stops you deleting it before the period ends. AWS's decision guide makes the general point for instance-based options: capacity that is charged whether or not it is used becomes cost-efficient only at sustained, high utilisation, and the same logic applies here.

Two related points: cross-Region inference has no additional routing cost, with the price following the Region you call from, and AWS lists global inference profiles as cheaper than geographic ones; and model customization adds training charges based on tokens processed, plus monthly storage for the custom model.

How does prompt caching change the bill?

Prompt caching lets a model reuse a long, repeated part of a prompt instead of processing it again. AWS describes it as an optional feature for supported models that reduces inference response latency and input token costs. It helps when the same long context is used for many queries, such as a set of instructions, tool definitions or a document that users ask several questions about.

With caching, input tokens fall into three groups, each billed at its own rate: tokens written to the cache, tokens read from the cache, and all other input tokens at the standard input rate. AWS notes that the cache-write rate can be higher than the standard input rate for some models, so caching saves money only when cached content is actually read again. Support for caching does not guarantee a cache hit, cached content expires after a period without use, and prompt caching is not supported with batch inference.

How do you reduce token costs without hurting quality?

Most savings come from sending and generating fewer tokens, or from paying a lower rate for work that can wait.

  1. Trim the prompt and use RAG to send only the relevant passages.
  2. Cap the answer. AWS notes that a short maximum length suits tasks such as sentiment classification.
  3. Manage chat history by summarising or dropping older turns.
  4. Pick the smallest model that passes your tests, compared on your own data with Amazon Bedrock model evaluation.
  5. Cache repeated context, with the stable part of the prompt first.
  6. Use batch or Flex for work that can wait, such as overnight report summaries.
  7. Reserve capacity only for steady, measured demand, because Provisioned Throughput bills every hour you hold it.

Key takeaways

  • The context window covers input and output; chat history is resent each turn, so input grows.
  • On-demand text inference is billed per token, with input and output priced separately.
  • Service tiers (Priority, Standard, Flex, Reserved), batch inference and Provisioned Throughput change how you pay, not what a token is.
  • Prompt caching bills cache writes and cache reads separately and pays off only when cached content is reused.
  • Cut tokens first: smaller prompts, retrieval, response limits and the smallest model that works.

FAQ

Does a bigger context window cost more?

The window itself is a limit, not a charge. You pay for the tokens you actually send and receive, but a large window makes it easy to send more tokens, which raises the on-demand bill.

Why does a chatbot get more expensive as a conversation goes on?

The model does not remember earlier requests, so the application resends the conversation history with each new message. The input tokens per turn grow unless the history is summarised or trimmed.

When does Provisioned Throughput make sense?

When you need a fixed level of throughput for a specific model and your demand is steady enough to use the capacity you pay for. It is billed hourly until you delete it, whether or not you use it.

Sources

Last checked 2026-11-22.

AI Guru Academy is an independent training provider and is not affiliated with or endorsed by Amazon Web Services. AWS service names are trademarks of Amazon.com, Inc. or its affiliates.

Next step: see the AIF-C01 course at /courses/aif-c01-exam-prep.

Tokens, context windows and generative AI pricing | AI Guru Academy