DocsAPI reference

API errors

HTTP status codes and the JSON error envelope returned by every failure.


Every error response uses a stable JSON envelope:

{
  "error": "plan_required",
  "required": "pro",
  "message": "The synthetic data API is available on Pro and above."
}

The error field is a stable machine-readable code; message is human-friendly and may change wording across releases. Some codes include extra fields (required, used, limit, supported, min, max, got) — the per-endpoint pages list which.

Status code catalog

HTTPerrorWhen
400invalid_countData API: count is not an integer 1–100.
400invalid_seedAvatar API: empty or > 128 chars.
400invalid_styleAvatar API: unknown style. Response includes supported.
401unauthorizedMissing Authorization header on the Data API.
402quota_exceededData API: plan's monthly quota is used up. Response includes used and limit.
403pat_requiredData API: token isn't an sk_live_* PAT.
403plan_requiredData API: org is on Free. Response includes required: "pro".
404unknown_datasetData API: path segment isn't a supported dataset. Response includes supported.
404not_foundData API single-item endpoint with no matching id.
405method_not_allowedNon-GET method.
500internalOur fault. Please report.
503service_unavailableBrief outage; retry with backoff.