Long Context
When input exceeds a threshold the whole request is billed at long-context prices — thresholds per model, how input is counted, and which tiers apply.
For some models the official price list switches to a higher set of prices once input exceeds a threshold. UnioAPI follows the official rule exactly: if the vendor charges long-context prices for a model, so do we; if the vendor does not, neither do we. Long-context prices are listed on each model page under Models & Pricing on the website.
Rules
- Whole request: when a request's input exceeds the threshold, every price item of that request (uncached input, cache reads, cache writes, output) is billed at that tier's long-context price — not just the part above the threshold.
- How input is counted: uncached input + cache-read + cache-write tokens.
- Comparison: the total must be greater than the threshold; a total equal to the threshold is still billed at regular prices.
- Per tier: each service tier is evaluated on its own. A tier without long-context prices is not surcharged above the threshold.
Example: for a model with a 272K threshold, a request with 200K uncached input and 100K cache reads totals 300K > 272K, so its input, cache and output are all billed at long-context prices.
Thresholds and tiers by model
| Model | Threshold (total input greater than) | Tiers with long-context prices |
|---|---|---|
| gpt-6.2-sol, gpt-6.2-astra | 272K | Standard, Fast, Ultrafast |
| gpt-6.1-sol, gpt-6-astra | 272K | Standard, Fast, Flex, Ultrafast |
| gpt-6.1-terra, gpt-6-sol, gpt-6-luna | 272K | Standard, Fast, Flex |
| gpt-5.6-sol, gpt-5.6-terra, gpt-5.6-luna | 272K | Standard, Fast, Flex |
| gpt-5.5, gpt-5.4 | 272K | Standard, Flex (no Fast surcharge) |
| gpt-5.5-pro | 272K | Standard (the vendor has not published a long-context Flex price; Flex is not surcharged) |
| gpt-5.4-pro | 272K | Standard, Flex |
| claude-haiku-5-5 | 100K | Standard |
Models not in the table have no long-context surcharge:
gpt-5.4-mini,gpt-5.2,gpt-5.2-pro.- All other Claude models: one set of prices across the whole context window; Claude Fast prices also cover the whole context window.
Long context vs. the context window
Long context is a pricing band; the context window is the processing limit. Input above the
model's context window is not run and returns 400 (OpenAI shape code context_length_exceeded;
Anthropic shape message starting with prompt is too long: ) — see Errors.
Checking a request yourself
Use the input total from the response usage:
- OpenAI: Responses
usage.input_tokensand Chat Completionsusage.prompt_tokensalready are the total, including cache reads (cached_tokens) and cache writes (cache_write_tokens). - Anthropic Messages:
usage.input_tokens+usage.cache_read_input_tokens+usage.cache_creation_input_tokens.