Every Ansdev Cloud API request requires an API key in the
x-ansdev-key header.
Getting a key
API keys are created from the Ansix Dashboard — not via the API:
- Sign in at ansix.ansdev.cloud
- Go to Dashboard → API Keys
- Click Generate New Key, give it a name, and pick a scope
- Copy the key immediately — it's shown only once
Key format
| Type | Prefix | Length | Example |
|---|---|---|---|
| Production | ak_live_ | 40 chars | ak_live_8f3a9b2c1d4e5f6a7b8c9d0e1f2a3b4c |
| Testing | ak_test_ | 40 chars | ak_test_1a2b3c4d5e6f7a8b9c0d1e2f3a4b5c6d |
Scopes
| Scope | Capability |
|---|---|
video:read | List videos, fetch metadata, generate playback tokens |
Additional scopes will be added as Cloud Vault and AI Tools become generally available.
Using a key
cURL
curl -H "x-ansdev-key: ak_live_8f3a9b2c1d4e5f6a7b8c9d0e1f2a3b4c" \
https://api.ansdev.cloud/v1/video
JavaScript
const res = await fetch('https://api.ansdev.cloud/v1/video', {
headers: { 'x-ansdev-key': process.env.ANSDEV_API_KEY },
});
const { success, data } = await res.json();
🚨 Keys are shown ONCE
The full key value is returned only at creation. We store the prefix plus a hash — we cannot show the secret again. If you lose a key, revoke it in the dashboard and create a new one.
Security best practices
- Never commit keys to source control. Use environment variables or a secrets manager.
- Never expose keys in client-side code. Generate playback tokens on your server and send only the short-lived token to the browser — see Generate Playback Token.
- Rotate keys regularly. Create a new key, deploy it, then revoke the old one.
- Use scoped keys. A
video:readkey cannot do anything other than read videos — limit blast radius if a key leaks. - Audit usage. The Ansix Dashboard shows per-key request counts and the last time each key was used.
Rate limits
See Rate Limits for the full table. Highlights:
- Metadata endpoints (list, get) are unlimited.
- Playback token generation is capped at 1,000 / day on the free tier.
Every rate-limited response includes:
| Header | Meaning |
|---|---|
X-RateLimit-Limit | Daily quota |
X-RateLimit-Remaining | Calls left in the current window |
X-RateLimit-Reset | Unix timestamp of next reset (UTC midnight) |
On 429 Too Many Requests, back off until Retry-After seconds
elapse.