Documentation menu

Errors

Last updated: 2026-10-22

A request that is not accepted returns a non-2xx status and a JSON error body. A rejected request creates no task and costs nothing.

{
  "error": {
    "code": "insufficient_credits",
    "message": "There are not enough available credits."
  },
  "request_id": "5b0d2f4e-1c3a-4e6b-8d7f-9a0b1c2d3e4f"
}
FieldTypeNotes
error.codestringStable, machine-readable code; branch on this.
error.messagestringHuman-readable description; may change.
request_idstringAlso in the X-Request-Id header. Include it when you contact support.

Error codes

HTTPerror.codeMeaning and what to do
400invalid_requestBody is not valid JSON, has unknown, null or duplicate fields, Content-Type is not application/json, or the Idempotency-Key is malformed. Fix the request.
401invalid_api_keyMissing, malformed or revoked API key.
402insufficient_creditsNo credits available. Buy credits or a plan.
404prediction_not_foundNo such task in this account.
404not_foundUnknown endpoint.
409idempotency_conflictThis Idempotency-Key was used with a different input. Use a new key for a new task.
413request_too_largeRequest body over 64 KiB.
422invalid_image_urlThe image URL is not an acceptable public HTTPS URL.
429inflight_limit_exceeded50 tasks of this account are already waiting or processing. Submit again when some finish.
429rate_limitedToo many queries. Retry after the Retry-After seconds.
503temporarily_unavailableTemporary failure. For a submission the task may or may not have been accepted — retry with the same Idempotency-Key and input.

A task that is accepted and later fails is not an error response: the task's status becomes "failed" and its error explains why. See Get task details.

Retries and idempotency

A timeout, a dropped connection or a 503 can leave you unsure whether a submission was accepted. Idempotency keys make retrying safe.

  • Send a unique Idempotency-Key with each image you want checked, and store it with your own record.
  • Retrying with the same key and the same input — image URL including its query string, model and policy — returns the original task with 200 OK and Idempotent-Replayed: true. No new task is created and nothing is charged, even if that task failed or your balance is now zero.
  • The same key with a different input returns 409 idempotency_conflict.
  • Keys belong to the account and are shared by all its API keys.
  • Without a key, every submission creates a new task and costs a credit, so a blind retry may charge twice.
  • Once you have a task ID, query that task instead of submitting again.