---
title: "Finalize Template"
method: POST
path: "/api/hand-templates/{template_id}/finalize"
---

# Finalize Template

`POST /api/hand-templates/{template_id}/finalize`

## Request

- Base URL: `https://api.tintin-x.com` (the document declares no server; this is the origin it was published from)
- URL: `https://api.tintin-x.com/api/hand-templates/{template_id}/finalize`
- Auth: HTTP bearer

Promote one or more chosen candidates from a draft to live templates.

The first picked index finalizes the draft row in place. Each
remaining picked index is cloned into a fresh ai_gen row so the
gallery shows N independent entries.

Rejects:
- 404: template id missing / owned by someone else / not an
  ai_gen draft.
- 409: draft already finalized (``is_active=true`` already).
- 422: any picked index is out of range, duplicated, OR points at a
  candidate whose anatomy gate failed.

## Path parameters

- `template_id` string, uuid, required

## Request body

- HandTemplateFinalizeRequest: Body for `POST /api/hand-templates/{draft_id}/finalize`. The user may save one OR many candidates from the same draft. The first picked index keeps the draft row; the rest are cloned into new `ai_gen` rows so each finalized candidate becomes its own template.
  - `picked_indices` integer[], required

## Response `200`

Successful Response

- HandTemplateFinalizeResponse: Returned by `POST /finalize`. One item per saved candidate, in the order the client supplied `picked_indices`.
  - `items` HandTemplateResponse[], required
    - `id` string, uuid, required
    - `slug` string, required
    - `label` string, required
    - `pose` 'single_hand' | 'two_hands_layered' | 'fist_flat_dual' | 'holding_prop', required
    - `skin_tone` 'fair' | 'light' | 'medium' | 'tan' | 'deep', required
    - `aspect_ratio` '1:1' | '4:5' | '3:4' | '16:9', required
    - `background` 'white' | 'gradient' | 'extended', required
    - `prop_slug` string, nullable
    - `hand_url` string, required
    - `preview_url` string, nullable
    - `source` 'admin' | 'upload' | 'ai_gen', required
    - `is_active` boolean, required
    - `gen_prompt` string, nullable
    - `owner_user_id` string, uuid, nullable
    - `preprocess_ready` boolean
    - `created_at` string, date-time, required
    - `updated_at` string, date-time, required

## Other responses

- `422`: Validation Error

---

[API](https://skmtc.dev/tintin-x/apis/tintin-api.md) · [All operations](https://skmtc.dev/tintin-x/apis/tintin-api/llms.txt) · [OpenAPI document](https://skmtc.dev/tintin-x/apis/tintin-api/revisions/8839a8d0a66c?raw)
