> ## Knowledge Base Index
> Fetch the complete knowledge base index at: https://help.templated.io/sitemap.xml
> Use this file to discover available pages before exploring further.
> Pure-Markdown content can be obtained by appending a '.md' suffix to the content URLs listed in the sitemap (without the trailing slash).

# API Overview and Authentication

# API Overview and Authentication

The Templated API allows you to programmatically generate images, PDFs, and videos from your templates.

## Base URL

All API requests are made to:
```
https://api.templated.io/v1/
```

## Authentication

Templated uses **Bearer token authentication**. Include your API key in the `Authorization` header of every request:

```bash
Authorization: Bearer YOUR_API_KEY
```

### Example Request

```javascript
fetch('https://api.templated.io/v1/render', {
  method: 'POST',
  headers: {
    'Content-Type': 'application/json',
    'Authorization': 'Bearer YOUR_API_KEY'
  },
  body: JSON.stringify({
    template: 'TEMPLATE_ID',
    layers: {
      title: { text: 'Hello World' }
    }
  })
});
```

## Finding Your API Key

1. Log in to your [Templated dashboard](https://app.templated.io)
2. Go to **API Integration** in the sidebar
3. Your API key is displayed there—click to copy

## Rate Limits

API requests are subject to rate limiting based on your plan. If you exceed the limit, you'll receive a `429 Too Many Requests` response.

For complete API documentation, visit: [https://templated.io/docs/authentication/](https://templated.io/docs/authentication/)