> ## Documentation Index
> Fetch the complete documentation index at: https://docs.submagic.co/llms.txt
> Use this file to discover all available pages before exploring further.

# Iris Templates

> List the Iris templates (editing styles) your account can use

# Iris Templates

Iris is Submagic's editing assistant. She edits a talking video of up to 3 minutes in one of her templates (cuts, captions, b-roll from stock, music, sound effects, graphics), then changes it when you ask in plain words.

This endpoint lists the Iris templates your account can pick: ours, and any you or your team made in Submagic. Pass a template's `id` as `template` to [Create Iris Project](https://docs.submagic.co/api-reference/iris-create-project.md).

> [!NOTE]
>
> This endpoint requires authentication and has a rate limit of 1000 requests
> per hour. It does not use API credits.

## Authentication

**x-api-key** `string` *required*

Your Submagic API key starting with `sk-`

## Response

**templates** `array`

The Iris templates your account can use

**Template Object**

**id** `string`

Template ID, e.g. `ref:paprika-ref`

**name** `string`

Template name

**description** `string`

One line on what the style looks like and what it suits

**previewUrl** `string | null`

A short clip of the style, or `null` when it has none

**imageUrl** `string | null`

A still image of the style, or `null` when it has none

```bash cURL theme={null}
curl -X GET "https://api.submagic.co/v1/iris/templates" \
  -H "x-api-key: sk-your-api-key-here"
```

```javascript JavaScript theme={null}
const listIrisTemplates = async () => {
  const response = await fetch("https://api.submagic.co/v1/iris/templates", {
    headers: {
      "x-api-key": "sk-your-api-key-here",
    },
  });

  return response.json();
};

const { templates } = await listIrisTemplates();
```

```python Python theme={null}
import requests

def list_iris_templates():
    url = 'https://api.submagic.co/v1/iris/templates'
    headers = {
        'x-api-key': 'sk-your-api-key-here'
    }

    response = requests.get(url, headers=headers)
    return response.json()

templates = list_iris_templates()['templates']
```

```json 200 OK theme={null}
{
  "templates": [
    {
      "id": "ref:paprika-ref",
      "name": "Paprika",
      "description": "A one-sentence summary of the template's style",
      "previewUrl": "https://cdn.example.com/iris/paprika-ref/preview.mp4",
      "imageUrl": "https://cdn.example.com/iris/paprika-ref/preview.jpg"
    }
  ]
}
```

```json 401 UNAUTHORIZED theme={null}
{
  "error": "UNAUTHORIZED",
  "message": "Invalid or missing API key"
}
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.