Skip to main content
AntiRouter authenticates server-side requests with API keys. Use an Inference key for video generation, task queries, and model discovery. Pass it in the 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 as production-video. Copy the key after creation; you can also reveal and copy it again from the list.
The header format is 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.
Keep keys in server-side environment variables or a secrets manager. Do not embed them in browser code, mobile apps, public repositories, or logs. Revoke an exposed key and update your application with a replacement.

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.