Sand AISand AI MAGI-2ตอนนี้ MAGI-2 อยู่บน SandBase แล้ว: วิดีโอ 1080p พร้อมเสียงในตัวลองใช้เลย

Grok Voice

xai/grok-voice

Grok 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.

ราคาพื้นฐาน
$0.02USD / การรัน
การทำงาน
async
ประเภโมเดล
audio
ฟิลด์อินพุต
3
เส้นทางโปรดักชัน

ลองใช้โมเดล

Playground

เปิด Playground
อินพุต
Audio file or URL with the user's speech. Most common formats are supported; maximum duration 10 minutes, maximum file size 50 MB.
Optional instructions describing the agent's persona and conversation context (up to 20,000 characters). Uses Grok's default persona when omitted.
Built-in xAI voice for the agent's reply. Uses Grok's default voice when omitted.
เอาต์พุตพร้อมใช้งาน

เอาต์พุตของคุณจะแสดงที่นี่

กรอกอินพุตให้ครบ แล้วคลิก Run

การ์ดโมเดล

ข้อมูลจำเพาะ

ราคา

ราคาพื้นฐาน
$0.02 / การรัน

บริบทและ modalities

อินพุต
กำหนดตามสคีมา
เอาต์พุต
audio

ความสามารถ

แชท
ไม่รองรับ
วิชัน
ไม่รองรับ
การให้เหตุผล
ไม่รองรับ
เอาต์พุตแบบมีโครงสร้าง
ไม่รองรับ
การเรียกใช้ฟังก์ชัน
ไม่รองรับ
อินพุตเสียง
ไม่รองรับ

การเข้าถึง

ผู้ให้บริการ
xAI
รหัสโมเดล
xai/grok-voice
การทำงาน
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

FieldTypeDefaultNotes
audioaudio file or URL, required—User speech, up to 10 minutes and 50 MB.
promptstring—Persona and context for the agent; omit for Grok's default.
voicestring—Reply voice; omit for Grok's default. See the schema for supported values.

Output

FieldNotes
urlSpoken reply (WAV, 24 kHz mono).
content_typeMIME type of the reply.
textTranscript of the reply (empty when not provided).
durationReply 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.

ReplyPrice
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.

เริ่มสร้าง

ส่งคำขอแรกของคุณ

เอ็นด์พอยต์ที่ใช้งานร่วมกับ OpenAI ได้ พร้อมการยืนยันตัวตนและการติดตามการใช้งานแบบรวมศูนย์

Production API
เอ็นด์พอยต์ Unified Run API
https://api.sandbase.ai/v1/run
รหัสโมเดล
xai/grok-voice
# 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"
01

สคีมาขาเข้า

3 พารามิเตอร์ · จำเป็น 1 · ไม่บังคับ 2

พารามิเตอร์ประเภทจำเป็นคำอธิบาย
audiostringจำเป็นAudio file or URL with the user's speech. Most common formats are supported; maximum duration 10 minutes, maximum file size 50 MB.
voicestringไม่บังคับBuilt-in xAI voice for the agent's reply. Uses Grok's default voice when omitted. · ตัวเลือก: 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
promptstringไม่บังคับOptional instructions describing the agent's persona and conversation context (up to 20,000 characters). Uses Grok's default persona when omitted. · ความยาวสูงสุด: 20000
02

สคีมาเอาต์พุต

ฟิลด์ประเภทคำอธิบาย
idstringตัวระบุเฉพาะสำหรับงาน generation
statusstringสถานะงาน: pending, running, completed, failed, timeout
modelstringโมเดลที่ใช้สำหรับ generation
outputsarrayอาร์เรย์ของรายการเอาต์พุต
outputs[].urlstringURL ของอาร์ติแฟกต์ที่สร้างขึ้น
outputs[].content_typestringประเภท MIME (เช่น image/png, video/mp4)
errorobject | nullรายละเอียดข้อผิดพลาดหากล้มเหลว, เป็น null เมื่อสำเร็จ
error.typestringรหัสประเภทข้อผิดพลาดที่เครื่องอ่านได้
error.messagestringคำอธิบายข้อผิดพลาดที่มนุษย์อ่านได้

เวิร์กโฟลว์แบบอะซิงก์

โมเดลนี้ทำงานแบบอะซิงโครนัส ส่งคำขอแล้วคอยตรวจผลลัพธ์

  1. ส่ง: POST ไปที่ /v1/run แล้วอ่าน id ที่ส่งกลับมา
  2. คอยตรวจ: GET /v1/run/{id} จนกว่าสถานะจะเป็น completed, failed หรือ timeout
  3. ดึงข้อมูล: อ่าน outputs จากการตอบกลับที่เสร็จสมบูรณ์

เลือกโมเดลของคุณ

เปรียบเทียบโมเดล

โมเดลภาพและวิดีโอทั้งหมด
โมเดลประเภทราคามาตรฐานเปิดตัว
Grok Voiceโมเดลนี้
xAI
เสียง$0.02 / ครั้ง16 ก.ย. 2569
xAIเสียง$0.01 / ครั้ง17 มี.ค. 2569

คำถาม

คำถามที่พบบ่อย

ฉันจะเรียก xAI Grok Voice ผ่าน SandBase ได้อย่างไร?

สร้าง SandBase API key แล้วส่งคำขอด้วย model ID "xai/grok-voice" ไปที่ Unified Run API (/v1/run) ที่ https://api.sandbase.ai ตัวอย่างคำขอบนหน้านี้แสดง payload ที่ถูกต้องทั้งหมด

ฉันจำเป็นต้องมีบัญชี xAI แยกต่างหากไหม?

ไม่จำเป็น SandBase API key และยอดคงเหลือหนึ่งชุดให้คุณเข้าถึง xAI Grok Voice และโมเดลอื่น ๆ ในแค็ตตาล็อกได้ คุณไม่ต้องสมัครใช้งานกับ xAI แยกต่างหาก