How to use a speech to text API
A speech to text API takes an audio file (as a link or as base64 data) and returns the spoken words as text, often with timestamps. Ours runs OpenAI's open Whisper large-v3-turbo model for $0.03 per file up to 12 MB, returns the text, detected language, duration and timed segments, and can translate the speech to English. It doesn't label speakers and doesn't work in real time.
Try it free Speech to Text API — transcribe audio with timestamps · $0.03 / call
The request
Send either a public link to the file or the file itself as base64. language (a 2-letter code like "en" or "de") is optional; without it the language is detected.
curl -i -X POST https://iamai.markets/api/x402/services/4OkVAKjHtQlY \
-H "Content-Type: application/json" \
-d '{"url": "https://example.com/interview.mp3", "language": "en"}'
# HTTP/1.1 402 Payment Required (price: $0.03)
# An x402 v2 client pays in USDC on Base and repeats the request.
What comes back
- text: the full transcript
- language: the detected or given language
- duration_seconds and word_count
- segments: a list of {start, end, text}, with times in seconds
- task: transcribe, or translate when you sent "translate_to_english": true
Turn segments into SRT subtitles
Segments map straight onto a subtitle file. This JavaScript runs in Node 18+ or the browser once you have the result.
const t = (s) => new Date(s * 1000).toISOString().slice(11, 23).replace(".", ",");
const srt = result.segments
.map((seg, i) => `${i + 1}\n${t(seg.start)} --> ${t(seg.end)}\n${seg.text.trim()}\n`)
.join("\n");
// save srt as video.srt next to your video
Limits
- Formats: MP3, WAV, M4A, OGG, FLAC and WebM.
- Up to 12 MB per file, which is about 10 minutes of normal MP3. Split longer recordings and send each part.
- No speaker labels (no diarization): you get one stream of text, not "Speaker 1 / Speaker 2".
- No real-time or streaming transcription; send finished files.
- You're charged only when the transcription works.
Other speech to text APIs
| API | Strong points | Account |
|---|---|---|
| OpenAI audio API | Hosted Whisper and newer transcription models | API key and billing |
| Google Cloud Speech-to-Text | Streaming, speaker labels, many languages | Google Cloud project |
| Amazon Transcribe | Streaming, speaker labels, AWS integration | AWS account |
| Deepgram, AssemblyAI | Fast, streaming, speaker labels, extra audio features | Account with credits |
| iamai.markets Speech to Text | $0.03 per file, timed segments, translate to English | None, pay per call with x402 |
The product
Questions
Can I pay by card instead of crypto?
Yes. Speech to Text is on RapidAPI with monthly plans: free 10 files, $9.99 for 300, $29.99 for 1,200, $99 for 5,000. https://rapidapi.com/VPNKorp/api/speech-to-text30
Can I test it with my own file?
Yes, 5 free tries a day on the listing page, no sign-up.
Does a 1-minute file cost less than a 10-minute one?
No, the price is $0.03 per file up to 12 MB.
Related
Updated 2026-12-01
