Skip to main content

API Key Authentication

All API requests must be authenticated using an API key passed in the request headers.

Getting Your API Key

1

Access your dashboard

Log in to app.slidevid.ai
2

Navigate to API settings

Go to SettingsAPI Keys
3

Generate a new key

Click “Generate New API Key” and give it a descriptive name
4

Save your key

Copy and store your API key securely - you won’t be able to see it again

Try It in the Playground

You can test all API endpoints directly in this documentation!Click on any endpoint (like List Avatars) and you’ll see an Authorization field where you can enter your API key to make real requests.

How to Use the API Playground:

  1. Navigate to any API endpoint page
  2. Look for the Authorization or x-api-key field at the top
  3. Enter your API key
  4. Modify the request parameters if needed
  5. Click “Send” to see the real response
Your API key is securely stored in your browser’s localStorage, so you only need to enter it once per browser.
Start with List Avatars - it’s a simple GET request perfect for testing!

Using Your API Key in Code

Include your API key in the x-api-key header of every request:
curl -X GET "https://api.slidevid.ai/v1/avatar/list" \
  -H "x-api-key: your_api_key_here"
const axios = require('axios');

const api = axios.create({
  baseURL: 'https://api.slidevid.ai/v1',
  headers: {
    'x-api-key': 'your_api_key_here',
    'Content-Type': 'application/json'
  }
});

// Example request
const response = await api.get('/avatar/list');
console.log(response.data);

Security Best Practices

Never expose your API key in client-side code or public repositories.

Environment Variables

Store your API key in environment variables:
SLIDEVID_API_KEY=your_api_key_here

API Key Management

For production applications, rotate your API keys every 90 days. Create a new key before deleting the old one to avoid downtime.
Create separate API keys for development, staging, and production environments.
We’re adding support for IP whitelisting to further secure your API keys.
Check your API usage in the dashboard to detect any unusual activity.

Error Responses

If authentication fails, you’ll receive a 401 Unauthorized response:
{
  "success": false,
  "message": "Authentication required. Please provide a valid API key in the x-api-key header."
}

Common Authentication Errors

ErrorCauseSolution
401 UnauthorizedMissing or invalid API keyCheck that your key is correct and included in headers
403 ForbiddenAPI key doesn’t have required permissionsVerify your subscription plan includes API access
429 Too Many RequestsRate limit exceededWait before making more requests or upgrade your plan

Rate Limiting

API requests are rate-limited based on your subscription plan:
PlanRate LimitBurst Limit
Free10 requests/minute20 requests
Starter60 requests/minute100 requests
Pro300 requests/minute500 requests
Premium1000 requests/minute2000 requests

Rate Limit Headers

Each response includes rate limit information in the headers:
X-RateLimit-Limit: 60
X-RateLimit-Remaining: 45
X-RateLimit-Reset: 1642416000

Handling Rate Limits

Implement exponential backoff when you receive a 429 response:
async function makeRequestWithRetry(url, options, maxRetries = 3) {
  for (let i = 0; i < maxRetries; i++) {
    try {
      const response = await fetch(url, options);
      
      if (response.status === 429) {
        const retryAfter = response.headers.get('Retry-After') || Math.pow(2, i);
        await new Promise(resolve => setTimeout(resolve, retryAfter * 1000));
        continue;
      }
      
      return response;
    } catch (error) {
      if (i === maxRetries - 1) throw error;
    }
  }
}

Testing Your Authentication

Test your API key with a simple request:
curl -X GET "https://api.slidevid.ai/v1/avatar/list?type=library" \
  -H "x-api-key: your_api_key_here"
If you receive a successful response with avatar data, your authentication is working correctly!

Need Help?