Route your Vapi assistant’s language model through the SLNG context router. Speech to text and text to speech stay on Vapi.
Keep your assistant on Vapi 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 Vapi.
Start a new project, choose Improve my agent, and under On a voice
platform pick Vapi.
Pick Vapi 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 Vapi.
Click Integrate in the top right. The modal fills in your router URL and
model, then walks you through the steps below in Vapi.
The Model Settings panel in Vapi.
1
Open Model Settings
Open your Vapi assistant and click
the edit icon on the Model card to open Model Settings.
2
Select the custom LLM provider
In the Provider dropdown, select Custom llm.
3
Set the model
In the Model field, enter the model you picked in the Think section, for
example slng/auto.
4
Set the custom LLM URL
In the Custom LLM URL field, paste
https://au.context-router.slng.ai/v1/chat/completions. Swap au for the
region closest to your callers.
5
Add your API key
Go to Integrations at the bottom of the side menu. Under Model
Providers, click the Custom LLM card and enter your SLNG API key in the
API Key field. Click Save.
6
Add agent and session headers
Under Headers for the custom LLM, add these values:
Header
Value
X-Slng-Agent-Id
{{assistant.id}}
X-Slng-Session-Id
{{call.id}}
7
Publish and test
Click Publish and run a test conversation to confirm the LLM is routing
through SLNG.