# Create template from render

Creates a clone template from an existing render, with all the render's layer modifications applied to it.\
The result is a template that matches the render output, which you can then tweak with the [Update template](/docs/templates/update/) endpoint and render again.

This is the API equivalent of opening a render in the editor: the source template is cloned and the render's payload is baked into the clone's HTML.

:::tip[Iterating on renders programmatically]

This endpoint is ideal for LLM / agent workflows that refine images step by step:

1. Create a render with the [Create render](/docs/renders/create/) endpoint
2. Create a template from that render with this endpoint
3. Tweak layer positions, texts, or crops with [Update template](/docs/templates/update/)
4. Render the new template

The clone keeps a link to the source template through `sourceTemplateId`, does not count toward your plan's template limit, and is not visible in your dashboard: you can list clones with the [List template clones](/docs/templates/clones/) endpoint.
:::

## Parameters

<span class="font-mono font-bold">renderId</span> `string` <code class="text-white !bg-red-500">REQUIRED</code>\
The id of the render that you want to create a template from.

## Behavior notes

- • Pages hidden in the render payload (`hide: true`), and, for multi-page payloads, pages not referenced at all, are removed from the clone, matching what the render produced.
- • Render-only options (`format`, `scale`, `transparent`, etc.) are not persisted in the template.
- • Renders created before payload storage was introduced return a plain clone of the source template.
- • Creating a template from a render is free: it does not consume render credits.
- • For multi-page renders, each page produces its own render object but all of them share the same payload. Creating a template from any one page's render id gives you a clone with ALL the payload's pages applied, not just that page.

## Sample Request

```js title="ENDPOINT"
POST /v1/template/from-render/:renderId
```

```js title="REQUEST" "renderId" "API_KEY"
fetch(`https://api.templated.io/v1/template/from-render/${renderId}`, {
  method: 'POST',
  headers: {
    'Authorization' : `Bearer ${API_KEY}`
  }
})
```

## Response

The API returns a JSON object with the new template details.

```json
{
  "id": "new-template-id-123",
  "name": "My Template",
  "width": 1200,
  "height": 800,
  "sourceTemplateId": "original-template-id-456",
  "isClone": true,
  "createdAt": "2026-07-17T10:30:00Z",
  "updatedAt": "2026-07-17T10:30:00Z",
}
```