Skip to content

Grok Voice

Integrate

Model id xai/grok-voice
# Run the model; wait up to 20 s for the finished result in the same call
curl -X POST "https://api.doitong.com/v1/run/xai/grok-voice?wait=20" \
  -H "Authorization: Bearer $DOITONG_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "audio": "https://content.doitong.com/audio/showcase/v3/tools/dub_es.mp3"
  }'

# Still "queued" or "running"? Poll with the id from the response:
curl "https://api.doitong.com/v1/requests/REQUEST_ID?wait=20" \
  -H "Authorization: Bearer $DOITONG_API_KEY"

Up to $1.494 per run charged by actual usage, the rest is refunded Run it on this page

Get API key
xAI Audio #xai#grok#voice#agent

Voice agent that listens to a recorded audio clip and replies with speech plus a transcript

xAI · Audio

Your first result goes here

Build a request below and run it with your API key. Outputs are copied to our storage, kept forever or 7 days for free.

Build a request

Controls are generated from the model schema. The code and the price update as you change them.

0 / 20000

Optional system instructions that supply conversation context and specify a persona in place of Grok's default; omitting them retains that default persona.

•required audio_url
Drop a file, or

Audio URL for the user's speech, limited to 10 minutes and 50 MB. Most common audio formats can be supplied; before Grok receives the audio, it is converted to mono PCM with 16-bit samples at 24 kHz. The agent responds to the recording with speech.

Advanced voice · enable_safety_checker · tools

Select a built-in xAI voice to override Grok's default for the agent's reply; leaving this unset keeps that default voice.

default {"mcp_servers":[],"we...

Agent tool configuration for server-side use, excluding file_search/collections from the typed configuration because of ZDR. All tools start disabled; supported options include remote MCP tools, web tools, and X tools.

POST /run/xai/grok-voice?wait=20 quote → $1.494
# Run the model; wait up to 20 s for the finished result in the same call
curl -X POST "https://api.doitong.com/v1/run/xai/grok-voice?wait=20" \
  -H "Authorization: Bearer $DOITONG_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "audio": "https://content.doitong.com/audio/showcase/v3/tools/dub_es.mp3"
  }'

# Still "queued" or "running"? Poll with the id from the response:
curl "https://api.doitong.com/v1/requests/REQUEST_ID?wait=20" \
  -H "Authorization: Bearer $DOITONG_API_KEY"

Run this request

Your key stays in this browser: it is sent only to the Doitong API and saved (localStorage) only if you tick Remember. Get an API key

About Grok Voice

Send a recording through `audio_url` and the agent answers in spoken audio, returned as 24 kHz mono WAV along with its duration and a transcript when available. Optional `prompt` (up to 20000 characters) sets persona and context, and `voice` picks a built-in voice. The `tools` object can enable web search, X search or remote MCP servers, all off by default.

Parameters

Send either the canonical name or the native name, not both. Canonical names

NameType DefaultAllowed Description
audio_urlrequired audio
Typeurl · audio
Audio URL for the user's speech, limited to 10 minutes and 50 MB. Most common audio formats can be supplied; before Grok receives the audio, it is converted to mono PCM with 16-bit samples at 24 kHz. The agent responds to the recording with speech.
promptoptional
Typestring | null
≤ 20,000 characters
Optional system instructions that supply conversation context and specify a persona in place of Grok's default; omitting them retains that default persona.
voiceoptional
Typeenum
carinazaganhelixorionlunairisaltairzenithperseusheliosluxkeplerrigelcosmocelesteursa
+12 moresiriuslumencastornakshatlasauroralioraaraeveleorexsal
Select a built-in xAI voice to override Grok's default for the agent's reply; leaving this unset keeps that default voice.
toolsoptional
Typeobject
Default{"mcp_servers":[],"web_search":{"enabled":false},"x_search":{"enabled":false}}
Agent tool configuration for server-side use, excluding file_search/collections from the typed configuration because of ZDR. All tools start disabled; supported options include remote MCP tools, web tools, and X tools.
tools.mcp_serversoptional
Typeobject[]
Remote MCP servers to which the model provider connects for tool execution.
tools.mcp_servers[].allowed_toolsoptional
Typestring[]
≥ 1 items
Optional list specifying which tool names this server exposes.
tools.mcp_servers[].authorizationoptional
Typestring | null
Sensitive authorization value sent exclusively to the model provider.
tools.mcp_servers[].enabledoptional
Typeboolean
Defaulttrue
Server inclusion flag; false excludes the server.
tools.mcp_servers[].headersoptional
Typeobject | null
Sensitive headers for MCP requests, sent exclusively to the model provider.
tools.mcp_servers[].server_descriptionoptional
Typestring | null
≤ 2000 characters
Description outlining the capabilities this server makes available.
tools.mcp_servers[].server_labelrequired
Typestring
1 – 128 characters
Server label used by the model provider to identify its tools and prefix their names.
tools.mcp_servers[].server_urlrequired
Typestring
≥ 1 characters
HTTP(S) address supplied by the caller for an MCP server that Grok connects to remotely over Streaming HTTP/SSE transports.
tools.web_search.allowed_domainsoptional
Typestring[]
1 – 5 items
Domain restriction for search results: specify up to five domains, omitting protocols and paths.
tools.web_search.enable_image_understandingoptional
Typeboolean | null
Permission for the agent to examine images discovered through web searches.
tools.web_search.enabledoptional
Typeboolean
Defaultfalse
Web-search access for the agent: true adds web_search to session.tools and permits web searches; the default leaves it disabled.
tools.web_search.excluded_domainsoptional
Typestring[]
1 – 5 items
Domains to exclude from search results, limited to five entries with protocols and paths omitted.
tools.web_search.locationoptional
Typeobject
Optional location for tailoring search results geographically.
tools.x_search.allowed_x_handlesoptional
Typestring[]
1 – 20 items
X handles whose posts may appear in results, limited to 20 handles.
tools.x_search.enable_image_understandingoptional
Typeboolean | null
Permission for the agent to examine images discovered on X.
tools.x_search.enable_video_understandingoptional
Typeboolean | null
Permission for the agent to examine videos discovered on X.
tools.x_search.enabledoptional
Typeboolean
Defaultfalse
Access to X posts through search: true adds x_search to session.tools so the agent can search those posts; the default leaves it disabled.
tools.x_search.excluded_x_handlesoptional
Typestring[]
1 – 20 items
X handles whose posts are excluded, limited to 20 handles.
tools.x_search.from_dateoptional
Typestring | null
Earliest date for posts, expressed in ISO format YYYY-MM-DD.
tools.x_search.to_dateoptional
Typestring | null
Latest date for posts, expressed in ISO format YYYY-MM-DD.
enable_safety_checkeroptional
Typeboolean
Defaulttrue
Screening can be relaxed by setting false, provided the caller is authorized.
required Canonical name, also accepted

File parameters take a public https:// URL, a data: URI up to 10 MB, or the file_url of an upload. Files

Output

GET /requests/req_8k2m4q7x1z9c3v5b6n0p2r4t
{
  "id": "req_8k2m4q7x1z9c3v5b6n0p2r4t",
  "object": "request",
  "model": "xai/grok-voice",
  "status": "succeeded",
  "created_at": "2026-10-20T12:00:00Z",
  "started_at": "2026-10-20T12:00:02Z",
  "completed_at": "2026-10-20T12:00:09Z",
  "queue_position": null,
  "cost": {
    "credits": 1494,
    "usd": "1.494",
    "charged": 1494,
    "refunded": 0
  },
  "input": {
    "audio_url": "https://content.doitong.com/audio/showcase/v3/tools/dub_es.mp3"
  },
  "output": {
    "audio": {
      "url": "https://content.doitong.com/dev-api/2026/10/20/req_8k2m4q7x1z9c3v5b6n0p2r4t/0-output.mp3",
      "content_type": "audio/mpeg",
      "file_name": "0-output.mp3",
      "file_size": 1843200
    },
    "text": "",
    "duration": 5
  },
  "outputs": [
    {
      "type": "audio",
      "url": "https://content.doitong.com/dev-api/2026/10/20/req_8k2m4q7x1z9c3v5b6n0p2r4t/0-output.mp3",
      "content_type": "audio/mpeg",
      "file_size": 1843200,
      "duration": 12,
      "stored": true
    }
  ],
  "error": null,
  "metrics": {
    "inference_seconds": 6.8
  },
  "urls": {
    "self": "https://api.doitong.com/v1/requests/req_8k2m4q7x1z9c3v5b6n0p2r4t",
    "cancel": "https://api.doitong.com/v1/requests/req_8k2m4q7x1z9c3v5b6n0p2r4t/cancel"
  }
}
Your files, your choiceEvery outputs[].url is a copy on our storage: kept forever (paid per GB-month) or 7 days for free, by your account setting or ?storage=.
Same shape on every modeltype, url, content_type, width, height and duration, for images, video and audio alike. output is the model’s own result object.
Fields of output
audio
object {url, content_type, file_name, file_size}Spoken reply from the Grok agent, delivered as mono WAV at 24 kHz.
text
stringText accompanying the agent's speech: an empty string indicates that Grok did not supply a transcript; otherwise, it contains the transcript.
duration
numberLength of the generated audio, measured in seconds.

More models: Audio

For AI agents: this page as Markdown is at https://doitong.com/developers/models/xai/grok-voice.md. All models and guides: https://doitong.com/developers/llms.txt