> ## 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.

# List Presets

> List the presets in your library

# List Presets

Retrieve a paginated list of your presets, newest first. Use cursor-based navigation to page through results.

<Note>
  This endpoint requires authentication and has a rate limit of 1000 requests
  per hour.
</Note>

## Authentication

<ParamField header="x-api-key" type="string" required>
  Your Submagic API key starting with `sk-`
</ParamField>

## Query Parameters

<ParamField query="limit" type="number">
  Number of presets to return per page (1-100). Defaults to `50`.
</ParamField>

<ParamField query="cursor" type="string">
  UUID cursor for pagination. Pass the `nextCursor` value from a previous
  response to fetch the next page.
</ParamField>

## Response

<ResponseField name="data" type="array">
  Array of preset objects. See [Get Preset](/api-reference/get-preset) for the
  full object shape.
</ResponseField>

<ResponseField name="pagination" type="object">
  <Expandable title="Pagination Object" defaultOpen>
    <ResponseField name="hasMore" type="boolean">
      Whether there are more presets beyond this page
    </ResponseField>

    <ResponseField name="nextCursor" type="string">
      Cursor to pass as the `cursor` query parameter to fetch the next page.
      Only present when `hasMore` is `true`.
    </ResponseField>
  </Expandable>
</ResponseField>

<RequestExample>
  ```bash cURL theme={null}
  curl -X GET "https://api.submagic.co/v1/presets?limit=10" \
    -H "x-api-key: sk-your-api-key-here"
  ```

  ```javascript JavaScript theme={null}
  const listPresets = async ({ limit, cursor } = {}) => {
    const params = new URLSearchParams();
    if (limit) params.set("limit", String(limit));
    if (cursor) params.set("cursor", cursor);

    const response = await fetch(
      `https://api.submagic.co/v1/presets?${params}`,
      {
        headers: {
          "x-api-key": "sk-your-api-key-here",
        },
      }
    );

    return response.json();
  };

  const page = await listPresets({ limit: 10 });

  if (page.pagination.hasMore) {
    const nextPage = await listPresets({
      limit: 10,
      cursor: page.pagination.nextCursor,
    });
  }
  ```

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

  def list_presets(limit=None, cursor=None):
      url = 'https://api.submagic.co/v1/presets'
      headers = {
          'x-api-key': 'sk-your-api-key-here'
      }
      params = {}
      if limit:
          params['limit'] = limit
      if cursor:
          params['cursor'] = cursor

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

  page = list_presets(limit=10)

  if page['pagination']['hasMore']:
      next_page = list_presets(
          limit=10,
          cursor=page['pagination']['nextCursor']
      )
  ```
</RequestExample>

<ResponseExample>
  ```json 200 OK theme={null}
  {
    "data": [
      {
        "id": "550e8400-e29b-41d4-a716-446655440000",
        "name": "My TikTok Preset",
        "captions": true,
        "hookTitle": true,
        "magicZooms": true,
        "magicBrolls": false,
        "logo": false,
        "colorFilter": false,
        "cleanAudio": true,
        "eyeContactCorrection": false,
        "music": true,
        "musicVolume": 25,
        "configured": {
          "captions": true,
          "hookTitle": true,
          "logo": false,
          "colorFilter": false,
          "music": true
        },
        "sourceProjectId": "88a08eec-712a-45d0-8d0b-3b631700cb3a",
        "createdAt": "2024-01-10T08:00:00.000Z",
        "updatedAt": "2024-01-12T09:30:00.000Z"
      }
    ],
    "pagination": {
      "hasMore": true,
      "nextCursor": "f5e4d3c2-b1a0-9876-fedc-ba0987654321"
    }
  }
  ```

  ```json 200 OK (empty) theme={null}
  {
    "data": [],
    "pagination": {
      "hasMore": false
    }
  }
  ```
</ResponseExample>
