API Keys
API Keys
API keys authenticate API requests to AntCDN (uploads, management, analytics). Send them in the X-Api-Key header.
Tip
API keys are created and managed in the AntCDN dashboard.
Use an API key
curl -X GET "https://api.antcdn.net/v1/videos" \ -H "X-Api-Key: ${APIKEY}"Keep API keys server-side
Caution
Never put API keys in client-side code (browser/mobile). Use your backend as a proxy when you need to call the AntCDN API.
For client playback, clients should use Edge Keys and (for private videos) jwt=... rather than API keys.
Common errors
| Error | Cause | Fix |
|---|---|---|
401 Unauthorized | Missing or invalid key | Check X-Api-Key |
403 Forbidden | Key lacks permissions | Use a key with the right access |
Next steps
- Upload a video: create a video and upload it
- Play a video: stream via Edge Keys (+ JWT for private)
- Analytics: monitor usage and performance