HTML to Image · Full
Premium render with external CSS injection. Same pipeline as /v1/render with an extra css parameter.
POST/v1/render/full
This endpoint is available on the $49/month plan and above. Requests from lower-tier plans return
403 Forbidden.Parameters
Accepts all parameters from POST /v1/render plus:
| Name | Type | Default | Description |
|---|---|---|---|
| html | String | — | HTML to render. Required unless template_id is provided. |
| css | String | — | Extra CSS injected before the HTML. Useful for overriding styles or adding global rules without modifying the HTML. |
| template_id | String | — | ID of a saved template. Use instead of html. |
| variables | Object | {} |
Key-value pairs to replace {{key}} placeholders. |
| width | Integer | 1080 | Viewport width in pixels. |
| height | Integer | 1350 | Viewport height in pixels. |
| format | String | "png" | Output format: "png" or "jpg". |
| selector | String | — | CSS selector to crop to a specific element. |
| device_scale | Float | 1 | Resolution multiplier. |
| ms_delay | Integer | 500 | Extra wait in ms after page load. Max 30000. |
| transparent | Boolean | false | Transparent background. Forces format: "png". |
| image_url | String | — | Replaces DYNAMIC_IMAGE_URL (or URL_DA_IMAGEM_DINAMICA) in the HTML. |
| full_page | Boolean | false | Capture full scrollable height. |
| render_when_ready | Boolean | false | Wait for window.screenshotReady === true instead of ms_delay. |
| viewport_landscape | Boolean | false | Swap width and height for landscape orientation. |
| timezone | String | — | IANA timezone (e.g. "America/Sao_Paulo"). |
| crop_x, crop_y | Integer | 0 | Top-left corner of custom crop region. |
| crop_width, crop_height | Integer | 0 | Dimensions of crop region. Both required to activate cropping. |
Response
JSON
{
"url": "https://api.starkrender.com/v1/image/uuid",
"id": "uuid"
}
Examples
Inject global CSS reset
JSON Body
{
"html": "<div class='card'>Hello</div>",
"css": "* { box-sizing: border-box; } .card { background: #0f172a; color: #fff; padding: 40px; }",
"width": 800,
"height": 400
}
Template + external CSS override
JSON Body
{
"template_id": "86c4dab7-...",
"variables": { "headline": "Markets hit all-time high" },
"css": "h1 { font-size: 64px !important; color: #C9952A; }",
"width": 1080,
"height": 1080
}
StarkRender