Skip to main content
POST
Render a canvas art image or animation from HTML

Authorizations

X-API-Key
string
header
required

Company API key - scoped to a specific company. Generate from the Integrations page in your dashboard.

Body

application/json

Canvas to render

companyId
string
required

Company ID whose data credits are billed for the call

html
string
required

Complete standalone HTML document for the canvas. Must be fully self-contained (inline ; Google Fonts links, the Tailwind CDN script, and the Lucide icons CDN script are allowed) with html,body{margin:0} and the body sized to EXACTLY the canvas dimensions with overflow:hidden. Static — no animations — unless animated is true, in which case animate with infinite, seamlessly looping CSS keyframes. Follow the design guidelines in the Canvas tag description.

format
string

Canvas format: 'square' (1080x1080 feed), 'portrait' (1080x1350 feed, default), 'story' (1080x1920 Stories/Reels), 'landscape' (1200x630 link preview), 'slide' (1920x1080 presentation slide background). Ignored when width/height are given.

width
integer

Custom canvas width in px (200-2160); requires height

height
integer

Custom canvas height in px (200-2160); requires width

animated
boolean

Record the canvas as a looping MP4 video instead of a still PNG. The response returns videoId and an MP4 url instead of imageId. Costs 3 data credits instead of 1. Default false.

duration
number

Video length in seconds when animated is true (1-15, out-of-range values are clamped; default 5). Match it to the CSS animation cycle so the loop tiles cleanly. Ignored for stills.

Response

The rendered canvas with its public image (or video) URL

Rendered canvas

imageId
string

ID of the saved image (still canvases only)

videoId
string

ID of the saved video (animated canvases only)

url
string

Permanent public URL of the rendered PNG, or of the recorded MP4 when animated

width
integer

Rendered width in px

height
integer

Rendered height in px

duration
number

Video length in seconds (animated canvases only)