---
title: "Resolve and validate template"
method: POST
path: "/api/templates/{id}/preview"
tags: ["Templates"]
---

# Resolve and validate template

`POST /api/templates/{id}/preview`

## Request

- Base URL: `https://api.zvid.io`
- URL: `https://api.zvid.io/api/templates/{id}/preview`
- Auth: one of:
  - API key in header `x-api-key`
  - HTTP bearer

Free dry-run: substitute variables and overrides, then validate with account limits. Returns the resolved project and resolution statistics. Does not enqueue a render, produce media, or spend credits.

## Path parameters

- `id` string, required

## Request body

- TemplatePreviewRequest
  - `variables` object
  - `overrides` RenderOverrides: Output knobs applied after template/variable resolution.
    - `name` string
    - `width` integer
    - `height` integer
    - `outputFormat` string: mp4/mov/avi/webm for video; png/jpg/jpeg/webp for image renders.
    - `frameRate` integer
    - `backgroundColor` string
    - `snapshotTime` number: Image renders only.
    - `quality` integer: Image renders only (jpg/webp).
    - `transparent` boolean: Image renders only (png/webp).
    - `resolution` string: Resolution preset. Explicit width/height overrides force custom unless resolution is also provided.

## Response `200`

Successful response

- TemplatePreviewResponse
  - `project` ResolvedRenderPayload, required (unresolved $ref)
  - `stats` object, required

## Other responses

- `400`: Invalid input or semantic validation error
- `401`: Missing or invalid credentials
- `404`: Not found for this account
- `500`: Server error

---

[API](https://skmtc.dev/zvid/apis/zvid-api.md) · [All operations](https://skmtc.dev/zvid/apis/zvid-api/llms.txt) · [OpenAPI document](https://skmtc.dev/zvid/apis/zvid-api/revisions/8a665b293b37?raw)
