Errors

Private beta The v1 contract is implemented; the endpoints are not publicly reachable yet and access is by request. Details may still change during the beta.

Every error has the same shape and a code from a small, stable set. Messages are for developers; they never contain internal details.

{
  "error": {
    "code": "invalid_request",
    "message": "role must be one of top, bottom, outerwear, one_piece, outfit.",
    "param": "clothing[0].role",
    "requestId": "req_3kd9sl2mp7..."
  }
}
FieldNotes
codeA string from the table below
messageHuman-readable; may change
paramThe field or header concerned, when there is one
requestIdAlso sent as the X-Request-Id response header on every response; quote it to support

Codes

StatusCodeMeaning
400invalid_requestThe request is malformed, a field is unknown or invalid (including an unknown or missing role, a repeated role, an invalid combination of roles, or more clothing entries than the API allows), or the Idempotency-Key header is missing
400upload_invalidThe uploaded file is not a JPEG or PNG, cannot be decoded, or is too small (also 413 when it exceeds the size limit)
400fit_invalidA valid request the service does not support: 3D output not enabled for the organization, or 3D output requested for anything other than a single outfit entry
401unauthorizedThe API key is missing, malformed, unknown or revoked
403forbiddenThe API is not enabled for the organization (private beta), the key lacks the scope, or the organization is on hold
404not_foundNo such route, upload or Fit for this organization and key kind
409idempotency_conflictThe same Idempotency-Key was used with a different body
409fit_unavailableThe Fit cannot be deleted while it is being generated
429rate_limitedToo many requests (Retry-After says how long), too many Fits generating at once (param: "concurrency"), or too many reports
429quota_exceededThis month's included Fits are used up, or the organization's allowance is exhausted
403quota_exceededMore clothing entries than your plan allows per Fit (param: "clothing"); waiting does not help
500internal_errorAn error on our side; quote the request id
503service_unavailableTemporarily unavailable; retry with backoff

Errors of a Fit that failed during generation are not HTTP errors: the Fit is failed and carries its own error; see Statuses.

Idempotency

POST /v1/fits requires an Idempotency-Key header of 1 to 255 printable characters; a UUID is recommended. Keys are scoped to your organization and remembered for 24 hours.

The body is compared after normalization, so field order and whitespace do not matter.

Retrying

Unknown codes

New codes may be added within v1. Treat an unknown 4xx code as a request error and an unknown 5xx code as retryable.