Prerequisites
- An SLNG API key. See Create your API key.
- A model for the router to answer with. Give it one of two ways:
- Register a BYOK LLM key in the dashboard. The router then routes
slng/autoto that model with nothing extra in the request. Use this for a voice platform integration, which only lets you set a base URL, an API key and a model. See Bring your own key. - Send your configuration inline in the
slng_configbody field when you call the API from your own code. Nothing to register in advance, and a request that carries it ignores any registered configuration. See BYOK Context Router.
- Register a BYOK LLM key in the dashboard. The router then routes
Configuration
Point your integration’s custom LLM at these values:
The Custom LLM guide covers the OpenAI-compatible
setup. Each platform guide has the exact steps for its dashboard or SDK:
ElevenLabs, Vapi,
Deepgram, LiveKit,
and Pipecat.
Agent and session headers
The router requires two headers on every request so it can tie each turn to the right agent and call:
Map them to your platform’s own agent and session values. In ElevenLabs they are
the
system__agent_id and system__conversation_id variables; in Vapi they are
{{assistant.id}} and {{call.id}}; in code you pass a stable agent ID and the
current session ID. Your platform guide lists the exact values.
Values are at most 256 characters and cannot contain spaces, commas, pipes (|) or
braces ({ }). An opaque ID or slug is always safe. A request missing either
header, or carrying a malformed one, returns a 400 with code missing_client_id
or invalid_client_id. When you call the API from your own code, send them as the
body fields slng_agent_id and slng_session_id instead.
The agent ID also scopes the response cache, so answers cached for one agent ID
are never served to another. When you change an agent’s prompt in a meaningful
way, give it a fresh agent ID, for example by adding a version suffix. Otherwise
answers produced under the old prompt stay in scope for the new one.