Multi-model capabilities and prices
Live routes are enabled per workspace. Read your ownGET /v1/models for IDs, input/output/cache rates, discounts and price_version; do not apply the GPT 5.4 Mini example prices or limits below to other models. Most integrated text models allow up to 128,000 output tokens and default to 32,000 (Gemini 3.1 Pro Preview and Gemini 3.6 Flash: at most 65,536); DeepSeek V4 Pro, GLM 5.3 and Kimi K3 default to and allow at most 4,096; check SSE and reasoning support in capabilities. Holds use a request-sized input bound capped by that model’s input ceiling, the requested output limit and current customer prices; validated usage determines the final charge. Public catalog visibility is not key permission. See List models.
GPT 5.4 Mini charge and reservation example
Thegpt-5.4-mini endpoint is available only in explicitly enabled
workspaces. At full price, its frozen customer rates are:
This model has no fixed per-request fee.
prompt_tokens includes cached
reads/writes; completion_tokens includes reasoning. Bill each token once:
prompt_tokens_details.cached_tokens are charged at the cache-read rate, not
treated as uncached input. Total usage and nonnegative partitions are validated;
unknown usage dimensions prevent automatic settlement. The endpoint accepts only
reasoning none, injected when omitted, and does not expose reasoning text.
Round the whole request up once to integer micro-USD, then apply the frozen
workspace/model discount and round up to integer micro-USD again. A model-specific
discount replaces the workspace discount rather than stacking. Live discovery
shows base rates plus discount/customer_discount_bps; do not assume the input
and output base rates have already been discounted. The final charge depends on
the model’s verified usage and the workspace’s active customer prices.
Before executing the request, this endpoint holds an input bound plus the requested
output ceiling independently. Since 2026-10-07 the input estimate is a third of the
UTF-8 byte length of the request sent to the model provider plus 4,096 tokens of fixed overhead, priced
at the uncached input rate and capped by the 400,000-token input ceiling. It is an estimate,
not a token count: when verified usage costs more, the difference is charged only if the
total is at most twice the hold and the wallet, key budget, member limit and platform capacity
all cover it; otherwise the request stays pending reconciliation. Default output is 64 tokens,
with a service maximum of 256. The maximum hold depends on current workspace prices.
A short prompt still needs available wallet/key budget for its hold.
It is not a fixed fee or measured prompt usage.
Final validated usage settles the actual charge and releases unused money.
The model context remains 400,000 tokens; a reservation does not increase context capacity.
Failures, timeouts, cancellations or missing valid final usage after dispatch can
leave the hold pending for review. Retain your X-Request-ID; the error code tells you whether
the call was charged (see Errors), and support can confirm a single call by its ID.
Image models
Image models (gpt-image-2, gpt-image-2.5) are called with Create images and Edit images (guide: Image generation and editing) and are priced per image, not per token. The requested size sets the tier for every image in the call:
quality does not change the price. Your discount applies as for text models, and GET /v1/models shows each tier’s price for your workspace under pricing.per_image (micro-USD). A call reserves n images at its tier and settles only the images returned. A refused call (bad parameter, rate limit, a provider refusal) is not charged. A call that times out or fails after it was sent (error image_call_held) is held for review and charged only if the provider produced the images, because the provider bills a finished image either way. Images are returned as b64_json only; response_format: "url" is refused before any charge. A call that has not finished after about 25 seconds answers 200 at once and sends spaces until its JSON body arrives, which keeps proxies from closing the connection; read the body before checking for an error object.
Video models
Video models (doubao-seedance-2-0-260128) run as background tasks through the video task API and are priced at USD 25 per million output tokens. A task generates width × height × (24 × seconds + 1) / 1024 output tokens: a 5-second 480p 16:9 clip is 50,638 tokens, about USD 1.27. Submitting holds the cost of the largest frame at the requested resolution and duration plus 10%; a successful task settles the tokens actually generated, and failed, expired or cancelled tasks release the whole hold. A task that cannot be confirmed when it is submitted (error video_submit_held) is held for review and charged only if the video was generated. Your discount applies as for text models, and GET /v1/models shows the price for your workspace under pricing.output (micro-USD per million tokens).
Balance and ledger
- Settled charges are linked to request records and the internal settlement ledger; they are shown in Usage rather than the visible funds ledger. A budget rejection before dispatch incurs no call charge.
- Live calls can return
402 inference_budget_or_access_deniedwhen available funds, key budget or service access cannot satisfy the request; the request has not executed. - A person with a member budget fails with
402 member_budget_exceededonce the period’s cap is reached. - Rejected requests before dispatch are not charged. A failed live call after dispatch can retain a hold and later be settled from validated usage and charges.
Member budgets
An administrator can cap what one person spends per day, week or month (UTC calendar periods; weeks start on Monday). The cap covers every API key that person holds and their playground calls, whichever balance pays.- Spend in a period is the settled cost of their requests plus any live holds still open, so concurrent calls cannot all squeeze under the cap.
- A call that would go over fails with
402 member_budget_exceededbefore reservation and request execution, and is recorded as a failed request. - Calls that cost nothing, where the configured workspace call is free, are never blocked by the cap.
- The next period starts fresh; nothing needs resetting.