API Keys & Authentication
All Vanix AI API requests are authenticated over HTTPS (TLS 1.2+) using a single sk-... API token issued from Console → API Tokens.
Protocol Header Matrix
| Protocol | Required Header(s) | Example |
|---|---|---|
OpenAI (/v1/*) | Authorization | Authorization: Bearer sk-vanix-... |
Anthropic (/v1/messages) | x-api-key, anthropic-version | x-api-key: sk-vanix-... and anthropic-version: 2023-06-01 |
Google Gemini (/v1beta/*) | x-goog-api-key (or ?key=) | x-goog-api-key: sk-vanix-... |
| Realtime WebSocket | Authorization, OpenAI-Beta | Authorization: Bearer sk-vanix-... + OpenAI-Beta: realtime=v1 |
Never Expose Keys in Client Bundles
Browser apps and mobile clients should proxy requests through your own backend. Only use direct browser calls in local development or inside the Live API Playground.
Scoped Token Controls
Each Vanix AI token supports independent production guardrails configured in the Console:
| Guardrail | Description | Recommended Use |
|---|---|---|
| Quota Ceiling | Hard spending limit per token, independent of your account balance. | Cap spend per developer, CI pipeline, or tenant environment. |
| Model Allowlist | Restrict a token to specific model IDs (e.g., gpt-4o-mini, text-embedding-3-small). | Prevent accidental invocation of expensive frontier reasoning models. |
| Token Group | Bind a token to a routing group (e.g., default, vip, svip) with dedicated channels and pricing multipliers. | Separate staging traffic from high-priority production SLAs. |
| IP Allowlist | Accept requests only from listed egress IPs or CIDRs. | Lock server-side keys to NAT gateway or VPC egress addresses. |
| Expiration Time | Automatic revocation timestamp. | Temporary keys for demos, hackathons, or contractor access. |
Recommended Production Key Hygiene
- One key per workload: Issue separate keys for production API, batch jobs, coding CLIs, and local development so any single key can be revoked without downtime.
- Enforce least privilege: Apply both a Model Allowlist and a Quota Ceiling on every automated worker key.
- Zero-downtime rotation: Create a replacement token, roll it out through your secret manager (AWS Secrets Manager / SSM Parameter Store), monitor zero traffic on the old token in Console Logs, then disable and delete the old token.
Quick Verification
bash
curl -sS https://api.vanix.io/v1/models \
-H "Authorization: Bearer $VANIX_API_KEY" | head -c 400A 200 OK JSON response containing "object": "list" confirms your token is active and authorized.