LatentKit

Core Concepts

Routes, API keys, capabilities, and how LatentKit resolves provider execution.

API keys

Each API key belongs to one workspace and one key identity. The key's assigned published route determines provider/model selection for every /v1/* request.

Routes and policies

Build routes (routing policies) in the console from ordered provider/model attempts, capability filters, budgets, and optional request overrides. Publishing a route makes it available for assignment to API keys.

Your application never references route IDs directly — assignment happens in the console.

Capabilities

Endpoints map to capabilities such as text, embeddings, image_generation, and vision. The route's model catalog and provider support must include an eligible model for the requested capability.

Common public endpoints:

EndpointCapability
POST /v1/chatText / chat
POST /v1/completeText completion
POST /v1/embeddingsEmbeddings
POST /v1/imageImage generation
POST /v1/visionVision
POST /v1/transcriptionAudio input / speech-to-text
POST /v1/translationAudio input / translation
POST /v1/speechAudio output / text-to-speech
POST /v1/videoVideo generation
POST /v1/queueAsync wrapper around any endpoint above

Some capabilities are added automatically from request content: image parts in chat messages require vision, tools requires function_calling, and "modalities": ["audio"] requires audio_output. See Models & providers for the full capability matrix.

Request lifecycle

Every /v1/* request follows the same path:

  1. Authenticate — LatentKit validates the API key.
  2. Load the route — the published route assigned to the key is selected.
  3. Find eligible models — models are filtered by capability, availability, and plan access.
  4. Run with fallback — eligible route entries are attempted according to the configured strategy.
  5. Return one response — the winning provider response is normalized into the public response contract.

Failover

When the first route attempt fails with a retryable provider error, LatentKit tries the next eligible route in the published policy. The client still receives one response.

Response profiles

response_profile (fast, balanced, deep) lets applications request a speed/depth tradeoff when the assigned route allows overrides. If overrides are disabled, the route default applies.

Credits and BYOK

  • Platform Access routes consume LatentKit credits (or trial allowance on Free plans).
  • BYOK routes use your provider credentials; LatentKit does not bill model usage for those requests.

Playground and console testing

Use AI Router or Playground in the console to validate key, route, provider, and billing state before debugging application code. Public docs show the contract; console tools know your workspace state.

On this page