Canvas background parameters
Set canvas background color and background image per render with canvas parameters.
Updated
In addition to the dynamic parameters you set on individual elements, every template has five canvas-level properties you can override via the API.
Canvas Parameters#
| Parameter | Type | Description |
|---|---|---|
canvasBackgroundColor | string | Background color for the canvas. Supports HEX, RGBA, and linear-gradient |
canvasBackgroundImage | string | Background image URL (must be publicly accessible) |
canvasBorderWidth | number | Border width around the canvas, in pixels (for example 4). Default: 0 (no border) |
canvasBorderColor | string | Border color. Default: rgba(0, 0, 0, 1) |
canvasBorderStyle | string | CSS border style, such as solid, dashed or dotted. Default: solid |
Example#
{
"templateId": "your-template-id",
"modifications": {
"title": "Hello World",
"canvasBackgroundColor": "linear-gradient(135deg, #667eea 0%, #764ba2 100%)",
"canvasBackgroundImage": "https://example.com/bg-pattern.png"
},
"response": {
"format": "png",
"type": "url"
}
}For complete API documentation including all endpoints and parameters, see the API Reference.
Was this page helpful?
Ready to automate?
Start rendering images, PDFs and videos from your templates in under 2 minutes. Free plan, no credit card.
Get your API key- Image, PDF and video generation via API
- Visual editor with AI and smart layouts
- Zapier, Make, MCP and 40+ integrations
- White-label embed for your own app
- 100 free credits a month, no credit card required