Grok STT
Grok STT is xAI's speech-to-text model. It transcribes recorded audio into text across 25 languages, available through Vercel AI Gateway with the AI SDK.
import { experimental_transcribe as transcribe } from 'ai';import { gateway } from '@ai-sdk/gateway';import { readFile } from 'node:fs/promises';
const result = await transcribe({ model: gateway.transcriptionModel('xai/grok-stt'), audio: await readFile('audio.mp3'),});Frequently Asked Questions
How many languages does Grok STT support?
Grok STT transcribes audio in 25 languages, with the detected language returned alongside the transcript.
How do I transcribe audio with Grok STT?
Use the AI SDK's
experimental_transcribefunction with audio as aBuffer,Uint8Array, base64 string, orURL. A REST endpoint also accepts base64-encoded audio if you're not using the AI SDK.What does the transcription result include?
The result includes the full transcript text, the detected language, the audio duration in seconds, timestamped segments when available, and any provider warnings.
Does Grok STT stream transcription results through AI Gateway?
No. The full transcript returns in a single response. For live, two-way voice, use
grok-voice-think-fast-1.0instead.What does Grok STT cost?
Billing is based on audio duration. See the pricing panel on this page for current rates.
How do I authenticate with Grok STT through Vercel AI Gateway?
Use your Vercel AI Gateway API key with
xai/grok-sttas the model identifier. AI Gateway handles provider routing automatically.Does Vercel AI Gateway support Zero Data Retention for Grok STT?
Zero Data Retention is not currently available for this model. Zero Data Retention is offered on a per-provider basis. See https://vercel.com/docs/ai-gateway/capabilities/zdr for details.