Skip to navigation

Get started with the Models API

One API key, one base URL, four capabilities: text to speech, speech to text, speech to speech, and an LLM. Pick the model with a body field or a query parameter.
View as Markdown

Before you start

1

Create an API key

Create a key on the API Keys page and export it:

export SMALLEST_API_KEY="your-api-key-here"

The same key works for every model and for the Voice Agents API. See Authentication for rotation and security guidance.

2

Send one request

Text to speech is the fastest way to confirm the key works. No install required:

curl -X POST "https://api.smallest.ai/waves/v1/tts" \
-H "Authorization: Bearer $SMALLEST_API_KEY" \
-H "Content-Type: application/json" \
-H "Accept: audio/wav" \
-d '{"text": "Hello from Smallest AI.", "voice_id": "meher", "model": "lightning_v3.1_pro", "sample_rate": 24000, "output_format": "wav"}' \
--output hello.wav

Play hello.wav. If you hear speech, you are set up.

3

Pick a capability

Each capability below has its own quickstart with Python, JavaScript, and cURL samples.

Endpoints at a glance

Every endpoint lives under https://api.smallest.ai/waves/v1 and authenticates with Authorization: Bearer <key>.

CapabilityModelEndpointHow to select
Text to speech (sync)Lightning v3.1, Lightning v3.1 ProPOST /waves/v1/tts"model": "lightning_v3.1" or "lightning_v3.1_pro" in the body
Text to speech (streaming)Lightning v3.1, Lightning v3.1 ProPOST /waves/v1/tts/live (SSE) or WSS /waves/v1/tts/live (WebSocket)Same model body field
Speech to text (pre-recorded)Pulse, Pulse ProPOST /waves/v1/stt/?model=pulse or ?model=pulse-pro
Speech to text (realtime)PulseWSS /waves/v1/stt/live?model=pulse
Speech to speechHydraWSS /waves/v1/s2s?model=hydra
LLMElectronPOST /waves/v1/chat/completions"model": "electron" in the body
Voice cloningLightning v3.1POST /waves/v1/voice-cloningUpload a sample, get a voice_id

Read Choosing a transport to choose a transport, and Compare models to pick one.

Quickstarts

SDKs

Using an agent framework? LiveKit, Pipecat, and the Vercel AI SDK have first party plugins. The full list is on the Integrations tab.

Limits, errors, and regions