Skip to main content
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 and keep the rest of your code.

Prerequisites

  • An SLNG account
  • A SLNG key (get one at app.slng.ai)
  • 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, 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.

Your First Request

1

Text-to-Speech (HTTP)

A Text-to-Speech (TTS) request over HTTP turns text into an audio file:
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:
2

Speech-to-Text (HTTP)

Next, transcribe an audio file. The response is text you can process downstream.Download this sample file:Then run:
Response:
The same endpoint accepts a remote URL instead of an upload:
The response is identical to the upload version.

Go Further

Point your stack at SLNG

Route your existing voice agent through the gateway and keep your code.

Use a framework plugin

Native integrations for LiveKit, Cognigy, and Jambonz.

Explore the execution layer

How SLNG routes and optimizes every turn between your app and the models.

Build a voice agent

Combine streaming STT, low-latency TTS, and tool-calling to greet, route, and escalate calls.

HTTP vs. WebSocket

Understand when to use each protocol and their trade-offs.

Browse models

Explore all available TTS and STT models and find the right one for your use case.