Quickstart

View as Markdown

Step 1: Get Your API Key

In the Smallest AI console, select API Keys from the left sidebar under Developer.

Smallest AI dashboard with API Keys highlighted under Developer section in the left sidebar

Click Create API Key in the top-right corner, enter a name, and click Create API Key to confirm.

API Keys page showing the Create API Key button Create New API Key dialog with API Name field and Create API Key button

The new key appears in your dashboard. Click the copy icon to copy it.

API Keys dashboard showing the newly created key with copy icon highlighted

Export the key in your terminal:

$export SMALLEST_API_KEY="your-api-key-here"
New to Smallest AI? Sign up here first.

Step 2: Transcribe Audio

Here’s the sample audio we’ll transcribe:

Paste this cURL (no install required). It downloads the sample and pipes it into Pulse Pro as raw bytes:

$curl -sL "https://github.com/smallest-inc/cookbook/raw/main/speech-to-text/getting-started/samples/audio.wav" | \
> curl -X POST "https://api.smallest.ai/waves/v1/stt/?model=pulse-pro&language=en" \
> -H "Authorization: Bearer $SMALLEST_API_KEY" \
> -H "Content-Type: application/octet-stream" \
> --data-binary @-

You’ll get back:

1{
2 "status": "success",
3 "transcription": "This is a sample audio file for testing speech-to-text transcription with the Pulse API.",
4 "language": "en",
5 "metadata": { "duration": 5.6, "processing_time_ms": 109.58, "rtfx": 51.1, "num_chunks": 1 },
6 "request_id": "354c932b-3c3a-473c-a6e7-fd497ba10d96"
7}

This quickstart uses Pulse Pro, our leaderboard-ranked English model. If you need multilingual transcription (38 languages) or streaming, swap ?model=pulse-pro for ?model=pulse. See the Pulse model card for the full language list.

Step 3: Build It Into Your App

The snippets below use Pulse Pro (?model=pulse-pro). For multilingual audio, swap to ?model=pulse and set the appropriate language code. Both models share the same /waves/v1/stt/ endpoint and request shape.

$curl -sL "https://github.com/smallest-inc/cookbook/raw/main/speech-to-text/getting-started/samples/audio.wav" | \
> curl -X POST "https://api.smallest.ai/waves/v1/stt/?model=pulse-pro&language=en" \
> -H "Authorization: Bearer $SMALLEST_API_KEY" \
> -H "Content-Type: application/octet-stream" \
> --data-binary @-

For Pulse Pro, language must be en. For Pulse, set language to the known code (en, hi, es, etc.) for best accuracy, or use a multi-* aggregator (multi-eu, multi-indic, multi-asian, multi) for unknown audio.

Full runnable source files: Python | JavaScript | cURL

Step 4: Explore Features

Full endpoint spec: Pulse API Reference

Need Help?

Or email support@smallest.ai.