Authorization header on every request.
Choose a key type
These types are not interchangeable. An account key cannot generate videos or query video tasks.
Create and use a key
Open API Keys, choose the key type, select Create key, and enter a name. Create separate keys for each application or environment, such asproduction-video. Copy the key after creation; you can also reveal and copy it again from the list.
Authorization: Bearer sk-.... ANTI_API_KEY is the environment variable used in these examples; use the variable name that fits your application.
Control access
- Disable a key with its Enabled switch to pause access. You can enable it again later.
- Revoke a key to permanently deny access with that credential. Create a replacement key if needed.
- Restrict IPs in Security with individual IP addresses or CIDR ranges. Include your application’s public egress IP before enabling the allowlist. The setting applies to API keys across your account.
Resolve authentication errors
401 unauthorized can mean a missing, invalid, wrong-type, disabled, or revoked key. It can also mean the request IP is outside your allowlist. Check the header and key type first, then the console settings and egress IP. Do not share a complete API key while troubleshooting.