Grok Voice
xai/grok-voiceGrok Voice listens to a recording of a user's speech and replies as a Grok voice agent with spoken audio and its transcript. Optional instructions set the agent's persona, and 28 built-in xAI voices are available.
- Base price
- $0.02USD / run
- Execution
- async
- Model type
- audio
- Input fields
- 3
Try the model
Playground
Your output will appear here
Complete the inputs, then click Run.
Model card
Specifications
Pricing
- Base price
- $0.02 / run
Context & modalities
- Input
- Schema-defined
- Output
- audio
Capabilities
- Chat
- Not supported
- Vision
- Not supported
- Reasoning
- Not supported
- Structured output
- Not supported
- Function calling
- Not supported
- Audio input
- Not supported
Access
- Provider
- xAI
- Model ID
- xai/grok-voice
- Execution
- async
- Base URL
- https://api.sandbase.ai
- API
- Unified Run API
- Endpoint
- /v1/run
API README
Grok Voice
Grok Voice turns a spoken question (up to 10 minutes) into a spoken Grok reply plus its transcript, with 28 built-in voices.
Fields
| Field | Type | Default | Notes |
|---|---|---|---|
audio | audio file or URL, required | — | User speech, up to 10 minutes and 50 MB. |
prompt | string | — | Persona and context for the agent; omit for Grok's default. |
voice | string | — | Reply voice; omit for Grok's default. See the schema for supported values. |
Output
| Field | Notes |
|---|---|
url | Spoken reply (WAV, 24 kHz mono). |
content_type | MIME type of the reply. |
text | Transcript of the reply (empty when not provided). |
duration | Reply length in seconds. |
Billing
$0.00083 per second of the spoken reply (about $0.05 per minute), using the measured reply length. The quote before submission assumes a 30-second reply.
| Reply | Price |
|---|---|
| 10 s | $0.0083 |
| 30 s | $0.0249 |
| 60 s | $0.0498 |
Failed runs are not charged.
Prompting
- Keep the persona short and say how long answers should be.
Also on SandBase
Related: xai/grok-tts.
Start building
Send your first request
OpenAI-compatible endpoint with unified authentication and usage tracking.
# The quoted heredoc keeps Unicode and shell metacharacters unchanged.
result=$(curl --fail-with-body --silent \
-X POST "https://api.sandbase.ai/v1/run" \
-H "Authorization: Bearer $SANDBASE_API_KEY" \
-H "Content-Type: application/json" \
--data-binary @- <<'SANDBASE_JSON'
{
"model": "xai/grok-voice",
"audio": "https://v3b.fal.media/files/b/0a8dd5a2/hS140ygvRuxn-eY_qPhlv_assets_test_input_service.wav",
"prompt": "You are a friendly assistant. Answer briefly and concretely."
}
SANDBASE_JSON
)
run_id=$(printf '%s' "$result" | jq -r .id)
for attempt in $(seq 1 120); do
status=$(printf '%s' "$result" | jq -r .status)
case "$status" in completed|failed|timeout) break ;; esac
sleep 2
result=$(curl --fail-with-body --silent \
-H "Authorization: Bearer $SANDBASE_API_KEY" \
"https://api.sandbase.ai/v1/run/$run_id")
done
status=$(printf '%s' "$result" | jq -r .status)
[ "$status" = completed ] || { echo "Generation ended: $status" >&2; exit 1; }
printf '%s\n' "$result"Input Schema
3 parameters · 1 required · 2 optional
| Parameter | Type | Required | Description |
|---|---|---|---|
audio | string | Required | Audio file or URL with the user's speech. Most common formats are supported; maximum duration 10 minutes, maximum file size 50 MB. |
voice | string | Optional | Built-in xAI voice for the agent's reply. Uses Grok's default voice when omitted. · Options: carina, zagan, helix, orion, luna, iris, altair, zenith, perseus, helios, lux, kepler, rigel, cosmo, celeste, ursa, sirius, lumen, castor, naksh, atlas, aurora, liora, ara, eve, leo, rex, sal carinazaganhelixorionlunairisaltairzenithperseusheliosluxkeplerrigelcosmocelesteursasiriuslumencastornakshatlasauroralioraaraeveleorexsal |
prompt | string | Optional | Optional instructions describing the agent's persona and conversation context (up to 20,000 characters). Uses Grok's default persona when omitted. · Max length: 20000 |
Output Schema
| Field | Type | Description |
|---|---|---|
id | string | Unique identifier for the generation task |
status | string | Task status: pending, running, completed, failed, timeout |
model | string | Model used for the generation |
outputs | array | Array of output items |
outputs[].url | string | URL of the generated artifact |
outputs[].content_type | string | MIME type (e.g. image/png, video/mp4) |
error | object | null | Error details if failed, null on success |
error.type | string | Machine-readable error type code |
error.message | string | Human-readable error description |
Async Workflow
This model runs asynchronously. Submit a request, then poll for the result.
- Submit: POST to /v1/run and read the returned
id. - Poll: GET /v1/run/{id} until status is
completed,failedortimeout. - Retrieve: read
outputsfrom the completed response.
Choose your model
Compare models
| Model | Type | Default price | Released |
|---|---|---|---|
Grok VoiceThis model xAI | Audio | $0.02 / run | Sep 16, 2026 |
xAI | Audio | $0.01 / run | Mar 17, 2026 |
Questions
FAQ
How do I call xAI Grok Voice through SandBase?
Create a SandBase API key, then send requests with the model ID "xai/grok-voice" to Unified Run API (/v1/run) at https://api.sandbase.ai. The request examples on this page show the exact payload.
Do I need a separate xAI account?
No. One SandBase API key and balance gives you access to xAI Grok Voice and the other models in the catalog; you do not need to sign up with xAI separately.
