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.
- Taban fiyat
- $0.02USD / çalıştırma
- Çalıştırma
- async
- Model türü
- audio
- Girdi alanları
- 3
Modeli deneyin
Oynatma Alanı
Çıktınız burada görünecek
Girdileri tamamlayın, ardından Çalıştır'a tıklayın.
Model kartı
Teknik özellikler
Fiyatlandırma
- Temel fiyat
- $0.02 / çalıştırma
Bağlam ve modaliteler
- Girdi
- Şemada tanımlı
- Çıktı
- audio
Yetenekler
- Sohbet
- Desteklenmiyor
- Görsel
- Desteklenmiyor
- Akıl yürütme
- Desteklenmiyor
- Yapılandırılmış çıktı
- Desteklenmiyor
- Fonksiyon çağırma
- Desteklenmiyor
- Ses girdisi
- Desteklenmiyor
Erişim
- Sağlayıcı
- xAI
- Model kimliği
- xai/grok-voice
- Çalıştırma
- async
- Temel URL
- https://api.sandbase.ai
- API
- Unified Run API
- Uç nokta
- /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.
Geliştirmeye başlayın
İlk isteğinizi gönderin
Birleşik kimlik doğrulama ve kullanım takibi sunan OpenAI uyumlu uç nokta.
# 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"Giriş Şeması
3 parametre · 1 zorunlu · 2 isteğe bağlı
| Parametre | Tür | Zorunlu | Açıklama |
|---|---|---|---|
audio | string | Zorunlu | 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 | İsteğe bağlı | Built-in xAI voice for the agent's reply. Uses Grok's default voice when omitted. · Seçenekler: 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 | İsteğe bağlı | Optional instructions describing the agent's persona and conversation context (up to 20,000 characters). Uses Grok's default persona when omitted. · Maks. uzunluk: 20000 |
Çıkış Şeması
| Alan | Tür | Açıklama |
|---|---|---|
id | string | Üretim görevinin benzersiz tanımlayıcısı |
status | string | Görev durumu: pending, running, completed, failed, timeout |
model | string | Üretimde kullanılan model |
outputs | array | Çıkış öğelerinin dizisi |
outputs[].url | string | Oluşturulan çıktının URL'si |
outputs[].content_type | string | MIME türü (örn. image/png, video/mp4) |
error | object | null | Başarısız olursa hata ayrıntıları, başarıda null |
error.type | string | Makine tarafından okunabilir hata türü kodu |
error.message | string | İnsan tarafından okunabilir hata açıklaması |
Asenkron İş Akışı
Bu model asenkron çalışır. Bir istek gönderin, ardından sonuç için sorgulayın.
- Gönder: /v1/run adresine POST yapın ve dönen
idalanını okuyun. - Sorgula: durum
completed,failedveyatimeoutolana kadar /v1/run/{id} adresine GET yapın. - Al: tamamlanan yanıttan
outputsalanını okuyun.
Modelinizi seçin
Modelleri karşılaştırın
| Model | Tür | Varsayılan fiyat | Yayınlanma |
|---|---|---|---|
Grok VoiceBu model xAI | Ses | $0.02 / çalıştırma | 16 Eyl 2026 |
xAI | Ses | $0.01 / çalıştırma | 17 Mar 2026 |
Sorular
SSS
xAI Grok Voice'i SandBase üzerinden nasıl çağırırım?
Bir SandBase API anahtarı oluşturun, ardından model kimliği "xai/grok-voice" ile https://api.sandbase.ai adresindeki Unified Run API (/v1/run) uç noktalarına istek gönderin. Bu sayfadaki istek örnekleri tam yükü gösterir.
Ayrı bir xAI hesabına ihtiyacım var mı?
Hayır. Tek bir SandBase API anahtarı ve bakiyesi size xAI Grok Voice ve katalogdaki diğer modellere erişim sağlar; xAI için ayrıca kayıt olmanız gerekmez.
