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

# Drop-in gateway

> Point your existing voice stack at the SLNG platform and keep your code. Route speech-to-text and text-to-speech through one base URL to add caching, regional routing, and provider flexibility.

The fastest way to add SLNG to an existing voice agent is to route your speech traffic through the platform. You keep your application code, your agent logic, and your call flow. You change where the speech requests go.

## How it works

The SLNG platform exposes one consistent base URL for every model. The path selects the service, provider, and model:

```
https://api.slng.ai/v1/{tts|stt}/{provider}/{model}
```

Send your text-to-speech and speech-to-text requests there with your SLNG key, and you get caching, [regional routing](/region-override), and access to every supported provider behind a single integration.

<Steps>
  <Step title="Get an SLNG key">
    Create one at [app.slng.ai/api-keys](https://app.slng.ai/api-keys).
  </Step>

  <Step title="Point your requests at the gateway">
    Replace your provider's endpoint with the SLNG platform URL and send your SLNG key in the `Authorization` header.

    ```bash Text-to-speech theme={null}
    curl https://api.slng.ai/v1/tts/slng/deepgram/aura:2-en \
      -H "Authorization: Bearer SLNG_API_KEY" \
      -H "Content-Type: application/json" \
      -d '{ "model": "aura-2-thalia-en", "text": "Hello from SLNG!" }' \
      --output hello.wav
    ```

    ```bash Speech-to-text theme={null}
    curl https://api.slng.ai/v1/stt/slng/deepgram/nova:3-en \
      -H "Authorization: Bearer SLNG_API_KEY" \
      -F "audio=@call.wav" \
      -F "language=en"
    ```
  </Step>

  <Step title="Keep your own provider key (optional)">
    Already have a provider contract? Add the `X-Slng-Provider-Key` header. Billing
    runs against your provider account, and output assembly still applies.

    BYOK applies to proxied providers, so use a provider path (not a `slng/`-hosted one). For example, Soniox:

    ```bash highlight={3} theme={null}
    curl https://api.slng.ai/v1/tts/soniox/tts-rt:v1 \
      -H "Authorization: Bearer SLNG_API_KEY" \
      -H "X-Slng-Provider-Key: YOUR_PROVIDER_KEY" \
      -H "Content-Type: application/json" \
      -d '{ "text": "I brought my own key to the party.", "voice": "Adrian", "audio_format": "wav", "sample_rate": 24000 }' \
      --output hello.wav
    ```

    See [Bring your own key](/execution-layer/byok) for supported providers, WebSocket setup, and billing.
  </Step>
</Steps>

## What you get

<CardGroup cols={2}>
  <Card title="Output assembly" icon="database" href="/execution-layer/output-assembly">
    Repeated text-to-speech served from cache.
  </Card>

  <Card title="Regional execution" icon="globe-lock" href="/region-override">
    Pin traffic to a region with one header.
  </Card>

  <Card title="How it works" icon="layers" href="/execution-layer/how-it-works">
    The execution path every turn takes between your app and the models.
  </Card>

  <Card title="Unified API" icon="blend" href="/execution-layer/unified-api">
    Switch providers by changing the path.
  </Card>
</CardGroup>

## Prefer a framework plugin?

If your agent runs on LiveKit, Cognigy, or Jambonz, use the native integration instead of calling the platform directly. See [Voice platform integrations](/integrations/overview).
