LatentKit

API Keys

Create and manage workspace API keys and route assignments in the LatentKit console.

API keys are how applications authenticate to LatentKit. Each key resolves to a workspace, a key identity, and the published route currently assigned to that key.

Create a key

  1. Open console.latentkit.com
  2. Go to API Keys (or use the default key from AI Router on first setup)
  3. Create a key and copy the secret immediately — masked keys cannot reveal the raw value later without rotation

Assign a route

Each key must have a published route assigned. Workspace admins configure routes under Routes and assign them per key in API Keys or AI Router.

If no eligible route exists for a request capability, LatentKit returns 503 with error.code: "NO_HEALTHY_PROVIDER".

Environment variable

Store the secret server-side:

export LATENTKIT_API_KEY="lk_..."

Official SDKs read LATENTKIT_API_KEY or accept the language-specific apiKey / api_key client option.

Manage keys

The console is the simplest place to create, rotate, and revoke keys. If you prefer terminal workflows, install the CLI and sign in:

npm install -g @latentkit/cli
latentkit login

See the CLI key-management guide for commands. New raw secrets are shown once; move them directly into your server or CI secret store.

Rotation

Rotate a key from the console when:

  • The secret was exposed
  • A teammate with access leaves
  • You need to invalidate an old integration

Update your deployment environment after rotation.

Console developer tools

The logged-in Developers section shows your selected key, route status, and copyable examples with workspace context. Public docs explain the contract; the console adds live state.

On this page