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

Gemini 2.5 TTS

google/gemini-tts

Gemini 2.5 TTS by Google turns text into expressive speech with 30 voices, single- or multi-speaker dialogue, and natural-language style control in 80+ languages, using the Flash or Pro TTS model.

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

ลองใช้โมเดล

Playground

เปิด Playground
อินพุต
Text to speak, up to 50,000 characters. Inline delivery cues work (e.g. 'Say cheerfully: Have a wonderful day!', [whispering], [slowly]). For multi-speaker synthesis, prefix lines with the speaker aliases defined in speakers (e.g. 'Alice: Hello!\nBob: Hi!').
gemini-2.5-flash-tts: low latency and lower cost. gemini-2.5-pro-tts: highest quality, for podcasts, audiobooks, and other structured long-form speech.
Voice preset for single-speaker synthesis; ignored when speakers is set. Popular: Kore (firm female), Puck (upbeat male), Charon (calm male), Zephyr (bright female), Aoede (warm female).
Optional style and delivery instructions prepended to the prompt: tone, accent, pace, emotion.
Multi-speaker configuration. Each entry maps a speaker alias used in the prompt to a voice preset.
Language to speak. Omit it to detect the language from the text.
mp3: compressed (recommended). wav: 24 kHz 16-bit mono PCM. ogg_opus: Opus in an Ogg container.
เอาต์พุตพร้อมใช้งาน

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

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

การ์ดโมเดล

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

ราคา

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

บริบทและ modalities

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

ความสามารถ

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

การเข้าถึง

ผู้ให้บริการ
Google
รหัสโมเดล
google/gemini-tts
การทำงาน
async
Base URL
https://api.sandbase.ai
API
Unified Run API
Endpoint
/v1/run

API README

Gemini 2.5 TTS

Gemini 2.5 TTS speaks text with 30 preset voices, supports two-speaker dialogue and natural-language style direction, and covers 80+ languages. Choose Flash for speed or Pro for the highest quality.

Fields

FieldTypeDefaultNotes
promptstring, required—Text to speak, up to 50,000 characters; inline cues such as [whispering] work.
tts_modelgemini-2.5-flash-tts / gemini-2.5-pro-ttsgemini-2.5-flash-ttsFlash is faster and cheaper; Pro has the best quality.
voicestringKoreSingle-speaker voice preset; ignored when speakers is set. See the schema for supported values.
style_instructionsstring—Tone, accent, pace, or emotion, up to 4,000 characters.
speakersarray of {speaker_id, voice}—Multi-speaker setup; prefix prompt lines with each speaker_id.
languagestring—Language to speak; omit to auto-detect. See the schema for supported values.
output_formatwav / mp3 / ogg_opusmp3Audio file format.

Billing

$0.02 per 1,000 characters of prompt with Flash, $0.04 with Pro, billed per character with a $0.01 minimum per request.

TextFlashPro
200 characters$0.01$0.01
1,000 characters$0.02$0.04
10,000 characters$0.20$0.40

Failed runs are not charged.

Prompting

  • Put stable style direction in style_instructions and keep prompt for the words to speak.
  • For dialogue, define each speaker in speakers and start every line with Alias:.

เริ่มสร้าง

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

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

Production API
เอ็นด์พอยต์ Unified Run API
https://api.sandbase.ai/v1/run
รหัสโมเดล
google/gemini-tts
# 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": "google/gemini-tts",
  "voice": "Kore",
  "prompt": "Host: Welcome back to AI Frontiers, the podcast where we explore the latest breakthroughs in artificial intelligence. Today we have a very special guest. Doctor Chen, thank you for joining us!\nDrChen: Thanks for having me! I'm excited to be here.\nHost: So, let's dive right in. Your recent paper on neural architecture search has been making waves. Can you tell our listeners what inspired this research?\nDrChen: Absolutely. It all started when we noticed that most existing approaches were optimizing for the wrong metrics. We asked ourselves, what if we could let the model design itself?",
  "language": "English (US)",
  "speakers": [
    [
      {
        "voice": "Charon",
        "speaker_id": "Host"
      },
      {
        "voice": "Kore",
        "speaker_id": "DrChen"
      }
    ]
  ],
  "tts_model": "gemini-2.5-flash-tts",
  "output_format": "mp3",
  "style_instructions": "Say the following in a warm, conversational tone"
}
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

สคีมาขาเข้า

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

พารามิเตอร์ประเภทจำเป็นคำอธิบาย
promptstringจำเป็นText to speak, up to 50,000 characters. Inline delivery cues work (e.g. 'Say cheerfully: Have a wonderful day!', [whispering], [slowly]). For multi-speaker synthesis, prefix lines with the speaker aliases defined in speakers (e.g. 'Alice: Hello!\nBob: Hi!'). · ความยาวต่ำสุด: 1 · ความยาวสูงสุด: 50000
voicestringไม่บังคับVoice preset for single-speaker synthesis; ignored when speakers is set. Popular: Kore (firm female), Puck (upbeat male), Charon (calm male), Zephyr (bright female), Aoede (warm female). · ตัวเลือก: Achernar, Achird, Algenib, Algieba, Alnilam, Aoede, Autonoe, Callirrhoe, Charon, Despina, Enceladus, Erinome, Fenrir, Gacrux, Iapetus, Kore, Laomedeia, Leda, Orus, Pulcherrima, Puck, Rasalgethi, Sadachbia, Sadaltager, Schedar, Sulafat, Umbriel, Vindemiatrix, Zephyr, Zubenelgenubi · ค่าเริ่มต้น: "Kore"
AchernarAchirdAlgenibAlgiebaAlnilamAoedeAutonoeCallirrhoeCharonDespinaEnceladusErinomeFenrirGacruxIapetusKoreLaomedeiaLedaOrusPulcherrimaPuckRasalgethiSadachbiaSadaltagerSchedarSulafatUmbrielVindemiatrixZephyrZubenelgenubi
languagestringไม่บังคับLanguage to speak. Omit it to detect the language from the text. · ตัวเลือก: Arabic (Egypt), Bangla (Bangladesh), Dutch (Netherlands), English (India), English (US), French (France), German (Germany), Hindi (India), Indonesian (Indonesia), Italian (Italy), Japanese (Japan), Korean (South Korea), Marathi (India), Polish (Poland), Portuguese (Brazil), Romanian (Romania), Russian (Russia), Spanish (Spain), Tamil (India), Telugu (India), Thai (Thailand), Turkish (Turkey), Ukrainian (Ukraine), Vietnamese (Vietnam), Afrikaans (South Africa), Albanian (Albania), Amharic (Ethiopia), Arabic (World), Armenian (Armenia), Azerbaijani (Azerbaijan), Basque (Spain), Belarusian (Belarus), Bulgarian (Bulgaria), Burmese (Myanmar), Catalan (Spain), Cebuano (Philippines), Chinese Mandarin (China), Chinese Mandarin (Taiwan), Croatian (Croatia), Czech (Czech Republic), Danish (Denmark), English (Australia), English (UK), Estonian (Estonia), Filipino (Philippines), Finnish (Finland), French (Canada), Galician (Spain), Georgian (Georgia), Greek (Greece), Gujarati (India), Haitian Creole (Haiti), Hebrew (Israel), Hungarian (Hungary), Icelandic (Iceland), Javanese (Java), Kannada (India), Konkani (India), Lao (Laos), Latin (Vatican City), Latvian (Latvia), Lithuanian (Lithuania), Luxembourgish (Luxembourg), Macedonian (North Macedonia), Maithili (India), Malagasy (Madagascar), Malay (Malaysia), Malayalam (India), Mongolian (Mongolia), Nepali (Nepal), Norwegian Bokmal (Norway), Norwegian Nynorsk (Norway), Odia (India), Pashto (Afghanistan), Persian (Iran), Portuguese (Portugal), Punjabi (India), Serbian (Serbia), Sindhi (India), Sinhala (Sri Lanka), Slovak (Slovakia), Slovenian (Slovenia), Spanish (Latin America), Spanish (Mexico), Swahili (Kenya), Swedish (Sweden), Urdu (Pakistan)
Arabic (Egypt)Bangla (Bangladesh)Dutch (Netherlands)English (India)English (US)French (France)German (Germany)Hindi (India)Indonesian (Indonesia)Italian (Italy)Japanese (Japan)Korean (South Korea)Marathi (India)Polish (Poland)Portuguese (Brazil)Romanian (Romania)Russian (Russia)Spanish (Spain)Tamil (India)Telugu (India)Thai (Thailand)Turkish (Turkey)Ukrainian (Ukraine)Vietnamese (Vietnam)Afrikaans (South Africa)Albanian (Albania)Amharic (Ethiopia)Arabic (World)Armenian (Armenia)Azerbaijani (Azerbaijan)Basque (Spain)Belarusian (Belarus)Bulgarian (Bulgaria)Burmese (Myanmar)Catalan (Spain)Cebuano (Philippines)Chinese Mandarin (China)Chinese Mandarin (Taiwan)Croatian (Croatia)Czech (Czech Republic)Danish (Denmark)English (Australia)English (UK)Estonian (Estonia)Filipino (Philippines)Finnish (Finland)French (Canada)Galician (Spain)Georgian (Georgia)Greek (Greece)Gujarati (India)Haitian Creole (Haiti)Hebrew (Israel)Hungarian (Hungary)Icelandic (Iceland)Javanese (Java)Kannada (India)Konkani (India)Lao (Laos)Latin (Vatican City)Latvian (Latvia)Lithuanian (Lithuania)Luxembourgish (Luxembourg)Macedonian (North Macedonia)Maithili (India)Malagasy (Madagascar)Malay (Malaysia)Malayalam (India)Mongolian (Mongolia)Nepali (Nepal)Norwegian Bokmal (Norway)Norwegian Nynorsk (Norway)Odia (India)Pashto (Afghanistan)Persian (Iran)Portuguese (Portugal)Punjabi (India)Serbian (Serbia)Sindhi (India)Sinhala (Sri Lanka)Slovak (Slovakia)Slovenian (Slovenia)Spanish (Latin America)Spanish (Mexico)Swahili (Kenya)Swedish (Sweden)Urdu (Pakistan)
speakersobject[]ไม่บังคับMulti-speaker configuration. Each entry maps a speaker alias used in the prompt to a voice preset.
tts_modelstringไม่บังคับgemini-2.5-flash-tts: low latency and lower cost. gemini-2.5-pro-tts: highest quality, for podcasts, audiobooks, and other structured long-form speech. · ตัวเลือก: gemini-2.5-flash-tts, gemini-2.5-pro-tts · ค่าเริ่มต้น: "gemini-2.5-flash-tts"
gemini-2.5-flash-ttsgemini-2.5-pro-tts
output_formatstringไม่บังคับmp3: compressed (recommended). wav: 24 kHz 16-bit mono PCM. ogg_opus: Opus in an Ogg container. · ตัวเลือก: wav, mp3, ogg_opus · ค่าเริ่มต้น: "mp3"
wavmp3ogg_opus
style_instructionsstringไม่บังคับOptional style and delivery instructions prepended to the prompt: tone, accent, pace, emotion. · ความยาวสูงสุด: 4000
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 จากการตอบกลับที่เสร็จสมบูรณ์

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

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

โมเดลภาพและวิดีโอทั้งหมด
โมเดลประเภทราคามาตรฐานเปิดตัว
Gemini 2.5 TTSโมเดลนี้
Google
เสียง$0.02 / ครั้ง20 มี.ค. 2569
Googleเสียง$0.04 / ครั้ง25 ก.ย. 2569
Googleเสียง$0.03 / ครั้ง25 ก.ย. 2569
Googleเสียง$0.10 / ครั้ง15 ก.ย. 2569
Googleเสียง$0.05 / ครั้ง16 เม.ย. 2569
Googleเสียง$0.08 / ครั้ง30 มี.ค. 2569

คำถาม

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

ฉันจะเรียก Google Gemini 2.5 TTS ผ่าน SandBase ได้อย่างไร?

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

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

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