Docs
Authentication
Authentication
Learn how to authenticate with the YT AI Thumbnail API using API keys.
Authentication
All REST API requests require authentication using an API key. API keys are scoped to your organization and provide access to all organization resources.
Creating an API Key
- Go to your Dashboard Settings
- Navigate to the "API Keys" section
- Click "Create API Key"
- Give your key a descriptive name (e.g., "Production App", "Development")
- Set an expiration date (optional)
- Copy the key immediately - it will only be shown once
Using Your API Key
Include your API key in the Authorization header of every request:
curl https://www.thumbnailcreator.com/api/v1/auth/verify \
-H "Authorization: Bearer api_your_key_here"Use the key exactly as the bearer token. Do not put it in a query string or send it as an X-API-Key header.
API Key Format
API keys follow this format:
- Prefix:
api_ - Length: 36 characters total
- Example:
api_a1b2c3d4e5f6a7b8c9d0e1f2a3b4c5d6
Verifying Your Key
Test that your API key is valid:
curl https://www.thumbnailcreator.com/api/v1/auth/verify \
-H "Authorization: Bearer api_your_key_here"Response:
{
"data": {
"valid": true,
"organization": {
"id": "uuid",
"name": "Your Organization",
"tier": "creator"
},
"user": {
"id": "uuid",
"name": "John Doe",
"email": "john@example.com"
}
}
}Developer API keys authenticate the REST API only. The MCP endpoint uses OAuth account linking and does not accept a developer API key as its access token.
Security Best Practices
- Never expose API keys in client-side code - API keys should only be used server-side
- Use environment variables - Store keys in environment variables, not in code
- Rotate keys regularly - Create new keys periodically and revoke old ones
- Set expiration dates - Use key expiration for additional security
- Use separate keys for development and production - This allows you to revoke dev keys without affecting production
Error Responses
| Status | Error | Description |
|---|---|---|
| 401 | Missing Authorization header | No Authorization header provided |
| 401 | Invalid Authorization header format | Header doesn't match Bearer <token> format |
| 401 | API key not found or expired | Key is invalid, revoked, or expired |
Revoking Keys
To revoke an API key:
- Go to your Dashboard Settings
- Find the key in the "API Keys" section
- Click the delete/revoke button
- Confirm the action
Revoked keys immediately stop working for all requests.