Authentication

VideoPilot API uses API keys to authenticate requests. Include your API key in the request headers to access the API.

5 min readLast updated: January 15, 2024
Quick Start
Get authenticated in 2 simple steps

1. Generate an API Key

Create an API key from your VideoPilot dashboard

Go to API Keys

2. Include in Your Requests

Add your API key to the request headers

"text-blue-400 font-semibold">curl https://api.videopilot.app/api/videos \
  -H "x-api-key: vp_your_api_key_here"
API Key Format
Understanding VideoPilot API keys
vp_1234567890abcdef1234567890abcdef
vp_Prefix identifying VideoPilot keys
32 charactersUnique key identifier
Authentication Methods
Two ways to include your API key

Method 1: x-api-key Header (Recommended)

Use the custom x-api-key header for cleaner requests

JavaScript (Fetch)javascript
fetch('https://api.videopilot.app/api/videos', {
  headers: {
    'x-api-key': 'vp_your_api_key_here',
    'Content-Type': 'application/json'
  }
})
Python (Requests)python
import requests

response = requests.get(
  'https://api.videopilot.app/api/videos',
  headers={
    'x-api-key': 'vp_your_api_key_here'
  }
)

Method 2: Authorization Header

Use the standard Authorization header with Bearer scheme

JavaScript (Axios)javascript
axios.get('https://api.videopilot.app/api/videos', {
  headers: {
    'Authorization': 'Bearer vp_your_api_key_here'
  }
})
PHP (cURL)php
$ch = curl_init('https://api.videopilot.app/api/videos');
curl_setopt($ch, CURLOPT_HTTPHEADER, [
  'Authorization: Bearer vp_your_api_key_here'
]);
$response = curl_exec($ch);
Security Best Practices
Keep your API keys secure

Store keys securely

Use environment variables or secret management systems

Rotate keys regularly

Create new keys and delete old ones periodically

Use separate keys per environment

Different keys for development, staging, and production

Monitor usage

Check your API key usage regularly for anomalies

Rate Limiting
API key rate limits and quotas
100
Requests per hour
20
Videos per day
5
Concurrent renders
HTTP/1.1 200 OK
X-RateLimit-Limit: 100
X-RateLimit-Remaining: 95
X-RateLimit-Reset: 2024-01-15T10:00:00Z
Authentication Errors
Common authentication error responses
401 Unauthorized

Missing or invalid API key

{
  "error": {
    "message": "Invalid API key",
    "code": "UNAUTHORIZED",
    "status": 401
  }
}
403 Forbidden

Valid API key but insufficient permissions

{
  "error": {
    "message": "Insufficient permissions",
    "code": "FORBIDDEN",
    "status": 403
  }
}
429 Too Many Requests

Rate limit exceeded

{
  "error": {
    "message": "Rate limit exceeded",
    "code": "RATE_LIMITED",
    "status": 429,
    "retryAfter": 3600
  }
}
Next Steps
Start using the VideoPilot API