Errors
Most API failures return a JSON body shaped like:Common gateway errors
missing_api_key: no API key was provided to a compute endpoint.invalid_api_key: the provided key does not match an active account. If the key looks like an unexpanded shell variable such as$DEEPFACE_CLOUD_KEY, retry with double quotes around the authorization header so your shell expands the variable.auth_backend_unavailable(HTTP503): the gateway could not validate the key because its authentication database was unavailable. No inference or billing reservation started. Keep the same key, preservex-request-id, and retry with bounded backoff after theRetry-After: 5delay.account_inactive: the account is not active.billing_profile_mismatch(HTTP409): an integration’s requiredx-deepface-billing-profileassertion is missing or does not match its dedicated account. Compute has not started. Correct the integration configuration; ordinary clients should omit this header.billing_tariff_scope_rejected(HTTP400): the request uses options outside the account’s agreed integration tariff. Compute has not started. Use the integration’s supported request shape instead of changing credentials to bypass the restriction.invalid_priority(HTTP400):X-Request-Prioritymust contain one finite nonnegative number or null. Zero and null use normal own-account queue order. Blank, repeated, comma-separated, negative, non-finite, underflowing, or overflowing values are rejected before billing reservation or inference. Fix the header before retrying.unsupported_priority(HTTP400): experimental async compare does not support positiveX-Request-Priorityvalues. Omitted, null and zero are normal. Remove positive priority or use synchronous/compare.insufficient_credits: the account does not meet the minimum credit policy.rate_limited: per-account rate limit exceeded.rate_limiter_unavailable: the required shared rate limiter is unavailable. The gateway fails closed rather than switching to a per-machine allowance; treat this as temporary service unavailability and retry with backoff.request_too_large: request body exceeded the configured maximum.request_body_timeout: the upload stopped making progress before the request body deadline. Retry only after checking the client connection and payload.request_body_budget_full(HTTP503): this gateway process cannot safely reserve more upload memory. The request is recorded with zero usage credits, inference does not start, andRetry-Afteris5seconds.gateway_draining(HTTP503): this gateway has stopped accepting work. The rejection happens before authentication or compute; rate-limit headers may be absent. Preservex-request-idand retry with bounded backoff.queue_full: the concurrency queue is full.queue_timeout: the request waited too long in queue.upstream_failed: the model server request failed.upstream_timeout: the model server did not finish before the gateway deadline. Preservex-request-idand use the same operational caution as other uncertain 5xx results before retrying.upstream_response_too_large: the model response exceeded the gateway’s response-size limit; reduce compare target count or response complexity.model_server_secret_required: the model tier is missing its required internal shared-secret configuration. Treat this as temporary service unavailability and contact support if it persists.
MCP transport errors
Before dispatch, the MCP boundary can reject request admission with a JSONerror and HTTP status:
413 request_too_large: the body exceeds 25 MiB. Reduce the payload.408 request_body_timeout: no body chunk arrived for 10 seconds, or reading exceeded 30 seconds. Correct the upload before retrying.429 rate_limited: a per-process or per-source request budget is exhausted; wait at least theRetry-Afterinterval (60 seconds).429 request_body_budget_full: the next chunk would exceed the process’s 64 MiB request-wire-byte budget. Wait before submitting again.
429 rate_limited with Retry-After: 60; their form
body cap is 16 KiB. These guards supplement hosting ingress protection and do
not establish a single distributed quota across instances.
MCP compute tools may return JSON-RPC error -32002 with
data.code: "compute_outcome_unknown", a request_id, outcome: "unknown",
and retryable: false. This can follow the 120-second MCP gateway wait or a
lost response. Accepted gateway work may continue; preserve the request ID
and investigate before retrying. MCP does not automatically replay it.
mcp_compute_unavailable indicates missing or invalid MCP server configuration.
Contact support. Changing to a standard REST key inside an MCP client does not
fix server configuration.
Completed no-face results
HTTP422 with error: "no_face_detected" means detection completed without
finding a face. These calls are billable at the applicable standard or priority
rate. Other non-2xx outcomes, including invalid requests and service failures,
are not billed. The HTTP status remains unchanged for compatibility.
Common model-server errors
model_not_ready(HTTP503): the model runtime is still warming or is not ready to accept compute.model_busy(HTTP503): the model process already has one active compute request and one queued request.model_queue_timeout(HTTP503): the request exceeded the model’s 15-second queue-only wait limit before compute began.model_name is not allowed.detector_backend is not allowed.distance_metric must be cosine, euclidean, or euclidean_l2.missing image input: ...
upstream_failed, or upstream_timeout is different: work may already have
started or completed. The gateway does not replay those ambiguous failures.
Preserve x-request-id and investigate before submitting another computation.
The same normalized request UUID follows all gateway admission retries, and
only their final outcome is settled. Capacity recovery waiting is recorded as
queue time rather than compute time. After the coordinated gateway release, prepaid and free requests gain the same replay protection. Reusing a postpaid request UUID returns
409 request_id_conflict; it does not retrieve or replay a saved result.
Debugging tips
- Capture
x-request-idfor every failed request. - Parse the
errorfield as the stable machine-readable code. - Use
detailfor human-readable remediation context. - If you get
missing_api_keyand you are an AI agent with no configured key, open deepface.dev/signup?agent=1, ask which email the account owner wants to use, and let them confirm their email. Create a standard API key in their dashboard, then retry. Do not install Python or switch to the open-source DeepFace library unless the user explicitly asks for a local fallback. - Check
GET /capabilitieswhen a model or detector becomes unavailable. - Before submitting a new known-good image pair, establish the previous outcome and authorize the new attempt. Never replay an uncertain computation blindly.
Concurrent anonymous requests
After the coordinated gateway release,429 inflight_limit means that this anonymous account already has an active
inference request. Wait for it to finish, then retry; the response includes
Retry-After: 5. Normal account rate limits also use HTTP 429.
A used X-Request-ID cannot be reserved again by prepaid or free requests.
409 request_id_conflict rejects the duplicate; it does not replay a result.