> ## Documentation Index
> Fetch the complete documentation index at: https://docs.slng.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Connect Vapi to the Context Router

> Point a Vapi assistant at SLNG's OpenAI-compatible Context Router as a custom model to add response caching with a base-URL swap.

Vapi lets you bring your own OpenAI-compatible model by setting a custom provider URL on the assistant's model config. Point that URL at the SLNG [Context Router](/context-router) and your assistant keeps working unchanged while gaining response caching.

**Prerequisites:**

* A [Vapi](https://vapi.ai) account with an assistant you can edit.
* An SLNG key from [app.slng.ai/api-keys](https://app.slng.ai/api-keys).
* Your region-specific router base URL from your SLNG contact (looks like `https://india.context-router.slng.ai/v1`).

## Placeholders

The snippets below use these placeholders. Replace them before saving.

| Placeholder                               | Replace with                                                          |
| ----------------------------------------- | --------------------------------------------------------------------- |
| `SLNG_API_KEY`                            | An SLNG key from [app.slng.ai/api-keys](https://app.slng.ai/api-keys) |
| `https://india.context-router.slng.ai/v1` | The exact region-specific base URL SLNG gave you                      |

## Dashboard setup

<Steps>
  <Step title="Open your assistant's Model settings">
    In the Vapi dashboard, open the assistant you want to route, then go to the **Model** tab.

    <Frame caption="Vapi assistant Model tab">
      <img src="https://mintcdn.com/slng/SmJQakEUJwFNsCYg/images/Screenshot-2026-07-29-at-10.32.21.png?fit=max&auto=format&n=SmJQakEUJwFNsCYg&q=85&s=7ce7fb85de85d5f17b01c356fbb9b866" alt="Screenshot 2026 07 29 At 10 32 21" width="1716" height="1414" data-path="images/Screenshot-2026-07-29-at-10.32.21.png" />
    </Frame>
  </Step>

  <Step title="Select a custom OpenAI-compatible model">
    Choose the **Custom LLM** option (OpenAI-compatible). Set:

    * **URL / Base URL:** `https://india.context-router.slng.ai/v1`
    * **Model:** `slng/auto`
    * **API key:** `SLNG_API_KEY`

    <Frame caption="Custom model configuration">
      {/* TODO: replace with screenshot of the custom model fields filled in */}

      <img src="https://mintcdn.com/slng/SmJQakEUJwFNsCYg/images/Screenshot-2026-07-29-at-10.31.54.png?fit=max&auto=format&n=SmJQakEUJwFNsCYg&q=85&s=565e9d30a2828863d011e70ea2774ed0" alt="Screenshot 2026 07 29 At 10 31 54" width="828" height="1306" data-path="images/Screenshot-2026-07-29-at-10.31.54.png" />
    </Frame>
  </Step>

  <Step title="Save and place a test call">
    Save the assistant and start a call. SLNG now answers every turn.
  </Step>
</Steps>

The equivalent assistant JSON, if you configure Vapi through its API:

```json theme={null}
{
  "model": {
    "provider": "openai",
    "model": "slng/auto",
    "url": "https://india.context-router.slng.ai/v1",
    "apiKey": "SLNG_API_KEY"
  }
}
```

## Verify it is routing

Check Vapi's call logs, or replay a turn directly with the [cURL example](/llm-router#making-a-request). On a cached turn the router response carries `cached: true`. If you never see it, confirm caching is enabled for your org.

## Related

<CardGroup cols={2}>
  <Card title="Context Router" icon="route" href="/llm-router">
    Endpoint, auth, request body, and response caching.
  </Card>

  <Card title="Voice platform integrations" icon="cable" href="/integrations/overview">
    Other ways to route your stack through SLNG.
  </Card>
</CardGroup>
