Skip to main content
Keep your agent on ElevenLabs and route only its language model through the SLNG context router. You get smart routing, context optimisation, in-region execution, and compliant caching on every turn. Speech to text and text to speech stay on ElevenLabs.

Prerequisites

Set up in the dashboard

1

Choose ElevenLabs

Start a new project, choose Improve my agent, and under On a voice platform pick ElevenLabs.
New project chooser with the ElevenLabs voice platform highlighted

Pick ElevenLabs on the voice platform path.

2

Pick your model

Open the Think section and choose your LLM model. Keep Context Router on so the model routes through SLNG. Speech to text and text to speech stay on ElevenLabs.
Think section with the LLM model card highlighted, routed through SLNG

Choose your model in the Think section.

In your ElevenLabs dashboard

Click Integrate in the top right. The modal fills in your router URL and model, then walks you through the steps below in ElevenLabs.
ElevenLabs LLM settings panel with Custom LLM, Server URL, Model ID, API key, and request headers

The LLM settings panel in ElevenLabs.

1

Open the agent

Open your ElevenLabs agent and click on Agent under Configure.
2

Open the LLM settings

Scroll down to the LLM section and open it. The LLM settings panel opens on the right.
3

Switch to a custom LLM

In the panel, under LLM, switch from the default to Custom LLM.
4

Set the server URL

In the Server URL field, paste https://au.context-router.slng.ai/v1. Swap au for the region closest to your callers. ElevenLabs adds the Chat Completions path.
5

Set the model ID

In the Model ID field, enter the model you picked in the Think section, for example slng/auto.
6

Add your API key as a secret

Under API key, click Add new secret, name it SLNG_API_KEY, paste your SLNG API key value, and click Add secret.
7

Send the authorization header

Under Request headers, click Add header. Select the Secret tab, set Header name to Authorization and select SLNG_API_KEY as the secret.
8

Add agent and session headers

Add two more request headers so the router can tie each turn to your agent and call. For each, select the Variable tab and map it to an ElevenLabs system variable:
ElevenLabs Edit Request Header panel with X-Slng-Agent-Id mapped to the system__agent_id variable

Map X-Slng-Agent-Id to the system__agent_id variable.

ElevenLabs Edit Request Header panel with X-Slng-Session-Id mapped to the system__conversation_id variable

Map X-Slng-Session-Id to the system__conversation_id variable.

9

Save and test

Save your changes and run a test conversation to confirm the LLM is routing through SLNG.

Next steps