# Grok STT

Grok STT transcribes recorded audio into text across 25 languages. One `transcribe` call through AI Gateway returns the transcript, the detected language, and the audio duration.

- **Model ID:** `spacexai/grok-stt`
- **Type:** transcription
- **Providers:** xai
- **Context window:** Not applicable
- **Maximum output tokens:** 0
- **Pricing:** $0.000028/1M input tokens
- **Canonical page:** https://vercel.com/ai-gateway/models/grok-stt

## Supported parameters

Detailed capability metadata has not been reported for this model.

## Example

```ts
import { experimental_streamTranscribe as streamTranscribe } from 'ai';
import { createGateway, gateway } from '@ai-sdk/gateway';
import { readFile } from 'node:fs/promises';

const modelId = 'spacexai/grok-stt';

// Mint this on your server, then send only the short-lived token to the client.
const { token } = await gateway.experimental_transcription.getToken({
  model: modelId,
});
const clientGateway = createGateway({ apiKey: token });

// Raw 24 kHz, 16-bit signed little-endian mono PCM audio.
const bytes = await readFile('audio.pcm');
const audio = new ReadableStream<Uint8Array>({
  start(controller) {
    controller.enqueue(new Uint8Array(bytes));
    controller.close();
  },
});

const result = streamTranscribe({
  model: clientGateway.transcription(modelId),
  audio,
  inputAudioFormat: { type: 'audio/pcm', rate: 24000 },
});

for await (const part of result.fullStream) {
  if (part.type === 'transcript-delta') {
    process.stdout.write(part.delta);
  }
}

console.log('\nFinal:', await result.text);
```

## About

Grok STT is SpaceXAI's speech-to-text model, released March 16, 2026 and available through AI Gateway. Grok STT transcribes audio into text across 25 languages, which covers voice notes, call recordings, podcasts, and other recorded audio. Speech to text through AI Gateway is in beta, so access is rolling out gradually.

Integration uses the AI SDK's `experimental_transcribe` function, available on the canary releases of the AI SDK. Pass audio as a `Buffer`, `Uint8Array`, base64 string, or `URL`. The result includes the transcript text, the detected language, the audio duration, and timestamped segments when available. A REST endpoint accepts base64-encoded audio directly if you're not using the AI SDK.

Billing is based on audio duration; see the pricing panel on this page for current rates. For live, two-way voice instead of recorded audio, reach for `grok-voice-think-fast-1.0`, and for the reverse direction, `grok-tts` turns text into speech.

## What to consider

Transcription responses through AI Gateway aren't streamed. The full transcript returns in a single response, so plan batch-style processing rather than live captioning. Audio uploads are base64-encoded in a JSON body, and multipart file uploads aren't supported, so large files grow request payloads.

Speech to text is in beta, and AI SDK support ships on canary releases. Pin your dependency versions and watch for API changes before you rely on Grok STT in production.

## When to use

### Best For

- **Voice notes and dictation** where recorded memos become text with a single `transcribe` call
- **Call and meeting records** that need conversion into searchable transcripts
- **Multilingual transcription** across the 25 languages Grok STT supports
- **Podcast and media pipelines** producing transcripts for captions, show notes, and search indexing

### Consider Alternatives When

- **Live voice conversation** where `grok-voice-think-fast-1.0` handles real-time speech-to-speech sessions
- **Speech generation** where `grok-tts` converts text into spoken audio instead
- **Streamed partial transcripts** since AI Gateway returns the full transcript in one response

## Best for

- **Voice Notes and Dictation:** Turn recorded memos into text with a single `transcribe` call
- **Call and Meeting Records:** Convert recorded conversations into searchable transcripts
- **Multilingual Transcription:** Audio in any of 25 languages comes back as text
- **Podcast and Media Pipelines:** Produce transcripts for captions, show notes, and search indexing

## Consider alternatives

- **Live Voice Conversation:** `grok-voice-think-fast-1.0` handles real-time speech-to-speech sessions
- **Speech Generation:** `grok-tts` converts text into spoken audio instead
- **Streamed Partial Transcripts:** AI Gateway returns the full transcript in one response, so incremental captioning needs a different design

## 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_transcribe` function with audio as a `Buffer`, `Uint8Array`, base64 string, or `URL`. 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.0` instead.

### 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 `spacexai/grok-stt` as the model identifier. AI Gateway handles provider routing automatically.

### Does Vercel AI Gateway support Zero Data Retention for Grok STT?

Yes, Zero Data Retention is 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.

## Links

- [Model page](https://vercel.com/ai-gateway/models/grok-stt)
- [AI Gateway documentation](https://vercel.com/docs/ai-gateway)
- [Provider model documentation](https://docs.x.ai/developers/model-capabilities/audio/speech-to-text)
