Variants
Create Variant
Render one variant per request from a template, optionally overriding layers.
Overrides is an array of objects with layer_id (from GET /v1/template/{template_id}) and optional properties; layers you omit keep template defaults.
post/v1/template/{template_id}/variant
Request
- Base URL: https://layerre.com (the document declares no server; this is the origin it was published from)
- URL: https://layerre.com/v1/template/{template_id}/variant
- Auth: HTTP bearer
Path parameters
template_idstring uuid required
Request body
Example request
{
"export_type": "png",
"height": 600,
"overrides": [
{
"layer_id": "123e4567-e89b-12d3-a456-426614174000",
"properties": {
"img_url": "https://your-cdn.com/image.jpg",
"image_fit": "cover"
}
},
{
"layer_id": "223e4567-e89b-12d3-a456-426614174001",
"properties": {
"text": "Your headline here",
"font_size": 42
}
}
],
"width": 800
}Response
Variant created successfully
Example response
{
"url": "https://example.com/variant.png",
"width": 800,
"height": 600,
"overrides": [
{
"properties": {
"width": 100,
"height": 100,
"color": "#FF0000",
"text": "Hello World",
"font_size": 16,
"font_name": "Arial",
"text_direction": "rtl",
"line_spacing": 1000,
"vertical_align": "middle",
"img_url": "https://example.com/image.png",
"opacity": 1
}
}
]
}Changes
No recorded changes to this operation across all 1 revision of this API.