API Authentication
Learn how to authenticate with the vid2scene API using API keys.
Overview
The vid2scene API uses API key authentication and is available to Enterprise users only. Each API key is associated with your user account and provides access to your own jobs.
🏢 Enterprise Requirement
API access is restricted to Enterprise subscribers. Only Enterprise users can generate API keys and access the API endpoints.
🔐 Security Notice
Keep your API keys secure and never share them publicly. API keys provide full access to your account and should be treated like passwords.
Getting an API Key
- Log in and go to your profile page
- Scroll to the "API Keys" section
- Enter a name like "My First API Key"
- Click "Generate API Key"
- Copy the key (you'll only see it once!)
Using API Keys
Include your API key in the Authorization
header of every API request:
Authorization: Api-Key YOUR_API_KEY_HERE
Example Request
curl -H "Authorization: Api-Key abc123def456..." \
-H "Content-Type: application/json" \
https://vid2scene.com/api/v1/jobs/
Authentication Errors
If authentication fails, you'll receive a 401 Unauthorized
response:
Error | Description | Solution |
---|---|---|
401 Unauthorized |
Missing or invalid API key | Check your API key and Authorization header |
403 Forbidden |
API key doesn't have permission | Ensure your account has the required permissions |
API Key Management
Key Properties
- Name: A descriptive name to help you identify the key
- Prefix: A short prefix shown for identification (e.g., "abc123")
- Created: When the key was generated
- Last Used: When the key was last used for API requests
Revoking Keys
You can revoke API keys at any time from your profile page. Revoked keys will immediately stop working for all API requests.
⚠️ Important
Revoking an API key cannot be undone. Any applications using that key will lose access immediately.
Best Practices
- Use descriptive names: Name your keys after their purpose (e.g., "Production App", "Testing", "Mobile App")
- Rotate keys regularly: Generate new keys and revoke old ones periodically
- Use environment variables: Store API keys in environment variables, never in code
- Monitor usage: Check the "Last Used" timestamp to identify unused keys
- Revoke unused keys: Remove keys that are no longer needed
Code Examples
Python
import requests
import os
API_KEY = os.environ['VID2SCENE_API_KEY']
headers = {
'Authorization': f'Api-Key {API_KEY}',
'Content-Type': 'application/json'
}
response = requests.get('https://vid2scene.com/api/v1/jobs/', headers=headers)
print(response.json())
JavaScript/Node.js
const apiKey = process.env.VID2SCENE_API_KEY;
fetch('https://vid2scene.com/api/v1/jobs/', {
headers: {
'Authorization': `Api-Key ${apiKey}`,
'Content-Type': 'application/json'
}
})
.then(response => response.json())
.then(data => console.log(data));
PHP
$apiKey = getenv('VID2SCENE_API_KEY');
$headers = [
'Authorization: Api-Key ' . $apiKey,
'Content-Type: application/json'
];
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, 'https://vid2scene.com/api/jobs/');
curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$response = curl_exec($ch);
curl_close($ch);
$data = json_decode($response, true);
print_r($data);