Skip to main content
This guide will show you how to convert an audio file into text with the Smallest AI’s Lightning STT model.

Pre-Recorded Audio

Transcribe pre-recorded audio files using synchronous HTTPS POST requests. Perfect for batch processing, archived media, and offline transcription workflows.
The Pre-Recorded API allows you to upload audio files and receive complete transcripts in a single request. This is ideal for processing existing audio files, batch operations, and scenarios where you don’t need real-time streaming.

When to Use Pre-Recorded Transcription

  • Batch processing: Transcribe multiple audio files at once
  • Archived media: Process existing recordings, podcasts, or videos
  • Offline workflows: Upload files that are already stored locally or in cloud storage
  • Complete transcripts: When you need the full transcription before proceeding

Endpoint

POST https://waves-api.smallest.ai/api/v1/lightning/get_text

Authentication

Head over to the smallest console to generate an API key if not done previously. Also look at Authentication guide for more information about API keys and their usage. Include your API key in the Authorization header:
Authorization: Bearer YOUR_API_KEY

Example Request

curl --request POST \
  --url "https://waves-api.smallest.ai/api/v1/lightning/get_text?model=lightning&language=en&word_timestamps=true" \
  --header "Authorization: Bearer $SMALLEST_API_KEY" \
  --header "Content-Type: audio/wav" \
  --data-binary "@/path/to/audio.wav"

Example Response

A successful request returns a JSON object with the transcription and metadata:
{
  "transcription": "Hello, this is a test transcription.",
  "word_timestamps": [
    {"word": "Hello", "start": 0.0, "end": 0.5},
    {"word": "this", "start": 0.6, "end": 0.8}
  ],
  "metadata": {
    "duration": 3.5,
    "file_size": 123456
  }
}

Next Steps