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

# Getting started with SLNG

> Authenticate, send your first text-to-speech and speech-to-text requests, and stream over WebSocket with SLNG in about five minutes.

All your speech traffic routes through one platform. The quickest way to see it work is to send a text-to-speech and a speech-to-text request directly. Once you have, you can [point your existing stack at the gateway](https://slng.mintlify.site/integrations/gateway.md) and keep the rest of your code.

## Prerequisites

* An SLNG account
* A SLNG key (get one at [app.slng.ai](https://app.slng.ai/api-keys))
* Basic knowledge of REST APIs or WebSockets

## Authentication

Every request needs an SLNG key in the `Authorization: Bearer SLNG_API_KEY` header. Get one from the [Dashboard](https://app.slng.ai/api-keys), and replace `SLNG_API_KEY` in the examples below with your key. For WebSocket auth, key rotation, and bringing your own provider key, see [Authentication & API Keys](https://slng.mintlify.site/authentication.md).

## Your First Request

### 1. Text-to-Speech (HTTP)

A Text-to-Speech (TTS) request over HTTP turns text into an audio file:

```bash 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 sunny Barcelona!"
  }' \
  --output hello.wav
```

Replace `SLNG_API_KEY` with your SLNG key and run the command. Once the request completes, you have a `hello.wav` file in the current directory.

It sounds like this:

Hello from sunny Barcelona!

[Download](https://slng.mintlify.site/audio/hello.wav)

<audio controls preload="metadata" aria-label="Hello from sunny Barcelona!" src="https://slng.mintlify.site/audio/hello.wav">Your browser does not support the audio element.</audio>

### 2. Speech-to-Text (HTTP)

Next, transcribe an audio file. The response is text you can process downstream.

Download this sample file:

Micro Machines sample

Download this file to use with the STT example below.

[Download](https://slng.mintlify.site/audio/micro-machines.wav)

<audio controls preload="metadata" aria-label="Micro Machines sample" src="https://slng.mintlify.site/audio/micro-machines.wav">Your browser does not support the audio element.</audio>

Then run:

```bash theme={null}
curl https://api.slng.ai/v1/stt/slng/deepgram/nova:3-en \
  -H "Authorization: Bearer SLNG_API_KEY" \
  -F "audio=@micro-machines.wav" \
  -F "language=en"
```

Response:

```json theme={null}
{
  "text": "is the micro machine man presenting the most midget miniature motorcade of micro machine...",
  "transcript": "is the micro machine man presenting the most midget miniature motorcade of micro machine...",
  "confidence": 0.9749991,
  "duration": 29.888374,
  "language": "en",
  "metadata": {
      "request_id": "f5778fa4-40f9-4d60-993b-2f43f0164221",
      "model": "nova-3",
      "duration": 29.888374,
      "channels": 1
  }
}
```

The same endpoint accepts a remote URL instead of an upload:

```bash theme={null}
curl https://api.slng.ai/v1/stt/slng/deepgram/nova:3-multi \
  -H "Authorization: Bearer SLNG_API_KEY" \
  -H 'Content-Type: application/json' \
  --data '{"url":"https://docs.slng.ai/audio/micro-machines.wav", "language":"en"}'
```

The response is identical to the upload version.

## Go Further

> **[Point your stack at SLNG](https://slng.mintlify.site/integrations/gateway.md)**
>
> Route your existing voice agent through the gateway and keep your code.

> **[Use a framework plugin](https://slng.mintlify.site/integrations/overview.md)**
>
> Native integrations for LiveKit, Cognigy, and Jambonz.

> **[Explore the execution layer](https://slng.mintlify.site/execution-layer.md)**
>
> How SLNG routes and optimizes every turn between your app and the models.

> **[Build a voice agent](https://slng.mintlify.site/voice-agents.md)**
>
> Combine streaming STT, low-latency TTS, and tool-calling to greet, route, and escalate calls.

> **[HTTP vs. WebSocket](https://slng.mintlify.site/protocols.md)**
>
> Understand when to use each protocol and their trade-offs.

> **[Browse models](https://slng.mintlify.site/models.md)**
>
> Explore all available TTS and STT models and find the right one for your use case.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.