API Docs
Platform Guides

Billing & Usage

Where the sale price comes from, which items are billed, where each billing rule is documented, and the most common invoice questions.

Billing basics

  • Sale price = official price × the model's discount. Official prices come from the public OpenAI and Anthropic price lists; the current official price, sale price and discount of every model are on Models & Pricing. Prices are in USD per 1M tokens.
  • Billed at request-time prices: each request is billed at the prices in effect when it was made; later price changes do not affect past requests.
  • Every real model call produces one request record; invoices follow request records and their usage details. See Usage & billing records for how to reconcile them.
  • A model labeled "reference price" on the website uses a price that is not the vendor's published official price, and its discount is computed against that reference price.

Price items

ItemMeaning
Uncached inputInput tokens that did not hit the cache
Cache readsInput tokens served from the cache
Cache writes30-minute / 12-hour for OpenAI, 5-minute / 1-hour for Anthropic
OutputIncludes reasoning (thinking) tokens

Each model has one set of prices per service tier and per context band; a request falls into exactly one set.

Billing rules

  • Service Tiers: OpenAI Fast and Ultrafast are billed at the dispatch tier. OpenAI Flex and Anthropic Fast still follow the tier reported by the model service. Find the billed tier in your request logs.
  • Long Context: above the threshold the whole request is billed at long-context prices, per tier.
  • Caching & TTL: cache writes are priced per lifetime; when usage only reports the write total, it is billed at the shortest lifetime.
  • US-only Inference: on Claude models that support it, every price item × 1.1, only when you send inference_geo: "us".

Common questions

I sent one message — why are there multiple billed requests?

One operation in an agent tool is often several real model calls behind the scenes: understanding the task, reading files, planning edits, calling again after tool execution… Some clients also retry or split long work. You see one operation; billing records every call that actually happened.

I requested the Fast tier — why was it billed as Standard?

If UnioAPI cannot dispatch an OpenAI request at Fast, it falls back to Standard on the same model and bills at Standard. If it dispatches at Fast, it bills at Fast even if the response reports default. The same rule applies to Ultrafast. Anthropic Fast still uses the usage.speed report. You are not charged for an accelerated tier unless you explicitly request it. See Service Tiers.

Are failed requests billed?

  • Requests rejected before running (such as a 400 validation error, 401, 402, 404 or 429) are not billed;
  • Requests that fail before producing output are not charged, and any hold is released;
  • A stream interrupted midway is billed for the output already delivered; the usage detail is authoritative.

Why is my usage higher than expected?

Common causes: a higher-priced model; hidden calls made by the client around the visible action; more output (including reasoning) tokens than expected; longer sessions carrying more context; input above the long-context threshold.

To reduce usage:

  • Start a new session once old context is no longer needed;
  • Use smaller models for simple tasks (e.g. gpt-5.6-luna, claude-haiku-5-5);
  • Put stable instructions at the start of the prompt so they hit the cache — see Caching & TTL;
  • Avoid letting agents read the whole project unnecessarily.
StatusMeaningAction
402Insufficient balance; in the OpenAI shape also an API key that reached its spend limitTop up in the console, or raise the key's spend limit
400 (Anthropic shape)API key reached its spend limitRaise the key's spend limit in the console
429 (with Retry-After: 1)Balance is positive but temporarily held by in-flight requestsRetry shortly

See Errors for the full list.

When to contact support

Contact [email protected] with the request time, model ID, and the X-Request-ID response header if:

  • You see requests you did not make;
  • A billed model clearly differs from what you configured;
  • The actual deduction is far from the usage detail.