Errors

Every error from the API — REST, the GET render URL, MCP — has the same shape, and API errors carry a stable code you can branch on. Messages are written for people and may change; codes never do. A few errors raised before a request reaches its endpoint (an unknown URL, some sign-in and not-found answers) have no code: fall back to the HTTP status for those.

Response shape

{
  "status": 402,
  "statusMessage": "Payment Required",
  "message": "Not enough credits for this action — upgrade your plan or buy add-on credits.",
  "data": {
    "code": "CREDITS_EXHAUSTED",
    "title": "Payment Required",
    "message": "Not enough credits for this action — upgrade your plan or buy add-on credits."
  }
}
  • status — the HTTP status, repeated in the body.
  • data.code — the stable identifier. Branch on this when it is present; otherwise use status.
  • message — what went wrong, for a log line or a support ticket. Some codes add fields beside code: validation errors carry data.fieldErrors (field → messages) and data.in (body / query / params); a bad brandVariant lists the unknown and known ids; an unknown nodeId or variation echoes the value.
  • Binary responses (raw: true, GET render) still answer errors as JSON with this shape — check the status before treating the body as a file.

Rate-limited responses (429) carry Retry-After (seconds): retry after that long (Rate limits); everything else is a fixed condition until you change the request, the key or the space.

Handling errors

const res = await fetch(url, { method: "POST", headers, body });
if (!res.ok) {
  const err = await res.json();
  switch (err.data?.code) {
    case "CREDITS_EXHAUSTED": notifyBilling(); break;
    case "RATE_LIMITED": await sleep(Number(res.headers.get("retry-after") ?? 2) * 1000); return retry();
    case "VALIDATION": console.error(err.data.fieldErrors); break;
    default: throw new Error(`${err.data?.code ?? res.status}: ${err.message}`);
  }
}

Codes

The verified document codes are explained with the feature in Verified documents; render errors in the Rendering API.

Authentication & access

CodeStatusMeaningWhat to do
AUTH_REQUIRED401No API key (or session) on a request that needs one.Send Authorization: Bearer <key> — or ?api_token= on GET render with a render-only key.
TOKEN_INVALID401The API key is unknown, revoked or malformed.Check the key; mint a new one under Settings → Developers if it was deleted.
TOKEN_EXPIRED401The key's expiry date has passed.Mint a new key, or one without an expiry.
SCOPE_DENIED403The key was minted without access to this endpoint or MCP tool.Mint a key that includes the scope (e.g. Template Render API), or use a key without scope restrictions.
URL_KEY_NOT_RENDER_ONLY403A key passed in the URL (?api_token=) can do more than render.For URLs, mint a render-only key: endpoint scope exactly Template Render API, no MCP tools. Keys with wider access go in the Authorization header.
FORBIDDEN403The caller is not a member of the space, or lacks the role/permission for this action.Use a key or account from the space that owns the resource; ask an owner for the permission.
PLAN_FEATURE_UNAVAILABLE403The space's plan does not include this feature.Upgrade the plan.

Limits & billing

CodeStatusMeaningWhat to do
CREDITS_EXHAUSTED402The space cannot reserve the credits this action needs (a still costs 1, a clip 5, a PDF 1 per page, a page scraped by a workflow 1; AI calls reserve an estimate; bulk needs the balance to cover every row up front).Buy a credit pack or upgrade the plan; renders resume immediately.
RATE_LIMITED429Over the endpoint's per-key (or per-user / per-IP) rate limit.Wait the Retry-After seconds, then retry; render endpoints allow 30 requests per minute per key. The RateLimit and X-RateLimit-* headers show what is left (see /docs/rendering#rate-limits).
IDEMPOTENCY_CONFLICT409An Idempotency-Key was reused with a different payload, its first request is still running, or it belongs to a finished raw render whose file is not kept (data.reason: payload-mismatch, in-flight, raw-completed).Use a fresh key per distinct request, wait for the first request to finish before retrying, and use a fresh key to render a raw file again (the first one was charged once).

Requests

CodeStatusMeaningWhat to do
VALIDATION422The body, query or path failed validation; data.fieldErrors names each field.Fix the listed fields. Unknown fields are rejected on strict endpoints.

Templates & rendering

CodeStatusMeaningWhat to do
TEMPLATE_NOT_FOUND404No template with that id in the key's space — private, deleted, or another space's.Check the id (list_templates over MCP, or the editor URL) and that the key belongs to the owning space.
TEMPLATE_NOT_RENDERABLE400The template has no design document to render (an empty or legacy template).Open it in the editor, add content and save; publish if you render the published version.
VARIATION_NOT_FOUND400The variation is neither the id nor the name of one of the template's saved variations, or it is a name two variations share.Use the variation's name as the Variations panel shows it, or its id (the # button in that panel, or get_template over MCP); for a shared name, use the id.
VARIATION_CONFLICT400Two of the requested variations are in the same single-select group (for example both Light and Dark from a Theme group).Pass one variation per single-select group; multi-select variations can be stacked.
NODE_NOT_FOUND400The nodeId is not a layer in the rendered document.Use a layer id from the editor (right-click → Copy id) or from get_template_document.
BRAND_VARIANT_INVALID400A brandVariant id does not exist on the template's brand, or the template has no brand.Use a variant id from the brand's Variants section; set a brand on the template first.
BRAND_TOKENS_INVALID400brandTokens is not a plain object, or exceeds the size / depth / string-length limits.Send only token values as a flat-ish object; leave out anything that is not a brand token.
PAGE_LIMIT_EXCEEDED422pages: "all" resolved to more pages than one request renders (50, the same cap as a PDF).Render ranges one page at a time with scene, or shorten the collection the scene repeats over.
RENDER_FAILED500The render itself failed (the worker crashed or timed out).Retry once; if it repeats, the design has something the renderer cannot handle — check Render Logs in the editor and report the template id.

Bulk

CodeStatusMeaningWhat to do
BULK_EMPTY400The bulk request has no active rows.Send at least one row in rows (or an active row in contents).
BULK_JOB_NOT_FOUND404No bulk job with that id in the key's space.Use the jobId returned by POST …/bulk; jobs are pruned some time after completion.

Integrations

CodeStatusMeaningWhat to do
HOOK_NOT_FOUND404No integration webhook subscription with that id in the key's space.Use the id returned when the subscription was created. Webhooks added in Settings → Developers are managed there, not through this route.

Brands

CodeStatusMeaningWhat to do
BRAND_NOT_FOUND404No brand with that id readable by the key's space — or, for a render's brand parameter, no brand of the key's own space matches the id, name or website URL.Check the id via list_brands; public catalog brands are readable by everyone, others only by their space. A render's brand only ever picks one of your space's brands — create it first (resolve_brand with a URL).
BRAND_AMBIGUOUS409A render's brand name (or website URL) matches several brands of the space; data.candidates lists them.Pass one of the candidate brandIds instead of the name.
BRAND_INVALID400The brand payload is malformed (variants, groups or token shapes).See message for the field; every variant and group needs a unique non-empty string id.

Verified documents

CodeStatusMeaningWhat to do
CREDENTIALS_SUSPENDED403This space's verified documents are suspended by bannx (for example after reports of fake documents), so renders of templates with verified documents turned on are refused and existing verify pages say the issuer is suspended.Contact [email protected] from the space owner's account. Renders of templates without verified documents keep working.
CREDENTIAL_NOT_FOUND404No verified document with that id. The same answer is given for a mistyped id and one that was deleted.Check the link or the id printed beside the QR code; ask the issuer if the document should exist.

AI generation

CodeStatusMeaningWhat to do
PROMPT_REJECTED422The prompt was declined by content screening. Every prompt that generates an image or a video is screened before the model runs; data.decision is deny or flag.Rephrase the prompt. Generated images and videos must follow the Acceptable Use Policy (/acceptable-use). Nothing was charged.
PROMPT_SCREENING_UNAVAILABLE503Content screening did not answer in time, so the generation did not run.Retry in a moment. Nothing was charged.

Social post approvals

CodeStatusMeaningWhat to do
SOCIAL_APPROVAL_REQUIRED409The post has not been approved, so it cannot be published, retried or queued yet.Wait for an approver to approve it in Publish; list_social_posts shows pending_approval until then.
SOCIAL_APPROVAL_NOT_PENDING409The post is not waiting for this approval step: it was already approved, sent back for changes, cancelled, or (for a client link) already answered.Reload the post and act on its current status.
SOCIAL_APPROVAL_STALE409The post's content or time changed after the version that was reviewed.Reload the post and review the current version before approving.
SOCIAL_APPROVAL_TIME_PASSED409The post's time has passed (or is less than a minute away), so approving it would publish it late.Approve it with a new time (scheduledAt at least a minute ahead); an expired post is never published on its own.
SOCIAL_APPROVAL_LINK_INVALID403The review link is wrong, expired or was replaced (the post changed or was cancelled).Ask the sender for a new link; a link works only for the post and the person it was sent to.
SOCIAL_APPROVALS_PLAN_REQUIRED403Approvals for social posts need a paid plan, and client approval links a plan that includes them.Upgrade the plan, or leave approvals (or client links) off.
SOCIAL_APPROVALS_PENDING_CHOICE409Approvals are being turned off while posts still wait for approval.Send pending: "approve" to approve the waiting posts whose time is still ahead, or pending: "keep" to leave them waiting.

HTTP statuses at a glance

StatusCodes
400TEMPLATE_NOT_RENDERABLE, VARIATION_NOT_FOUND, VARIATION_CONFLICT, NODE_NOT_FOUND, BRAND_VARIANT_INVALID, BRAND_TOKENS_INVALID, BULK_EMPTY, BRAND_INVALID
401AUTH_REQUIRED, TOKEN_INVALID, TOKEN_EXPIRED
402CREDITS_EXHAUSTED
403SCOPE_DENIED, URL_KEY_NOT_RENDER_ONLY, FORBIDDEN, PLAN_FEATURE_UNAVAILABLE, CREDENTIALS_SUSPENDED, SOCIAL_APPROVAL_LINK_INVALID, SOCIAL_APPROVALS_PLAN_REQUIRED
404TEMPLATE_NOT_FOUND, BULK_JOB_NOT_FOUND, HOOK_NOT_FOUND, BRAND_NOT_FOUND, CREDENTIAL_NOT_FOUND
409IDEMPOTENCY_CONFLICT, BRAND_AMBIGUOUS, SOCIAL_APPROVAL_REQUIRED, SOCIAL_APPROVAL_NOT_PENDING, SOCIAL_APPROVAL_STALE, SOCIAL_APPROVAL_TIME_PASSED, SOCIAL_APPROVALS_PENDING_CHOICE
422VALIDATION, PAGE_LIMIT_EXCEEDED, PROMPT_REJECTED
429RATE_LIMITED
500RENDER_FAILED
503PROMPT_SCREENING_UNAVAILABLE