Skip to content

Errors reference

Every error response is the same shape. Status code + machine-readable code + human message + optional field pointing at the offending input.

Envelope

{
  "success": false,
  "error": "Content length (5000) exceeds maximum allowed (4296 characters).",
  "code": "CONTENT_TOO_LONG",
  "field": "content"
}

HTTP status codes

StatusMeaning
200Success
400Validation error — fix the input and retry
401Auth header missing or wrong
402User-key gateway: Studio plan missing or API credits used up
404Endpoint not found
413Body too large (>10 MB) or, through the user-key gateway, a rendered file over 10 MB (output_too_large)
422Engine couldn't produce a scannable QR even after auto-fix (QR_UNSCANNABLE), or the output would exceed the budget (OUTPUT_TOO_COMPLEX)
429Rate limit — see Retry-After
500Internal — log + retry
503Server busy (large concurrent renders) or AI providers out of capacity (AI_QUOTA_EXCEEDED)

Validation errors (400)

CodeMeaning
MISSING_REQUIRED_FIELDcontent (or prompt on AI endpoints) is empty
CONTENT_TOO_LONGEncoded payload > 4296 chars (QR theoretical max)
INVALID_JSONBody doesn't parse as JSON
INVALID_HEXA color string isn't #RGB, #RRGGBB or #RRGGBBAA
INVALID_FIELD_VALUEGeneric — field will tell you which
VALUE_OUT_OF_RANGENumeric field outside the documented bounds
LOW_CONTRASTforeground vs background < 4:1; engine can't auto-fix
LOGO_TOO_LARGElogoSizePercent > 25 with ECC < H
FILE_TOO_LARGEMultipart upload > 10 MB
MULTIPART_CONFIG_MISSINGconfig field absent in form-data request

Authentication errors (401)

CodeMeaning
UNAUTHORIZEDX-RapidAPI-Proxy-Secret missing or wrong
INVALID_INTERNAL_SIGNATUREBFF HMAC failed verification
INTERNAL_TS_EXPIREDBFF timestamp outside ±60s window
LLM_API_KEY_INVALIDYour provider key (only on marketplace AI endpoint)

User-key gateway errors

The gateway at https://qr-branding.com/api/v1/* (User API keys) adds its own lowercase codes, with the same success / error / code envelope:

StatusCodeMeaning
400invalid_bodyThe body couldn't be parsed
401missing_api_keyNo X-API-Key header
401invalid_api_keyKey not recognised, revoked or malformed
402studio_requiredValid key, but the account has no active Studio pack. Includes docs and pricing links
402out_of_api_creditsAI generation on our keys with no Studio credits left. Includes docs and pricing links
413payload_too_largeBody over 1 MiB
413output_too_largeThe rendered file is larger than 10 MB. Request PNG or a smaller outputWidth
415multipart_not_supportedThe gateway only accepts JSON

Checkout errors

POST /api/checkout (the buy button on /pricing) answers { "error": "withdrawal_waiver_required" } when the consent is missing:

StatusCodeMeaning
400withdrawal_waiver_requiredThe pre-checkout box (consent and waiver of the right of withdrawal) wasn't ticked. See Pricing & credits

AI generation errors

CodeMeaning
AI_GENERATION_FAILEDLLM returned no usable config — try a clearer prompt
AI_REQUEST_TIMEOUTNo provider in the fallback chain answered within the 45 s total (each gets at most 20 s). Answers 503; retry in a moment
AI_QUOTA_EXCEEDEDEvery provider in the fallback chain refused for quota or spend cap. Answers 503; retrying right away will not help, try again later
AI_CONFIG_INVALIDLLM returned a config the engine rejected (rare, retry with lower creativity)
INVALID_LLM_PROVIDERMarketplace only — llmProvider not in openai anthropic google mistral cohere groq xai deepseek qwen local
INVALID_LLM_MODELMarketplace only — llmModel is not a well-formed model ID

Output budget errors (422)

CodeMeaning
OUTPUT_TOO_COMPLEXThe design would produce an SVG or PDF over 20 MB, or an internal raster canvas over 5120 px per side. SVG size grows with the number of modules: a template with a short URL is ~1.5 MB, with a 300-character URL ~17 MB. Export as PNG, shorten the content or use simpler module shapes

Server errors (500/503)

CodeMeaning
INTERNAL_ERRORUnexpected — please report with the request id
QR_GENERATION_FAILEDThe rendering engine itself threw. Includes the offending field when known
SERVER_BUSYToo many concurrent high-resolution renders. Wait and retry

Field validation constraints

FieldConstraint
content1–4296 chars
prompt (AI)1–10000 chars
creativity (AI)0.0–1.0
pixelsPerModule1–100
outputWidth / outputHeight64–4096
logoSizePercent3–40 (engine soft-caps at 25 with ECC H)
moduleScale0.5–1.0
moduleSizeVariation0.0–0.15 (soft cap, anything higher breaks scanning)
qrShapeRadius0–50
Logo / background file size≤ 10 MB
Logo / background image typesPNG, JPG, GIF, BMP, WebP
SVG / PDF document≤ 20 MB (OUTPUT_TOO_COMPLEX)
File through the user-key gateway≤ 10 MB (output_too_large)