---
title: "Generate Template Variants"
method: POST
path: "/studio/templates/{templateId}/generate-variants"
tags: ["Enterprise"]
---

# Generate Template Variants

`POST /studio/templates/{templateId}/generate-variants`

Generate multiple size variants of a template using AI

Available only to Enterprise-plan workspaces and first-party clients.

## Path parameters

- `templateId` string, required

## Query parameters

- `includeThumbnails` boolean

## Request body

- object
  - `variants` unknown[], required — Array of target dimensions for variants
    - unknown
  - `page_number` integer — Which page of the template to use as source
  - `output` string — Output mode: `"pages"` or `"templates"`

## Response `200`

Successful response

- object

## Other responses

- `400` — The request was malformed or a parameter was invalid.
- `401` — Authentication is required and was not supplied.
- `402` — The workspace has no credits left. Either the render needs credits it does not have, or the key was paused after repeatedly calling with none (`code: api_key_paused`). That one resumes by itself on the first request we can accept.
- `403` — The API key is missing, invalid, or not permitted to perform this action.
- `404` — The requested route or resource does not exist.
- `429` — The workspace rate limit was exceeded. Retry after the interval given by the Retry-After header.
- `500` — An unexpected error occurred on our side.

## Changes

- **2026-09-03** `a0c2c3003dc0` — 1 info
  - added the non-success response with the status `402`
- **2026-08-24** `b2284a52aaad` — 6 info
  - added the media type `application/json` for the response with the status `401`
  - added the media type `application/json` for the response with the status `429`
  - added the non-success response with the status `400`
  - added the non-success response with the status `403`
  - …2 more

[Change history](https://skmtc.dev/orshot/apis/orshot-api/changes/studio/templates/:templateId/generate-variants/post.md)

---

[API](https://skmtc.dev/orshot/apis/orshot-api.md) · [All operations](https://skmtc.dev/orshot/apis/orshot-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/orshot/orshot-api/revisions/a0c2c3003dc0/schema)
