xAI Text to Speech
xai/grok-ttsGrok Tts by xAI - convert text to natural-sounding speech with AI. Supports multiple voices, languages, emotions, and speaking styles for content creation and accessibility.
- Taban fiyat
- $0.01USD / çalıştırma
- Çalıştırma
- async
- Model türü
- audio
- Girdi alanları
- 2
Modeli deneyin
Oynatma Alanı
Sırada ne yapmak istersiniz?
Örnekler
Bir örnek seçerek girdilerini ve sonucunu playground'a yükleyin.
- Sonucu aç ↗
Girdi
{}
Model kartı
Teknik özellikler
Fiyatlandırma
- Temel fiyat
- $0.01 / ç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-tts
- Çalıştırma
- async
- Temel URL
- https://api.sandbase.ai
- API
- Unified Run API
- Uç nokta
- /v1/run
API README
xAI Text to Speech
xAI text-to-speech with five voices (Eve, Ara, Rex, Sal, Leo).
Fields
| Field | Type | Default | Notes |
|---|---|---|---|
text | string | — | Text to speak. |
voice | eve / ara / rex / sal / leo | — | Voice. |
Billing
$0.015 per started 1,000 characters, with a one-unit minimum.
| Text | Price |
|---|---|
| 200 characters | $0.015 |
| 1,000 characters | $0.015 |
| 2,500 characters | $0.045 |
Failed runs are not charged.
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-tts",
"text": "Hello! This is xAI text to speech, brought to you by Fal AI."
}
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ı
2 parametre · 0 zorunlu · 2 isteğe bağlı
| Parametre | Tür | Zorunlu | Açıklama |
|---|---|---|---|
text | string | İsteğe bağlı | The text to convert to speech. Maximum 15,000 characters. Supports speech tags for expressive delivery: inline tags like [laugh], [pause], [sigh] and wrapping tags like <whisper>text</whisper>, <slow>text</slow>. · Min. uzunluk: 1 · Maks. uzunluk: 15000 |
voice | string | İsteğe bağlı | The voice to use for speech synthesis. · Seçenekler: eve, ara, rex, sal, leo eveararexsalleo |
Çı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 |
|---|---|---|---|
xAI Text to SpeechBu model xAI | Ses | $0.01 / çalıştırma | 17 Mar 2026 |
xAI | Ses | $0.02 / çalıştırma | 16 Eyl 2026 |
Sorular
SSS
xAI Text to Speech'i SandBase üzerinden nasıl çağırırım?
Bir SandBase API anahtarı oluşturun, ardından model kimliği "xai/grok-tts" 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 Text to Speech ve katalogdaki diğer modellere erişim sağlar; xAI için ayrıca kayıt olmanız gerekmez.
