Fluxio
← Back to the blog

The Real Cost of a Live AI Token Stream

What tokens costEN

§1 A live reply starts costing before its first word

A streamed AI reply feels like a conversation: words appear, the answer grows, and you can start reading immediately. Behind that experience, the bill usually depends on tokens processed and generated, not on how long the typing animation lasts.

A token is a small piece of text. It might be a word, part of a word, punctuation, or whitespace. Token counts vary by model and language, so counting words gives only a rough estimate. To understand one response, start with two buckets: input tokens and output tokens.

§2 Input tokens include more than your latest message

Input is everything sent to the model for that request. Your question is only one part. Instructions, earlier messages, retrieved documents, and tool definitions can all contribute to the total.

Imagine asking a short follow-up in a long chat. The new question might contain only a few tokens, but the application may resend thousands of tokens of conversation history. That makes the request more expensive than its visible length suggests.

  • – System instructions can add a recurring token cost to every request.
  • – Conversation history can increase the input total as a session grows.
  • – Documents and tool results can outweigh the user's actual question.

Some services offer discounted cached input, but eligibility and rates vary. Do not assume repeated text is automatically free.

§3 Output tokens accumulate as the answer is generated

Output tokens are the model's generated response. A short answer generally costs less than a long answer at the same output rate. However, some models also account for reasoning or other billable tokens that are not displayed as ordinary reply text. Check the model's pricing rules and usage fields.

For a simple text-only example, suppose a request uses 2,000 input tokens and produces 500 output tokens. At hypothetical rates of $1 per million input tokens and $4 per million output tokens, the input costs $0.002 and the output costs $0.002. The total is $0.004, or four-tenths of one cent.

Those are illustrative rates, not a quote for any model or Fluxio. The general calculation is input tokens multiplied by their rate, plus output tokens multiplied by their rate, with any additional billable items added separately.

§4 SSE chunks are delivery packets, not billing units

Streaming often uses Server-Sent Events, or SSE, to deliver updates over an open connection. Each event may contain a text fragment, metadata, or another update. One event does not necessarily equal one token.

Counting visible chunks therefore cannot reliably measure your bill. Use the API's reported usage when available, and check whether your client must explicitly request streaming usage information.

Streaming changes when you receive the answer, not necessarily its token price. Your application may also incur separate hosting, connection, logging, or network costs while keeping the stream open.

§5 The stop button only saves tokens that never get generated

A stop button can reduce unnecessary output, but only if cancellation reaches the upstream request. Hiding the reply or closing a browser view may leave the server generating in the background.

Tokens already processed or generated can remain billable, including work completed before cancellation takes effect. Likewise, a failed connection does not guarantee a free request. Automatic retries may create additional billable attempts.

§6 Compare complete streamed requests before choosing a model

When comparing options such as Claude Haiku 4.5 and Gemini 2.5 Flash, check current input and output rates rather than assuming their costs match. Measure representative conversations, including history, answer length, retries, and any additional charges.

Fluxio fits teams that want streaming-first, pay-per-token access through one API key rather than separate integrations. Its OpenAI-style compatibility can simplify testing different models. Still, verify current pricing and usage reporting before forecasting spend.

The most useful budget metric is cost per completed user task. A cheap request that needs three retries may cost more than a successful first attempt. Track token usage alongside completion quality and latency to see the real trade-off.

Sign up for Fluxio to try token-by-token replies.

Create a Fluxio account →

More from the current