Prices are set per model and published on the pricing page. Rates differ by model and by provider, so always check the current rate for the model id you plan to call.
How a request is priced
Every chat completion returns ausage object. Your cost for that request is computed from those token counts and the model’s rates:
prompt_tokensare your input tokens (the messages you send), billed at the model’s input rate.completion_tokensare the model’s output tokens, billed at the model’s output rate.
The usage object
Every non-streaming completion response includes ausage object. All three fields are always present and are integers.
object
Token accounting for the request.
usage directly from the SDK response to track spend in your own app:
Streaming responses also carry a
usage object on the final chunk, so you get the same accounting whether or not you stream.Balance and deduction
Your balance is denominated in USD. When a request completes, its cost is deducted from your organization’s balance in a single atomic operation. Concurrent requests cannot race each other, and your balance is clamped at zero, so it can never go negative. When your balance is exhausted, calls to platform-billed models fail with402 and an error of type insufficient_credits:
BYOK versus platform balance
You can run requests two ways.Platform balance
Infyrence calls the provider for you and deducts the request cost from your USD balance at the model’s published rate. This is the default.
Bring your own key (BYOK)
The request runs on your own provider key. Infyrence routes it but does not charge your balance. BYOK requests cost
$0 in platform credits.Models with no published rate
Billing fails safe. If a requested model is not in the pricing catalog, the request is charged$0 rather than an unknown or default amount. A pricing gap can never overcharge you. Prices are cached briefly on the edge and refresh automatically, so newly listed rates take effect within minutes.
Where to see your spend
1
Per request, in code
Read the
usage object from each response and total it in your application.2
In the request logs
Each request is logged with its model, token counts, status, latency, and the USD charged. Use logs to attribute spend to specific calls and API keys.
3
In the dashboard
View your balance, aggregate usage, and per-model spend in the dashboard.
Next steps
Browse models and rates
List the live catalog with
GET /v1/models and look up per-model rates.Pricing page
See the current per-million-token rate for every model.