Errors#

All errors return JSON with a code and message:

{
  "code": "TEMPLATE_NOT_FOUND",
  "message": "Template not found or not accessible"
}

Authentication errors#

These can be returned by any authenticated endpoint.

HTTPCodeMeaning
401MISSING_API_KEYNo Authorization header or malformed
401INVALID_API_KEYKey not found in database
403KEY_INACTIVEKey has been revoked
402NO_SUBSCRIPTIONNo quota record for this user
402SUBSCRIPTION_INACTIVESubscription expired or canceled

POST /v1/url#

HTTPCodeMeaning
400INVALID_BODYBody is not valid JSON
400MISSING_TEMPLATE_IDtemplateId is required
400INVALID_VARIABLESvariables must be an object
400INVALID_WIDTHWidth must be 1–4096
400INVALID_HEIGHTHeight must be 1–4096
400INVALID_FORMATMust be png, jpeg, or webp
400INVALID_DEVICE_PIXEL_RATIOMust be a positive number
404TEMPLATE_NOT_FOUNDTemplate doesn't exist or not accessible
400MISSING_TEMPLATE_VARIABLESRequired variables not provided
400TEMPLATE_NOT_COMPILEDTemplate has no compiled render plan
429QUOTA_EXCEEDEDMonthly image quota exhausted
500SERVER_ERRORInternal error (e.g. signing secret not configured)

POST /v1/urls#

HTTPCodeMeaning
400INVALID_BODYBody is not valid JSON
400INVALID_ITEMSitems must be an array
400EMPTY_ITEMSitems array is empty
400TOO_MANY_ITEMSMore than 25 items
400MISSING_TEMPLATE_IDitems[n].templateId is required
400INVALID_VARIABLESitems[n].variables must be an object
400INVALID_WIDTHitems[n] width must be 1–4096
400INVALID_HEIGHTitems[n] height must be 1–4096
400INVALID_FORMATUnsupported image format
400INVALID_DEVICE_PIXEL_RATIOMust be a positive number
404TEMPLATE_NOT_FOUNDTemplate doesn't exist or not accessible
400TEMPLATE_NOT_COMPILEDTemplate has no compiled render plan
429QUOTA_EXCEEDEDMonthly image quota exhausted
500SERVER_ERRORInternal error

GET /v1/templates#

HTTPCodeMeaning
400INVALID_SCOPEMust be all, mine, or starter
500TEMPLATES_LIST_FAILEDTemplate list query failed

POST /v1/templates#

HTTPCodeMeaning
400INVALID_JSONBody is not valid JSON
400MISSING_NAMEname is required
400MISSING_CODEcode is required
400INVALID_CODECode exceeds size limit (180K chars)
400LEGACY_TEMPLATE_PAYLOADOld-style fields (jsx, googleFonts, etc.) were sent — use code instead
400COMPILE_ERRORTemplate code failed to compile
500TEMPLATE_CREATE_FAILEDCreation failed

POST /v1/templates/generate#

HTTPCodeMeaning
400INVALID_JSONBody is not valid JSON
400INVALID_ITEMSitems must be an array
400EMPTY_ITEMSitems array is empty
400TOO_MANY_ITEMSMore than 5 items
429QUOTA_EXCEEDEDMonthly AI generation quota exhausted
402SUBSCRIPTION_REQUIREDPaid plan required for AI generation
422PARSE_FAILEDGenerated code could not be parsed
502AI_NOT_CONFIGUREDAI service is not available
502GENERATION_FAILEDAI generation failed

GET /v1/templates/:templateId#

HTTPCodeMeaning
400MISSING_TEMPLATE_IDNo template ID in the URL path
404TEMPLATE_NOT_FOUNDTemplate doesn't exist or not accessible
500TEMPLATE_FETCH_FAILEDLookup failed

PATCH /v1/templates/:templateId#

HTTPCodeMeaning
400MISSING_TEMPLATE_IDNo template ID in the URL path
400INVALID_JSONBody is not valid JSON
400EMPTY_UPDATENo fields provided to update
400INVALID_NAMEName is invalid
400INVALID_CODECode exceeds size limit
400LEGACY_TEMPLATE_PAYLOADOld-style fields sent — use code instead
400COMPILE_ERRORUpdated code failed to compile
404TEMPLATE_NOT_FOUNDTemplate doesn't exist or not yours
500TEMPLATE_UPDATE_FAILEDUpdate failed

GET /v1/image#

HTTPCodeMeaning
403URL_EXPIREDSigned URL has expired
403INVALID_SIGNATURESignature doesn't match
404VNODE_NOT_FOUNDRender data missing for this URL
400MAX_DEPTHNested render depth exceeded
500RENDER_ERRORImage render failed
500INVALID_VNODEStored render data is corrupted