Overview
The only public origin ishttps://api.allternit.com (Cloud API). Credentials depend on what you are calling.
Organization-scoped admin routes under
/api/v1/gateway/* require a Clerk JWT and an organization owner or admin role.
The Allternit API on :8013 is not a public auth surface. Production clients do not send tokens there. Relayed requests forward the original Clerk Authorization header to the node.
Local development may call
http://127.0.0.1:8013 on the same machine. That is the data plane, not a second production API.LLM gateway virtual keys
The Allternit LLM gateway uses virtual keys for authentication. Each virtual key is a scoped, rotatable credential that maps to a tenant, organization, or user profile. Virtual keys are used for all public/v1 gateway routes, including chat completions, embeddings, files, and batches.
Virtual keys
Virtual keys start withak-. The gateway stores only the SHA-256 hash of the key; the plaintext is shown once at creation and cannot be recovered.
Base URL
Public Cloud API (LLM gateway):cargo run -p allternit-api only):
Create a virtual key
This endpoint requires a Clerk JWT and organization owner or admin role.
Request body
Example response
List virtual keys
Update a virtual key
Revoke a virtual key
Authentication errors
Security best practices
- Store keys in environment variables or a secrets manager.
- Rotate keys regularly and revoke unused keys.
- Use separate keys for production, staging, and development.
- Set
monthly_budget_centsandrate_limit_rpmon every key. - Restrict
allowed_modelsto the smallest set required.
Related pages
- API Overview
- Cloud API
- Chat Completions — primary gateway endpoint
- Proxy — gateway middleware and request lifecycle
- Rate Limits — quota and budget details