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#

ParameterTypeDescription
canvasBackgroundColorstringBackground color for the canvas. Supports HEX, RGBA, and linear-gradient
canvasBackgroundImagestringBackground image URL (must be publicly accessible)
canvasBorderWidthnumberBorder width around the canvas, in pixels (for example 4). Default: 0 (no border)
canvasBorderColorstringBorder color. Default: rgba(0, 0, 0, 1)
canvasBorderStylestringCSS border style, such as solid, dashed or dotted. Default: solid

Example#

JSON
{
  "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"
  }
}
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