Skip to content
Core conceptsResponses

Responses

Every endpoint returns the same JSON envelope, so one parser handles the whole API. Success and failure are distinguished by the top-level success boolean.

Success envelope

success
{
  "success": true,
  "data": { /* endpoint-specific payload */ },
  "message": "Success"
}

Paginated responses

list endpoints
{
  "success": true,
  "data": [ /* items */ ],
  "pagination": { "page": 1, "limit": 20, "total": 134, "pages": 7 }
}

The render object

Screenshot, PDF, extract, and job-poll responses all return this shape in data:

FieldDescription
idstringRender identifier, e.g. rnd_8fk2m1c4.
typestringWhich primitive produced it. Options: screenshot, pdf, extract.
statusstringCurrent state. Options: queued, processing, done, failed.
urlstring | nullHosted artifact URL (screenshot/pdf). null for extract.
url_expires_atstring | nullISO timestamp when the artifact URL lapses (≈365 days).
contentstring | nullExtracted markdown/text/html. null for screenshot/pdf.
metaobjectEngine metadata: dimensions, page count, word count, format, chunks, etc.
render_msnumberServer-measured render time in milliseconds.
credits_usednumberCredits charged. 0 on a cache hit or failure.
cachedbooleanWhether the result was served from cache.
errorobject | null{ code, message } when status is failed.
created_atstringISO creation timestamp.
completed_atstringISO completion timestamp.

Error envelope

failure
{
  "success": false,
  "error": {
    "code": "FEATURE_NOT_AVAILABLE",
    "message": "'inject_js' requires a higher plan (not available on hobby).",
    "details": null,
    "request_id": "req_7c0f1a2b"
  }
}

Always log request_id

Every error carries a stable machine code and a request_id. Include the request_id in support tickets — it pinpoints the exact request in our logs. See the full error reference.