[SpaceXAI](/ai-gateway/models/labs/xai)

# Grok STT

Grok STT is SpaceXAI's speech-to-text model. It transcribes recorded audio into text across 25 languages, available through Vercel AI Gateway with the AI SDK. Your use is subject to SpaceXAI's [Terms](https://x.ai/legal/terms-of-service) & [Privacy](https://x.ai/legal/privacy-policy) Policies.

Websockets

[Use with AI Gateway](https://vercel.com/d?to=%2F%5Bteam%5D%2F%7E%2Fai%3Futm_source%3Dgateway-model-page%26utm_campaign%3Dai-gateway-models&title=Get+Started+with+Vercel+AI+Gateway) [View docs](https://vercel.com/docs/ai-gateway)

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

5const modelId = 'xai/grok-stt';
6

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

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

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

28for await (const part of result.fullStream) {
29  if (part.type === 'transcript-delta') {
30    process.stdout.write(part.delta);
31  }
32}
33

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

[Read docs](https://vercel.com/docs/ai-gateway/sdks-and-apis/ai-sdk)

[Overview](/ai-gateway/models/grok-stt) [About](/ai-gateway/models/grok-stt/about) [Providers](/ai-gateway/models/grok-stt/providers) [Similar](/ai-gateway/models/grok-stt/similar) [FAQ](/ai-gateway/models/grok-stt/faq)

## [Copy link to heading](#playground)Playground

Try out Grok STT by SpaceXAI. Usage is billed to your team at API rates. Free users (those who haven't made a payment) get $5 of credits every 30 days.

![xai logo](/vc-ap-vercel-marketing/_next/image?url=https%3A%2F%2F7nyt0uhk7sse4zvn.public.blob.vercel-storage.com%2Fdocs-assets%2Fstatic%2Fdocs%2Fai-gateway%2Flogos%2Fxai.png&w=48&q=75)Grok STT

### Live transcription

Speak into your microphone and watch the transcript appear in real time.

Idle

![xai logo](/vc-ap-vercel-marketing/_next/image?url=https%3A%2F%2F7nyt0uhk7sse4zvn.public.blob.vercel-storage.com%2Fdocs-assets%2Fstatic%2Fdocs%2Fai-gateway%2Flogos%2Fxai.png&w=96&q=75)

Start the session and begin speaking to see the transcript.

## [Copy link to heading](#providers)Providers

Route requests across multiple providers. Copy a provider slug to set your preference. Visit the [docs](/docs/ai-gateway/provider-options) for more info. Using a provider means you agree to their terms, listed under Legal.

| Provider |
| --- |

| Input | Capabilities | ZDR | No Training | Release Date |  |
| --- | --- | --- | --- | --- | --- |

| ![xai logo](/vc-ap-vercel-marketing/_next/image?url=https%3A%2F%2F7nyt0uhk7sse4zvn.public.blob.vercel-storage.com%2Fdocs-assets%2Fstatic%2Fdocs%2Fai-gateway%2Flogos%2Fxai.png&w=48&q=75) [SpaceXAI](/ai-gateway/models/providers/xai) Legal:[Terms](https://x.ai/legal/terms-of-service)•[Privacy](https://x.ai/legal/privacy-policy) | $0.20/hr+1 more |  |  |  | 03/16/2026 |  |
| --- | --- | --- | --- | --- | --- | --- |

## [Copy link to heading](#more-models-by-spacexai)More models by SpaceXAI

All

Text

Code

| Model |
| --- |

| Context | Latency | Throughput | Input | Output | Cache | Web Search | Capabilities | Providers | ZDR | No Training | Release Date |  |
| --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- |

| ![xai logo](/vc-ap-vercel-marketing/_next/image?url=https%3A%2F%2F7nyt0uhk7sse4zvn.public.blob.vercel-storage.com%2Fdocs-assets%2Fstatic%2Fdocs%2Fai-gateway%2Flogos%2Fxai.png&w=48&q=75) [xai/grok-4.6](/ai-gateway/models/grok-4.6) | 500K | 1.3s | 66tps | $2/M+1 more | $6/M+1 more | Read: $0.5/M+1 more Write: — | $5/K \+ input costs | +1 | ![xai logo](/vc-ap-vercel-marketing/_next/image?url=https%3A%2F%2F7nyt0uhk7sse4zvn.public.blob.vercel-storage.com%2Fdocs-assets%2Fstatic%2Fdocs%2Fai-gateway%2Flogos%2Fxai.png&w=48&q=75) |  |  | 08/12/2026 |  |
| --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- |
| ![xai logo](/vc-ap-vercel-marketing/_next/image?url=https%3A%2F%2F7nyt0uhk7sse4zvn.public.blob.vercel-storage.com%2Fdocs-assets%2Fstatic%2Fdocs%2Fai-gateway%2Flogos%2Fxai.png&w=48&q=75) [xai/grok-4.5](/ai-gateway/models/grok-4.5) | 500K | 1.5s | 57tps | $2/M+1 more | $6/M+1 more | Read: $0.3/M+1 more Write: — | $5/K \+ input costs | +3 | ![xai logo](/vc-ap-vercel-marketing/_next/image?url=https%3A%2F%2F7nyt0uhk7sse4zvn.public.blob.vercel-storage.com%2Fdocs-assets%2Fstatic%2Fdocs%2Fai-gateway%2Flogos%2Fxai.png&w=48&q=75) |  |  | 07/08/2026 |  |
| ![xai logo](/vc-ap-vercel-marketing/_next/image?url=https%3A%2F%2F7nyt0uhk7sse4zvn.public.blob.vercel-storage.com%2Fdocs-assets%2Fstatic%2Fdocs%2Fai-gateway%2Flogos%2Fxai.png&w=48&q=75) [xai/grok-4.3](/ai-gateway/models/grok-4.3) | 1M | 0.8s | 131tps | $1.25/M+1 more | $2.50/M+1 more | Read: $0.2/M+1 more Write: — | $5/K \+ input costs | +3 | ![vertex logo](/vc-ap-vercel-marketing/_next/image?url=https%3A%2F%2F7nyt0uhk7sse4zvn.public.blob.vercel-storage.com%2Fdocs-assets%2Fstatic%2Fdocs%2Fai-gateway%2Flogos%2Fvertex%2520ai.png&w=48&q=75) ![xai logo](/vc-ap-vercel-marketing/_next/image?url=https%3A%2F%2F7nyt0uhk7sse4zvn.public.blob.vercel-storage.com%2Fdocs-assets%2Fstatic%2Fdocs%2Fai-gateway%2Flogos%2Fxai.png&w=48&q=75) |  |  | 04/30/2026 |  |
| ![xai logo](/vc-ap-vercel-marketing/_next/image?url=https%3A%2F%2F7nyt0uhk7sse4zvn.public.blob.vercel-storage.com%2Fdocs-assets%2Fstatic%2Fdocs%2Fai-gateway%2Flogos%2Fxai.png&w=48&q=75) [xai/grok-4.20-non-reasoning](/ai-gateway/models/grok-4.20-non-reasoning) | 2M | 0.3s | 71tps | $1.25/M+1 more | $2.50/M+1 more | Read: $0.2/M+1 more Write: — | $5/K \+ input costs | +2 | ![vertex logo](/vc-ap-vercel-marketing/_next/image?url=https%3A%2F%2F7nyt0uhk7sse4zvn.public.blob.vercel-storage.com%2Fdocs-assets%2Fstatic%2Fdocs%2Fai-gateway%2Flogos%2Fvertex%2520ai.png&w=48&q=75) ![xai logo](/vc-ap-vercel-marketing/_next/image?url=https%3A%2F%2F7nyt0uhk7sse4zvn.public.blob.vercel-storage.com%2Fdocs-assets%2Fstatic%2Fdocs%2Fai-gateway%2Flogos%2Fxai.png&w=48&q=75) |  |  | 03/10/2026 |  |
| ![xai logo](/vc-ap-vercel-marketing/_next/image?url=https%3A%2F%2F7nyt0uhk7sse4zvn.public.blob.vercel-storage.com%2Fdocs-assets%2Fstatic%2Fdocs%2Fai-gateway%2Flogos%2Fxai.png&w=48&q=75) [xai/grok-4.1-fast-reasoning](/ai-gateway/models/grok-4.1-fast-reasoning) | 1M | 0.9s | 182tps | $0.20/M | $0.50/M | Read:$0.05/M Write:— | — | +2 | ![vertex logo](/vc-ap-vercel-marketing/_next/image?url=https%3A%2F%2F7nyt0uhk7sse4zvn.public.blob.vercel-storage.com%2Fdocs-assets%2Fstatic%2Fdocs%2Fai-gateway%2Flogos%2Fvertex%2520ai.png&w=48&q=75) |  |  | 11/19/2025 |  |
| ![xai logo](/vc-ap-vercel-marketing/_next/image?url=https%3A%2F%2F7nyt0uhk7sse4zvn.public.blob.vercel-storage.com%2Fdocs-assets%2Fstatic%2Fdocs%2Fai-gateway%2Flogos%2Fxai.png&w=48&q=75) [xai/grok-4.1-fast-non-reasoning](/ai-gateway/models/grok-4.1-fast-non-reasoning) | 1M | 0.7s | 83tps | $0.20/M | $0.50/M | Read:$0.05/M Write:— | — | +1 | ![vertex logo](/vc-ap-vercel-marketing/_next/image?url=https%3A%2F%2F7nyt0uhk7sse4zvn.public.blob.vercel-storage.com%2Fdocs-assets%2Fstatic%2Fdocs%2Fai-gateway%2Flogos%2Fvertex%2520ai.png&w=48&q=75) |  |  | 11/19/2025 |  |

## [Copy link to heading](#about-grok-stt)About Grok STT

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.

## [Copy link to heading](#what-to-consider-when-choosing-a-provider)What To Consider When Choosing a Provider

- Configuration: 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.
- Configuration: 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.
- Zero Data Retention: Zero Data Retention is offered on a per-provider and model basis. See the [documentation](https://vercel.com/docs/ai-gateway/security-and-compliance/zdr) for details.
- Authentication: AI Gateway authenticates requests using an [API key](https://vercel.com/docs/ai-gateway/authentication-and-byok#api-key-authentication) or [OIDC token](https://vercel.com/docs/ai-gateway/authentication-and-byok#oidc-token-authentication). You do not need to manage provider credentials directly.

## [Copy link to heading](#when-to-use-grok-stt)When to Use Grok STT

### 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 when

- 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

## [Copy link to heading](#conclusion)Conclusion

Grok STT gives you SpaceXAI's transcription stack behind one AI Gateway key. Send recorded audio through the AI SDK's `transcribe` function and get back text, language, duration, and segments. Billing follows audio duration, with current rates on this page.