Bearer key · JSON
POST /api/v1/render
curl -s -X POST https://getattest.com.au/api/v1/render \
-H "authorization: Bearer $ATTEST_API_KEY" \
-H "content-type: application/json" \
-d '{}'
Send the key as a bearer token in the authorization header. One key and one credit balance cover every service, including Attest Capture. A failed call is refunded automatically. No key yet? POST /api/v1/keys issues one with 25 free credits and no signup — see the key guide.
For agents
Use when
Use this when a task needs a PNG or PDF built from content the caller already has — HTML, Markdown, or a built-in social card, invoice, certificate or pull-quote template — for example an OG image, a receipt, a one-page report or a printable summary. It renders content you supply; it does not visit or screenshot a live website (use /api/v1/capture for that).
Not documented yet: a captured example response. This page only shows what the module publishes about itself, so the missing parts are absent rather than guessed at.
10 fields
Input
Scroll the table horizontally to see all fields.
Field / Type / Required / What it does| Field | Type | Required | What it does |
|---|
html | string | Optional | HTML to render. Exactly one of html, markdown or data. |
|---|
markdown | string | Optional | Markdown to render. |
|---|
data | object | Optional | Fields for a built-in template. Name the template with data.template: og_card, invoice, certificate or quote. |
|---|
format | string | Optional | png (default) or pdf. |
|---|
width | integer | Optional | Render width in pixels, 200-2400. |
|---|
height | integer | Optional | Render height in pixels, 200-4000. PNG only. |
|---|
scale | integer | Optional | Device pixel ratio, 1-3. PNG only. |
|---|
page_size | string | Optional | Page size such as A4. PDF only. |
|---|
landscape | boolean | Optional | Landscape orientation. PDF only. |
|---|
margin_mm | integer | Optional | Page margin in millimetres, 0-50. |
|---|
HTTP 200
Response
Every successful response also carries call_id (your receipt for the charge), credits_charged and credits_remaining.
Scroll the table horizontally to see all fields.
Field / What it holds| Field | What it holds |
|---|
format | png or pdf. |
|---|
source_format | Whether the content came from html, markdown or a template. |
|---|
template | The built-in template used, when one was. |
|---|
width | Width of the output, in unit. |
|---|
height | Height of the output, in unit. |
|---|
pages | Page count, for a PDF. |
|---|
content_type | The media type of the produced file. |
|---|
bytes | Size of the produced file. |
|---|
sha256 | SHA-256 of the produced bytes. |
|---|
file_base64 | The produced file. |
|---|
subresources | What the page was allowed to load while rendering. |
|---|
templates | Every built-in template name. |
|---|
limits | The caps that applied. |
|---|
Machine-readable failures
Errors
Errors return JSON such as {"error":"invalid_api_key"}. A failed call is refunded automatically.
Scroll the table horizontally to see all fields.
Code / Status / Meaning| Code | Status | Meaning |
|---|
content_required | 400 | None of html, markdown or data was sent. |
|---|
multiple_content_sources | 400 | More than one of html, markdown or data was sent. |
|---|
height_not_supported_for_pdf | 400 | height was sent with format pdf, which sizes by page instead. |
|---|
scale_not_supported_for_pdf | 400 | scale was sent with format pdf. |
|---|
page_size_not_supported_for_png | 400 | page_size was sent with format png. |
|---|
landscape_not_supported_for_png | 400 | landscape was sent with format png. |
|---|
invalid_template | 400 | data.template is not a built-in template. |
|---|
template_field_required | 400 | The template needs a field that was not supplied. |
|---|
unknown_template_field | 400 | data carries a field the template does not have. |
|---|
data_uri_not_allowed | 400 | The HTML embeds a data: URI of a kind this renderer refuses. |
|---|
navigation_not_allowed | 400 | The content tried to navigate the renderer to another page. |
|---|
content_too_complex | 400 | The content is past the render budget. |
|---|
render_timeout | 502 | The render did not finish inside the budget. Not charged. |
|---|
render_too_large | 502 | The render produced more than the response cap. Not charged. |
|---|
render_failed | 502 | The content could not be rendered. Not charged. |
|---|
On every service
Scroll the table horizontally to see all fields.
Code / Status / Meaning| Code | Status | Meaning |
|---|
invalid_api_key | 401 | The authorization header is missing or the key is unknown. |
|---|
insufficient_credits | 402 | The balance is below this call's cost. The response carries credits_required and credits_remaining. |
|---|
rate_limit_exceeded | 429 | Free keys share 10 calls a minute across every service. The response carries limit and window_seconds. |
|---|
services_unavailable | 503 | The credit store could not be reached. Retry once after 30 seconds. |
|---|
Where the answer comes from
Source and scope
Rendered from the content supplied, in a headless Chromium whose network access is limited to public http(s) addresses. It does not visit or screenshot a live website - /api/v1/capture does that. Attest does not check the figures or wording of what is rendered.
Attest reports what it read, with the source it read it from. It is general information, not advice, and not a legal record.
All Attest tools · Service list as JSON · OpenAPI