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

# List Templates

> Retrieve a paginated list of your templates

## Overview

Retrieve all templates created by your account with pagination support. Results are ordered by creation date (newest first).

## Query Parameters

<ParamField query="page" type="integer">
  Page number to retrieve (default: 1, minimum: 1).
</ParamField>

<ParamField query="per_page" type="integer">
  Number of templates per page (default: 10, minimum: 1, maximum: 100).
</ParamField>

## Response

<ResponseField name="templates" type="array" required>
  Array of template objects.
</ResponseField>

<ResponseField name="total" type="integer" required>
  Total number of templates across all pages.
</ResponseField>

### Template Object

<ResponseField name="templates[].id" type="string" required>
  Unique identifier (UUID) for the template.
</ResponseField>

<ResponseField name="templates[].user_id" type="string" required>
  UUID of the user who owns this template.
</ResponseField>

<ResponseField name="templates[].name" type="string" required>
  The template's name.
</ResponseField>

<ResponseField name="templates[].description" type="string" required>
  The template's description.
</ResponseField>

<ResponseField name="templates[].created_at" type="string" required>
  ISO 8601 timestamp when the template was created.
</ResponseField>

<ResponseField name="templates[].updated_at" type="string" required>
  ISO 8601 timestamp when the template was last updated.
</ResponseField>

## Example Response

```json theme={null}
{
  "templates": [
    {
      "id": "t1e2m3p4-l5a6-7890-abcd-ef1234567890",
      "user_id": "7c9e6679-7425-40de-944b-e07fc1f90ae7",
      "name": "Text to Image - Standard",
      "description": "Basic text-to-image generation with SDXL",
      "created_at": "2024-01-15T10:00:00Z",
      "updated_at": "2024-01-15T10:00:00Z"
    }
  ],
  "total": 1
}
```

## Error Responses

<ResponseField name="401" type="error">
  Unauthorized - invalid or missing authentication token.
</ResponseField>

## Notes

* Results are ordered by creation date (newest first)
* Use pagination for accounts with many templates
* The `total` field indicates the total count across all pages
