Skip to contentLaunch price until December 31 · 45 days left

Errors

Every error has the same shape and a stable code. Branch on the code, show the message.

Error shape

{
  "error": {
    "code": "insufficient_balance",
    "message": "Your balance is too low for this order.",
    "hint": "Top up in the dashboard.",
    "retryable": false,
    "price": "2.50",
    "available": "1.20",
    "top_up_url": "https://tikiapi.com/dashboard/billing",
    "request_id": "…",
    "docs_url": "https://tikiapi.com/docs/errors/insufficient_balance"
  }
}
  • retryable: true means the same request may work if you send it again later.
  • path (on invalid_parameter) names the field, for example duration.
  • request_id helps us find your request if you contact support.

Request errors

HTTPCodeWhat to do
400invalid_jsonThe body isn't valid JSON. Check quotes and commas.
400invalid_requestThe request doesn't match what the endpoint takes.
400invalid_parameterA field is missing or wrong. path names the field, hint says what is expected.
400variant_not_availableThe model isn't sold with these settings, for example this resolution. See its prices in GET /v1/models.
401invalid_api_keyThe key is missing, wrong or revoked. Send Authorization: Bearer tk_…
401expired_api_keyThe key has expired. Create a new one in the dashboard.
401invalid_tokenMCP only: the app's sign-in token is expired, revoked or meant for another server. Connect the app again.
402insufficient_balanceThe balance doesn't cover this order. The error includes price, available and top_up_url.
403missing_scopeThe key isn't allowed to do this. Create a key with the right permissions.
403ip_not_allowedThe key can't be used from this IP address.
403origin_not_allowedThe request came from a web page. Call the API from your server.
403account_suspendedThe account can't use the API right now. Contact support.
404not_foundThere's no such object, or it belongs to another account.
404model_not_foundThere's no model with this id. See GET /v1/models.
409idempotency_key_reusedThis Idempotency-Key was used for a different request. Use a new key.
409not_cancelableThe order has already finished.
413payload_too_largeThe request body is too large.
429rate_limitedToo many requests. Wait for the seconds in Retry-After and send again.
429key_limit_reachedThe key has reached its spending limit. The error includes remaining.
500internalSomething went wrong on our side. Send again; if it repeats, contact support with the request_id.
503model_unavailableThe model isn't available right now: it is switched off, or no provider can take these settings (then hint and path name the one to change). See GET /v1/models.

Generation errors

When an order fails, its status is failed and error.code says why. Nothing is charged for a failed order.

CodeMeaning
content_refusedThe request isn't allowed by the model's or our content rules.
input_refusedThe model refused one of the reference images.
bad_input_fileA reference image couldn't be read. Check that the link is public and is an image.
prompt_too_longThe prompt is too long for this model.
timed_outThe model didn't finish in time. If the result arrives later, you get it free.
provider_unavailableThe model is unavailable right now. Try again in a few minutes. A hint, when there is one, names a setting that lets more providers take the order.
canceledYou canceled the order.
sandbox_failureA test key order with the word fail in the prompt. Use it to test your error handling.