> ## 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.

# Custom LLM

> Use the Context Router with an OpenAI-compatible client or agent integration.

Use the Context Router as the model in an OpenAI-compatible client or supported
agent integration. You can configure it in an agent framework or a voice
platform with a custom LLM field.

<Note>
  Use an agent integration such as [ElevenLabs](/guides/integrate/elevenlabs),
  [Vapi](/guides/integrate/vapi), [Deepgram](/guides/integrate/deepgram),
  [LiveKit](/guides/integrate/livekit), or [Pipecat](/guides/integrate/pipecat).
</Note>

## Prerequisites

* A supported agent integration that accepts a custom OpenAI-compatible LLM.
* An SLNG API key. See [Create your API key](/guides/get-started/quickstart#create-your-api-key).
* A BYOK LLM key registered in your org, so the router has a model to route to. See [Bring your own key](/guides/models/bring-your-own-key).

## Configuration

Use these three values:

| Setting                                                                                                                                | Value                                       |
| -------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------- |
| <Tooltip tip="Choose the region closest to your callers." cta="View regions map" href="/guides/regions/regions-map">Base URL</Tooltip> | `https://au.context-router.slng.ai/v1`      |
| API key                                                                                                                                | your SLNG API key, read from `SLNG_API_KEY` |
| <Tooltip tip="slng/auto lets the router pick the model per turn. Enter a specific model ID to pin one.">Model</Tooltip>                | `slng/auto`                                 |

## Configure your agent integration

In your agent integration, enter the base URL and model from the table above.
Store your API key in the platform's secret manager or environment, then send it
as an `Authorization: Bearer <SLNG API key>` header.

The router also requires two headers that tie each turn to a SLNG agent and call:
`X-Slng-Agent-Id` and `X-Slng-Session-Id`. Map them to your platform's agent and
session identifiers. Your platform guide lists the exact values to use.

Follow your framework or platform guide for its exact configuration steps.

<Note>
  Read the key from the environment. Do not paste the literal value into your
  code or a shared config.
</Note>

## Next steps

* [Context Router API reference](/api-reference/context-router/chat-completions)
  for request and response fields.
* [Integrating the context router](/guides/execution-layer/llm/context-router)
  for how routing works with your own keys or SLNG-hosted models.
