by xAI

Transcripts with word timings in 25 languages

xai/grok-stt/speech-to-text
Grok STT AI Speech to Text online
  • 25 languages
  • Speech to Text

About Grok STT

PopNow runs Grok STT behind its own captions and subtitles, so this page covers what matters when you build the same thing. An async speech-to-text job takes audio or video by URL and returns text plus per-word timings. The choices that shape an integration are whether to normalize numbers, how to pass vocabulary, and whether your audio is split by channel.

Call it with the model name xai/grok-stt/speech-to-text on POST /jobs/createTask, from $0.000033334.

Introduction

What it returns

Read output.text for the transcript. When available, output.transcript includes language, languageCode, durationSeconds and timed words. Each timed word has text, start and end, with times in seconds. Metadata that is not returned is omitted.

Sending audio

Set audio_url to a committed upload or a public direct URL to the file. PopNow audio uploads are limited to 10 minutes, with a default file-size limit of 90 MiB; M4A, AAC, OGG, Opus and FLAC uploads are converted to MP3. Direct URLs support container formats such as MP3, WAV, M4A, FLAC, OGG, Opus, AAC, MP4 and MKV. The model input must be 1 second to 2 hours long; files supplied by direct URL must be no larger than 500 MB. Use a standard HTTP or HTTPS port without a sign-in. Raw/headerless PCM, μ-law and A-law, and inline base64 audio, are not accepted by this endpoint.

Language and numbers

Omit language for automatic detection; do not send an empty string. If supplied, it must be one of the 25 accepted language codes. To request written-form numbers, currencies, dates and units, set text_normalization to true and supply language. This formats the transcript; it is not a translation setting.

Key terms and filler words

Use keyterms as spelling hints for names and specialist terms. Send an array of up to 100 objects, each with a term string of 1–50 characters. Enable filler_words to include fillers such as um and uh; it defaults to false.

Separate audio channels

Enable multichannel when different audio channels contain speech you need to preserve separately. output.text joins the returned channel texts with newlines. Use output.transcript.channels for each channel’s zero-based index, text, optional language fields and timed words; the aggregate output.transcript.text can interleave speech from different channels. Channels reflect the audio supplied to the model, not speaker identities. No speaker-diarization control is exposed. Conversion of M4A, AAC, OGG, Opus and FLAC uploads selects the first audio track and produces MP3; use WAV or a direct URL when preserving separate channels is important.

Request parameters

ParameterRequiredDescription
audio_urlYesThe voice or music track to use.
filler_wordsNoKeep filler words such as um and uh in the transcript. Default: false
keytermsNoNames and terms that help the model follow your preferred spelling in the transcript. Default: []
languageNoThe language of the speech. ar · cs · da · nl · en · fil · fr · de · hi · id · it · ja · ko · mk · ms · fa · pl · pt · ro · ru · es · sv · th · tr · vi
multichannelNoTranscribe audio channels separately when speakers are recorded on different channels. Default: false
text_normalizationNoWrite spoken numbers, prices, dates and units as digits. Select a language first. Default: false

Pricing

Prices are in USD and charged to your PopNow balance. When a task is accepted, we reserve the maximum quoted amount from your PopNow balance. On completion, we charge for actual usage, never more than the hold, and release the remainder. If the task fails, the hold is released.

OptionUSD per second
Standard$0.000033334

Send the same request body to POST /jobs/quote to see the estimated and maximum USD charge before running. A quote does not run the task or charge your balance.

API quick start

Call the Grok STT API in three steps

  1. Create an API key. Sign in to PopNow and create a key in the API console. Keys start with sk-popnow-. API calls are billed in USD from your PopNow balance.
  2. Send the request. POST /jobs/createTask with model xai/grok-stt/speech-to-text and an input object that follows the parameter table. The response returns a task ID straight away.
  3. Get the result. Poll GET /jobs/recordInfo with the task ID, or pass a callBackUrl and we post the result to it. Download the output links when the task succeeds.
# 1. Create the task. Keep the Idempotency-Key if you retry after a network error.
export IDEMPOTENCY_KEY="$(uuidgen)"
curl -X POST https://api.popnow.ai/api/v1/jobs/createTask \
  -H "Authorization: Bearer $POPNOW_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: $IDEMPOTENCY_KEY" \
  -d '{
  "model": "xai/grok-stt/speech-to-text",
  "input": {
    "audio_url": "https://media.popnow.ai/shortfilm/voices/Aoede-46e4c427.mp3"
  }
}'

# 2. Copy data.taskId from the response, then poll until state is succeeded, failed, canceled or expired.
TASK_ID="TASK_ID_FROM_RESPONSE"
curl "https://api.popnow.ai/api/v1/jobs/recordInfo?taskId=$TASK_ID" \
  -H "Authorization: Bearer $POPNOW_API_KEY"

Replace the prompt and any links with your own. The API tab has the response, polling and callback reference.

What to build with the Grok STT API

  • Word-timed captions for a video editor: request the transcript, build caption lines from the word timings and let users nudge them. The captions in PopNow's editor come from this model.
  • A subtitle service that routes by language: send Grok STT the 25 languages it supports and pass the rest to another model, as PopNow's AI Subtitles does with Whisper 1.

Grok STT parameter notes

  • text_normalization requires language. Either detect the language in an earlier pass or ask the user, then send both together.
  • Normalization can over-format: an ordinal ("1st") and a merged sentence appeared in our English test. Keep the plain setting for transcripts that will be quoted and the normalized one for display cards.
  • keyterms accepts up to 100 entries. Build them per job from data you hold, such as product and speaker names, rather than one shared list.
  • multichannel returns one line per channel. Leave it off for a mono mix; there is nothing to split and no diarization flag to fall back on.

How Grok STT API pricing adds up

Metered per second of the input audio. For video input the clip's running time is what counts, so trimming dead air at either end lowers the charge directly. Store input duration and task id per file, because captions regenerated after an edit are a new job.

  • Speech to Text, 5-second clip: $0.00016667 each, $0.016667 for 100 clips

Async jobs, webhooks and rate limits

Every Grok STT request is asynchronous: createTask returns a taskId straight away, and the result arrives when the job finishes. Poll GET /jobs/recordInfo every few seconds, or pass a public https callBackUrl and verify the X-Webhook-Signature header (HMAC-SHA256 over taskId, timestamp and the body hash) before trusting the payload. Each account gets 1,000 write requests per 10 seconds; a 429 carries Retry-After. Send an Idempotency-Key with createTask so a retried request for xai/grok-stt/speech-to-text never runs or bills twice.

Common Grok STT API errors

errorCodeWhat it usually means and how to fix it
invalid_requesttext_normalization was on without a language, or the code is not among the 25. Set a supported code or turn normalization off.
invalid_assetThe audio is shorter than one second or longer than two hours, or the URL does not serve a common audio or video format. Trim or re-encode and resubmit.
rate_limitedA burst of caption jobs from one project. Queue per project and retry after the advised wait.

Grok STT API questions

How much does the Grok STT API cost?

Grok STT costs $0.000033334 per second. API usage is charged in USD to your PopNow balance. When a task is accepted, we reserve the maximum quoted amount from your PopNow balance. On completion, we charge for actual usage, never more than the hold, and release the remainder. If the task fails, the hold is released.

What is the model name for Grok STT in the API?

Put xai/grok-stt/speech-to-text for Speech to Text in the model field of POST /jobs/createTask.

Should I enable normalization for subtitles?

For on-screen reading it usually helps. Review ordinals and sentence breaks, both of which changed in our test.

Does background noise hurt accuracy?

Not in our test: a memo with rainforest noise about 3 dB under the voice came back exact. Keep the source audio anyway for disputed lines.

Can it label speakers?

No diarization option exists. Use multichannel for channel-separated calls, or a model with speaker labels for a single mixed track.

What are the limits of the Grok STT API?

Largest upload: 90 MB; Languages: 25. Requests outside these limits are rejected before anything is charged.

Can I try Grok STT without writing code?

Run Grok STT in the Playground without an API key, using the same PopNow balance as the website, shown in USD. Each run appears in your developer history with its matching code.

All Grok models

HeartMuLa Transcribe is tuned for sung lyrics over music; Grok handles spoken audio.

More about Grok STT