Overview

The only public origin is https://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 with ak-. 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):
Local Allternit API (desktop / 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

Never commit virtual keys to version control.
  • 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_cents and rate_limit_rpm on every key.
  • Restrict allowed_models to the smallest set required.