---
title: "Create Variants Bulk"
method: POST
path: "/v1/template/{template_id}/variant/bulk"
tags: ["Variants"]
---

# Create Variants Bulk

`POST /v1/template/{template_id}/variant/bulk`

## 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/bulk`
- Auth: HTTP bearer

Create multiple variants in one request (single export_type per batch).

When combine_pdf=true (Plus+ only, PDF export), renders all items into one
multi-page PDF via a single Chromium print pass instead of per-item files.

## Path parameters

- `template_id` string, uuid, required

## Request body

- VariantBulkCreateRequest
  - `export_type` 'png' | 'pdf' | 'jpeg' | 'webp', required: Export format options for variants
  - `items` VariantBulkItem[], required: Variant items to render
    - `overrides` VariantOverrideOptional[], nullable: Per-layer overrides for this variant
      - `layer_id` string, uuid, required: UUID of the layer to override. Must match a layer in the target template (retrieve via GET /v1/template/{template_id}).
      - `x` number, nullable: X position override in pixels. Omit to keep template default.
      - `y` number, nullable: Y position override in pixels. Omit to keep template default.
      - `properties` FlexibleLayerProperties: Flexible layer properties that can handle any combination of text and image properties
        - `width` number, nullable: Layer width in pixels
        - `height` number, nullable: Layer height in pixels
        - `color` string, nullable: Color in hex format (#RRGGBB)
        - `rotation` number, nullable: Rotation angle in degrees
        - `text` string, nullable: Text content
        - `font_size` number, nullable: Font size in pixels
        - `font_name` string, nullable: Font family name
        - `font_style` FontStyle: Font styling properties
          - `weight` string, nullable
          - `italic` boolean, nullable
          - `underline` boolean, nullable
        - `text_align` 'left' | 'center' | 'right' | 'justify': Text alignment options
        - `text_direction` 'rtl', nullable: Text direction; only set for right-to-left text (Arabic, Hebrew, etc.). Absent/null means LTR.
        - `letter_spacing` number, nullable: Letter spacing in pixels
        - `line_spacing` number, nullable: Line spacing in pixels
        - `vertical_align` string, nullable: Vertical alignment for text (e.g. 'middle')
        - `img_url` string, nullable: Image URL for image layers: public HTTPS, data URI, or Google Drive link shared for viewing.
        - `image_fit` 'cover' | 'contain'
        - `image_position` 'top-left' | 'top-center' | 'top-right' | 'center-left' | 'center' | 'center-right' | 'bottom-left' | 'bottom-center' | 'bottom-right'
        - `signed_url_expiry` string, date-time, nullable
        - `opacity` number, nullable: Opacity value (0.0 = fully transparent, 1.0 = fully opaque)
        - `flip_horizontal` boolean, nullable: Flip the layer horizontally
        - `flip_vertical` boolean, nullable: Flip the layer vertically
    - `width` integer, nullable: Variant width in pixels
    - `height` integer, nullable: Variant height in pixels
    - `page_number` integer, nullable: Page index to render (0-based)
  - `combine_pdf` boolean: Merge all PDF items into one multi-page PDF (Plus+ only)

## Response `200`

Bulk variant creation completed (may be partial)

- VariantBulkCreateResponse
  - `results` VariantBulkItemResult[], required
    - `index` integer, required
    - `success` boolean, required
    - `variant` VariantResponse
      - `id` string, uuid, required
      - `template_id` string, uuid, required
      - `url` string, required: Rendered variant URL
      - `signed_url_expiry` string, date-time, nullable
      - `width` integer, required: Variant width in pixels
      - `height` integer, required: Variant height in pixels
      - `overrides` VariantOverrideOptional[], required: List of layer overrides for the variant
        - `layer_id` string, uuid, required: UUID of the layer to override. Must match a layer in the target template (retrieve via GET /v1/template/{template_id}).
        - `x` number, nullable: X position override in pixels. Omit to keep template default.
        - `y` number, nullable: Y position override in pixels. Omit to keep template default.
        - `properties` FlexibleLayerProperties: Flexible layer properties that can handle any combination of text and image properties
          - `width` number, nullable: Layer width in pixels
          - `height` number, nullable: Layer height in pixels
          - `color` string, nullable: Color in hex format (#RRGGBB)
          - `rotation` number, nullable: Rotation angle in degrees
          - `text` string, nullable: Text content
          - `font_size` number, nullable: Font size in pixels
          - `font_name` string, nullable: Font family name
          - `font_style` FontStyle: Font styling properties
            - `weight` string, nullable
            - `italic` boolean, nullable
            - `underline` boolean, nullable
          - `text_align` 'left' | 'center' | 'right' | 'justify': Text alignment options
          - `text_direction` 'rtl', nullable: Text direction; only set for right-to-left text (Arabic, Hebrew, etc.). Absent/null means LTR.
          - `letter_spacing` number, nullable: Letter spacing in pixels
          - `line_spacing` number, nullable: Line spacing in pixels
          - `vertical_align` string, nullable: Vertical alignment for text (e.g. 'middle')
          - `img_url` string, nullable: Image URL for image layers: public HTTPS, data URI, or Google Drive link shared for viewing.
          - `image_fit` 'cover' | 'contain'
          - `image_position` 'top-left' | 'top-center' | 'top-right' | 'center-left' | 'center' | 'center-right' | 'bottom-left' | 'bottom-center' | 'bottom-right'
          - `signed_url_expiry` string, date-time, nullable
          - `opacity` number, nullable: Opacity value (0.0 = fully transparent, 1.0 = fully opaque)
          - `flip_horizontal` boolean, nullable: Flip the layer horizontally
          - `flip_vertical` boolean, nullable: Flip the layer vertically
      - `page_number` integer: Page index this variant was rendered from (0-based)
      - `is_combined_pdf` boolean: True when this variant is a multi-section combined PDF
      - `combined_section_count` integer, nullable: Number of variant sections merged into a combined PDF
      - `created_at` string, date-time, required
      - `updated_at` string, date-time, required
      - `warnings` string[], nullable
    - `error` string, nullable
  - `total_requested` integer, required
  - `total_created` integer, required
  - `total_failed` integer, required
  - `combined_pdf` CombinedPdfResult
    - `url` string, required: Signed URL of the combined multi-page PDF
    - `signed_url_expiry` string, date-time, nullable: When the combined PDF signed URL expires
    - `variant` VariantResponse
      - `id` string, uuid, required
      - `template_id` string, uuid, required
      - `url` string, required: Rendered variant URL
      - `signed_url_expiry` string, date-time, nullable
      - `width` integer, required: Variant width in pixels
      - `height` integer, required: Variant height in pixels
      - `overrides` VariantOverrideOptional[], required: List of layer overrides for the variant
        - `layer_id` string, uuid, required: UUID of the layer to override. Must match a layer in the target template (retrieve via GET /v1/template/{template_id}).
        - `x` number, nullable: X position override in pixels. Omit to keep template default.
        - `y` number, nullable: Y position override in pixels. Omit to keep template default.
        - `properties` FlexibleLayerProperties: Flexible layer properties that can handle any combination of text and image properties
          - `width` number, nullable: Layer width in pixels
          - `height` number, nullable: Layer height in pixels
          - `color` string, nullable: Color in hex format (#RRGGBB)
          - `rotation` number, nullable: Rotation angle in degrees
          - `text` string, nullable: Text content
          - `font_size` number, nullable: Font size in pixels
          - `font_name` string, nullable: Font family name
          - `font_style` FontStyle: Font styling properties
            - `weight` string, nullable
            - `italic` boolean, nullable
            - `underline` boolean, nullable
          - `text_align` 'left' | 'center' | 'right' | 'justify': Text alignment options
          - `text_direction` 'rtl', nullable: Text direction; only set for right-to-left text (Arabic, Hebrew, etc.). Absent/null means LTR.
          - `letter_spacing` number, nullable: Letter spacing in pixels
          - `line_spacing` number, nullable: Line spacing in pixels
          - `vertical_align` string, nullable: Vertical alignment for text (e.g. 'middle')
          - `img_url` string, nullable: Image URL for image layers: public HTTPS, data URI, or Google Drive link shared for viewing.
          - `image_fit` 'cover' | 'contain'
          - `image_position` 'top-left' | 'top-center' | 'top-right' | 'center-left' | 'center' | 'center-right' | 'bottom-left' | 'bottom-center' | 'bottom-right'
          - `signed_url_expiry` string, date-time, nullable
          - `opacity` number, nullable: Opacity value (0.0 = fully transparent, 1.0 = fully opaque)
          - `flip_horizontal` boolean, nullable: Flip the layer horizontally
          - `flip_vertical` boolean, nullable: Flip the layer vertically
      - `page_number` integer: Page index this variant was rendered from (0-based)
      - `is_combined_pdf` boolean: True when this variant is a multi-section combined PDF
      - `combined_section_count` integer, nullable: Number of variant sections merged into a combined PDF
      - `created_at` string, date-time, required
      - `updated_at` string, date-time, required
      - `warnings` string[], nullable

## Other responses

- `400`: Bad request
- `403`: Plan limit or feature gate
- `404`: Template not found
- `422`: Validation Error
- `500`: Internal server error
- `504`: Render timeout

---

[API](https://skmtc.dev/layerre/apis/layerre-api-documentation.md) · [All operations](https://skmtc.dev/layerre/apis/layerre-api-documentation/llms.txt) · [OpenAPI document](https://skmtc.dev/layerre/apis/layerre-api-documentation/revisions/66b268766603?raw)
