Overview
Destined Voice API uses Bearer token authentication. Include your API key in the Authorization header of every request.
Getting Your API Key
- Sign up at destined.ai
- Navigate to Settings > API Keys
- Click Create API Key
- Copy and store your key securely
Keep your API key secret. Never commit it to version control or expose it in client-side code.
Using the API Key
With the SDK
import { SDK } from "@destined-ai/voice";
const client = new SDK({
bearerToken: process.env.DESTINED_API_KEY,
});
With cURL
curl -X GET "https://api.destined.ai/v1/speakers" \
-H "Authorization: Bearer YOUR_API_KEY"
With fetch
const response = await fetch("https://api.destined.ai/v1/speakers", {
headers: {
"Authorization": `Bearer ${process.env.DESTINED_API_KEY}`,
"Content-Type": "application/json",
},
});
Public Endpoints
Some endpoints don’t require authentication:
| Endpoint | Description |
|---|
GET /health | API health check |
GET /v1/speakers | List available speakers |
POST /v1/stt/calculate-accuracy | Calculate WER/CER metrics |
Rate Limits
Rate limits vary by subscription tier:
| Tier | Requests/minute | Requests/day |
|---|
| Starter | 60 | 1,000 |
| Pro | 300 | 10,000 |
| Enterprise | 1,000 | Unlimited |
Rate limit headers are included in every response:
X-RateLimit-Limit: Maximum requests allowed
X-RateLimit-Remaining: Requests remaining
X-RateLimit-Reset: Unix timestamp when limit resets
Error Responses
Authentication errors return a 401 Unauthorized response:
{
"detail": "Invalid or expired API key"
}
Common authentication issues:
| Error | Cause | Solution |
|---|
401 Unauthorized | Missing or invalid API key | Check your API key is correct |
403 Forbidden | Insufficient permissions | Upgrade your subscription tier |
429 Too Many Requests | Rate limit exceeded | Wait and retry, or upgrade tier |