Skip to content

Billing outcomes

Money is counted in tokens, the unit the app shows. Every paid request is quoted first: the quoted maximum is reserved before work starts and is never exceeded.

Outcome Charged Notes
completed At most cost.quoted_max cost.charged is final once cost.final is true.
failed Nothing Failed work is free. The generation ID stays the same when a failed attempt is retried automatically.
canceled before dispatch Nothing The reserved tokens are released.
canceled after dispatch At most cost.quoted_max Work already sent to a model host may still finish, and is then charged within its quote.
Late result Nothing A result that arrives late is delivered free.

Every refusal is free: an error response means nothing was started or charged by that request.

Code Status Charged Retry can help
invalid_json 400 No No
invalid_request 400 No No
idempotency_key_invalid 400 No No
authentication_required 401 No No
api_key_invalid 401 No No
access_token_invalid 401 No No
insufficient_balance 402 No No
spending_limit_reached 402 No No
max_cost_exceeded 402 No No
insufficient_scope 403 No No
spending_not_authorized 403 No No
spending_limit_changed 403 No No
consent_required 403 No No
project_not_shared 403 No No
account_restricted 403 No No
account_suspended 403 No No
account_read_only 403 No No
age_confirmation_required 403 No No
content_blocked 403 No No
limit_reached 403 No No
forbidden 403 No No
not_found 404 No No
model_not_found 404 No No
route_not_found 404 No No
method_not_allowed 405 No No
idempotency_key_reused 409 No No
request_in_progress 409 No Yes
outcome_unknown 409 No Yes
idempotency_key_expired 409 No No
quote_expired 409 No No
quote_used 409 No No
price_changed 409 No No
media_not_ready 409 No Yes
conflict 409 No Yes
access_revoked 410 No No
request_too_large 413 No No
unsupported_media_type 415 No No
parameter_missing 422 No No
parameter_invalid 422 No No
parameter_unknown 422 No No
media_invalid 422 No No
media_fetch_failed 422 No No
rate_limited 429 No Yes
internal_error 500 No Yes
model_unavailable 503 No Yes
model_unavailable_in_region 503 No No
service_unavailable 503 No Yes

See Pricing and quotes and Spending limits.