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

# Deepgram

> Route your Deepgram Voice Agent's language model through the SLNG context router. Speech to text and text to speech stay on Deepgram.

Keep your agent on Deepgram 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 Deepgram.

## Prerequisites

* A running Deepgram Voice Agent.
* 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).

## Set up in the dashboard

<Steps>
  <Step title="Choose Deepgram">
    Start a new project, choose **Improve my agent**, and under **On a voice
    platform** pick **Deepgram**.

    <Frame caption="Pick Deepgram on the voice platform path.">
      <img src="https://mintcdn.com/slng-new-docs/_MURdOw87SJsfVag/heroshots/deepgram-select.png?fit=max&auto=format&n=_MURdOw87SJsfVag&q=85&s=ef24299817e6d761615ae16d997132d0" alt="New project chooser with the Deepgram voice platform highlighted" width="2560" height="1600" data-path="heroshots/deepgram-select.png" />
    </Frame>
  </Step>

  <Step title="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 Deepgram.

    <Frame caption="Choose your model in the Think section.">
      <img src="https://mintcdn.com/slng-new-docs/fgzHSTXC7k7AhIuF/heroshots/voice-platform-think.png?fit=max&auto=format&n=fgzHSTXC7k7AhIuF&q=85&s=2fa4ec0a6e82c37597d2890ed7d815e1" alt="Think section with the LLM model card highlighted, routed through SLNG" width="2560" height="1600" data-path="heroshots/voice-platform-think.png" />
    </Frame>
  </Step>
</Steps>

## In your Deepgram dashboard

Click **Integrate** in the top right. The modal fills in your router URL and
model, then walks you through the steps below in Deepgram.

<Frame caption="The LLM settings in the Deepgram Voice Agent.">
  <img src="https://mintcdn.com/slng-new-docs/fgzHSTXC7k7AhIuF/images/integrate/deepgram-llm-settings.png?fit=max&auto=format&n=fgzHSTXC7k7AhIuF&q=85&s=4f21a6304290fb71bf489415e7df7f0f" alt="Deepgram Voice Agent LLM tab with the custom model name, URL, API format, and headers fields" width="5760" height="5012" data-path="images/integrate/deepgram-llm-settings.png" />
</Frame>

<Steps>
  <Step title="Open the LLM tab">
    Open your [Deepgram Voice Agent](https://playground.deepgram.com/) and go to
    the **LLM** tab.
  </Step>

  <Step title="Select a custom model">
    In the **Model** dropdown, select **Other - Custom model**.
  </Step>

  <Step title="Set the custom model name">
    In **Custom Model Name**, enter the model you picked in the **Think** section, for
    example `slng/auto`.
  </Step>

  <Step title="Set the custom model URL">
    In **Custom Model URL**, paste
    `https://au.context-router.slng.ai/v1/chat/completions`. Swap `au` for the
    [region](/guides/regions/regions-map) closest to your callers.
  </Step>

  <Step title="Set the API format">
    In **Custom Model API Format**, select **OpenAI**.
  </Step>

  <Step title="Add the authorization header">
    Under **Custom Model Headers**, add a header `Authorization` : `Bearer`
    followed by your actual SLNG API key value.
  </Step>

  <Step title="Save and test">
    Save and run a test conversation to confirm the LLM is routing through SLNG.
  </Step>
</Steps>

<Note>
  The router also requires `X-Slng-Agent-Id` and `X-Slng-Session-Id` headers that
  identify the agent and call. Deepgram's custom model headers take fixed values,
  so it cannot map a per-call session variable the way ElevenLabs and Vapi do. See
  [Integrating the context router](/guides/execution-layer/llm/context-router).
</Note>

## Next steps

* [Integrating the context router](/guides/execution-layer/llm/context-router)
  for how routing works with your own keys or SLNG-hosted models.
