Pular para o conteúdo principal
Model logo

API do Grok Speech to Text

  • Fala para texto

Grok Speech to Text faz parte da família de modelos GrokVer todos os modelos Grok

Toque para enviarMP4, WEBM, MOV · Máx. 100 MB
Saída

Seu audio gerado aparecerá aqui

Atualizado

What is the Grok Speech to Text API?

The Grok Speech to Text API is live on UnificAlly as xai/grok-stt, from $0.05 per hour of audio. Grok Speech to Text is xAI's transcription model, available on UnificAlly as xai/grok-stt on the same key and balance as the Grok language, voice, and Grok Imagine models. Give it the URL of an audio file and it returns the transcript, the detected language, the duration, and per-word start and end times, with speaker labels on request.

It takes the common audio and container formats, including mp4, m4a, and mkv, so recordings, podcasts, and video soundtracks all go through without conversion. Billing is per started hour of audio.

Grok Speech to Text API specs

Model IDxai/grok-stt
EndpointPOST https://api.unifically.com/v1/tasks
Request typesAudio transcription from a public URL, with optional speaker diarization
Input formatsmp3, wav, ogg, opus, flac, aac, mp4, m4a, mkv
OutputJSON with text, language, duration in seconds, and a words array with per-word start and end times
LanguageDetected automatically, or set a code hint such as en, fr, or de
Reference inputsOne audio file, passed as audio_url
Rate$0.05/hour, per started hour of audio

Billing is per started hour of audio, with no subscription. The pricing page shows the live rate.

How to use the Grok Speech to Text API

  1. Create an API key on the API keys page.
  2. Send a POST request to /v1/tasks with the model ID and an input object holding the audio_url.
  3. Read the task_id from the response, then check the task until it is finished, or pass a callback URL and wait for the result.
curl -X POST https://api.unifically.com/v1/tasks   -H "Content-Type: application/json"   -H "Authorization: Bearer YOUR_API_KEY"   -d '{
    "model": "xai/grok-stt",
    "input": {
      "audio_url": "https://files.unifically.com/your-interview.mp3",
      "diarize": true
    }
  }'

The response returns the task ID straight away:

{
  "code": 200,
  "success": true,
  "data": {
    "task_id": "abc123def456",
    "status": "processing"
  }
}

Poll the task, or set a callback_url on the request.

curl https://api.unifically.com/v1/tasks/{task_id}   -H "Authorization: Bearer YOUR_API_KEY"

When status is completed, the task carries the transcript in output:

{
  "code": 200,
  "success": true,
  "data": {
    "task_id": "abc123def456",
    "status": "completed",
    "output": {
      "text": "Thanks for joining us today. Let's get started.",
      "language": "en",
      "duration": 4.8,
      "words": [
        { "word": "Thanks", "start": 0.0, "end": 0.42 },
        { "word": "for", "start": 0.42, "end": 0.55 }
      ]
    }
  }
}

Grok Speech to Text API parameters

ParameterTypeDefaultWhat it does
audio_urlstringnoneRequired. Public URL of the audio file to transcribe. Supported formats are mp3, wav, ogg, opus, flac, aac, mp4, m4a, and mkv
languagestringnoneLanguage code hint, for example en, fr, or de. Omit it to auto-detect
diarizebooleanfalseLabels each word with the detected speaker

The audio_url must be publicly reachable. A URL that cannot be fetched is rejected with a 422 before the task starts. The Grok Speech to Text API documentation has the full reference.

Key features of Grok Speech to Text

Word-level timestamps

Every word comes back with start and end times in seconds, ready for captions, search highlighting, and clip extraction.

Speaker diarization

Set diarize to true and each word carries a speaker label, which turns an interview or call recording into a turn-by-turn transcript.

Language detection and hints

The model detects the language and reports it. Pass a code such as en or de as a hint for short or mixed recordings.

Nine input formats by URL

mp3, wav, ogg, opus, flac, aac, mp4, m4a, and mkv. Point at a public URL, or upload a file in the playground and it is hosted for you.

Checked before it is billed

An unreachable URL is rejected up front, and billing is per started hour of audio, so the cost of a file is known from its length.

What Grok Speech to Text is best for

  • Interviews and calls

    Diarized transcripts with timing for meetings, podcasts, and customer calls.

  • Captions and subtitles

    Word timestamps map straight onto caption cues for video, including clips you generated with Grok Imagine.

  • Searchable audio archives

    Transcribe a back catalog once and search or quote it by timestamp afterwards.

  • Multilingual recordings

    Automatic language detection handles mixed sources without per-file configuration.

Grok Speech to Text limitations

Input is by URL only and must be publicly reachable; there is no streaming or real-time mode on this route. Diarization labels speakers but does not name them, and there are no word-boost lists, entity detection, or formatting controls. Billing rounds up to the next hour, so many very short files cost more than one long one of the same total length.

Perguntas frequentes

Perguntas frequentes sobre Grok Speech to Text

It is xAI's Grok transcription model served through UnificAlly as xai/grok-stt. Send the public URL of an audio file and the task returns the transcript text, the detected language, the audio duration, and per-word timing, with optional speaker labels.

Transcription requests use a key from the API keys page, sent as Authorization: Bearer <key> to https://api.unifically.com/v1/tasks with model xai/grok-stt. All the first job needs is a public audio_url in mp3, wav, ogg, opus, flac, aac, mp4, m4a or mkv.

Give input.audio_url, and optionally language (omit it to auto-detect) and diarize: true to label speakers, under model xai/grok-stt. When the task reaches completed, its output holds the transcript in text plus language, duration and per-word timings in words.

mp3, wav, ogg, opus, flac, aac, mp4, m4a, and mkv, given as a publicly reachable URL. A URL that cannot be fetched is rejected before the task starts, so nothing is charged.

Yes. Omit language and the model detects it and reports the code in the result. Pass a code such as en, fr, or de as a hint when the audio is short or mixed.

Set diarize to true and every word in the result carries the label of the speaker who said it, so you can rebuild a turn-by-turn transcript of an interview or a call.

Per started hour of audio, at $0.05/hour. A 5-minute file and a 59-minute file cost the same; a 61-minute file counts as two hours. For many short files the cost is the per-hour rate times the number of files, so batch short clips where you can.

A JSON object with text, language, duration in seconds, and a words array of { word, start, end } entries, each with a speaker label when diarization is on.