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

# Get Hook Title Templates

> Retrieve a list of all available hook title templates

# Get Hook Title Templates

Retrieve a list of all hookt title available templates that can be applied to your projects. Hook titles render an animated caption for the first seconds of your video to grab attention before the main captions begin.

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

## Response

<ResponseField name="templates" type="array">
  Array of available hook title template names
</ResponseField>

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

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

  const data = await response.json();
  console.log(data.templates);
  ```

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

  headers = {
      'x-api-key': 'sk-your-api-key-here'
  }

  response = requests.get(
      'https://api.submagic.co/v1/hook-title/templates',
      headers=headers
  )
  data = response.json()

  print("Available templates:", data['templates'])
  ```
</RequestExample>

<ResponseExample>
  ```json Response theme={null}
  {
    "templates": [
      "tiktok",
      "laura",
      "steph",
      "kevin",
      "kelly",
      "mark",
      "logan",
      "enrico",
      "mike",
      "devin",
      "hormozi",
      "masi",
      "ali"
    ]
  }
  ```
</ResponseExample>

## Using Hook Title Templates

When creating a project or updating a project, specify the template name in your request:

<CodeGroup>
  ```json Example theme={null}
  "hookTitle": {
    "text": "Stop scrolling—watch this in 30 seconds",
    "template": "tiktok",
    "top": 45,
    "size": 32
  }
  ```
</CodeGroup>

## Response

<ResponseField name="templates" type="array">
  Array of available hook title template names
</ResponseField>

## Request Example

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

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

const { templates } = await response.json();
console.log("Hook title templates:", templates);
```

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

headers = {'x-api-key': 'sk-your-api-key-here'}
response = requests.get(
    'https://api.submagic.co/v1/hook-title/templates',
    headers=headers
)
templates = response.json()['templates']
print("Hook title templates:", templates)
```

## Example Response

```json theme={null}
{
  "templates": [
    "tiktok",
    "laura",
    "steph",
    "kevin",
    "kelly",
    "mark",
    "logan",
    "enrico",
    "mike",
    "devin",
    "hormozi",
    "masi",
    "ali"
  ]
}
```

## Error Handling

<ResponseField name="401 Unauthorized" type="object">
  ```json theme={null}
  {
    "error": "UNAUTHORIZED",
    "message": "Invalid or missing API key"
  }
  ```
</ResponseField>

<ResponseField name="429 Rate Limited" type="object">
  ```json theme={null}
  {
    "error": "RATE_LIMIT_EXCEEDED",
    "message": "Too many requests",
    "retryAfter": 30
  }
  ```
</ResponseField>

<ResponseField name="400 Validation Error" type="object">
  ```json theme={null}
  {
    "error": "VALIDATION_ERROR",
    "message": "Invalid template name"
  }
  ```
</ResponseField>

<Info>
  If you don't specify a `hookTitle` when creating a project, the system will
  automatically apply the "tiktok" template.
</Info>

<Warning>
  Template names are case-sensitive. Make sure to use the exact template name as
  returned by this endpoint.
</Warning>

{" "}
