Authentication
Authenticate each supported API protocol safely with an AnyInt API key.
Every Developer API request requires an active AnyInt API key. Use the header expected by your client protocol so existing OpenAI, Anthropic, and Gemini SDKs continue to work.
Recommended Authentication by Protocol
| Protocol | Recommended input | Canonical API base |
|---|---|---|
| OpenAI compatible | Authorization: Bearer <AnyInt API Key> | https://api.anyint.ai/openai/v1 |
| Anthropic Messages | x-api-key: <AnyInt API Key> | https://api.anyint.ai/anthropic/v1 |
| Gemini Developer API | x-goog-api-key: <AnyInt API Key> | https://api.anyint.ai/gemini/v1beta |
| Async media | Authorization: Bearer <AnyInt API Key> | https://api.anyint.ai/v1/async-tasks |
For client compatibility, the gateway also accepts the supported AnyInt key headers across protocol families and accepts Gemini's key query parameter on Gemini routes. Prefer headers so credentials do not appear in URLs or intermediary logs.
The gateway consumes the AnyInt credential before provider routing. It never forwards that credential as an upstream provider key. Invalid, expired, or revoked keys fail closed.
Create a Key
Create an API key in Console, then store it in a server-side secret manager or environment variable.
Newly issued AnyInt keys use the sk- prefix followed by 52 Base64URL characters (55 characters total). Existing ak_ keys remain valid until you rotate or disable them. Always copy the complete value shown by Console; do not add or remove a prefix yourself.
export ANYINT_API_KEY="your_api_key"Security Guidelines
- Store keys in a server-side secret manager or environment variable.
- Never place a key in frontend JavaScript, source control, logs, or URLs.
- Use a separate key for each application and environment.
- Rotate a key immediately if it may have been exposed.
- Do not forward AnyInt keys to upstream providers.
Test Authentication
List models to verify the key before sending an inference request.
curl "https://api.anyint.ai/openai/v1/models" \
--header "Authorization: Bearer $ANYINT_API_KEY"An authentication failure returns HTTP 401 with a protocol-shaped error. A valid key can still receive 402 for insufficient balance or 503 when no eligible provider is available.