Gemini 3.8 Flash TTS API: Tạo âm thanh AI

tạo âm thanh và nhạc với Gemini 3.8 Flash TTS qua MuAPI REST API. Trả theo lượt tạo — không cần gói đăng ký.

Điều khiển mô hình tương tác

Gemini 3.8 Flash TTS turns written dialogue into expressive, natural multi-speaker speech with studio-grade voice fidelity, expressive acting, and long-form stability. Control voice, accent, emotional style, and pace per speaker for fast, affordable voiceovers, character dialogue, and narration.

Gemini 3.8 Flash TTS Tham khảo API

Điểm cuối

POST https://api.muapi.ai/api/v1/gemini-3-8-flash-tts

Gửi công việc có khóa API Muapi của bạn trong tiêu đề x-api-key, sau đó thăm dò ý kiến https://api.muapi.ai/api/v1/predictions/{request_id}/result cho đến khi trạng thái được hoàn thành.

Parameters

NameLoạiBắt buộcMô tả
speakersarrayCó。 ID 。
dialogue_turnsarrayCó。 speaker_id 。 [shouting] [whispers] 。
scenestringKhông scene description that sets the acoustic setting, e.g. "A quiet, warm room with a fireplace crackling softly."Mặc định: ""
sample_contextstringKhông overall tone/style, e.g. "Audiobook style narration. Tone is gentle and inviting."Mặc định: ""
temperaturenumberKhông(0-2)。,。Mặc định: 1

cURL example

REQUEST_ID=$(curl -s -X POST https://api.muapi.ai/api/v1/gemini-3-8-flash-tts \
  -H "x-api-key: $MUAPI_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"speakers":[],"dialogue_turns":[]}' | jq -r .request_id)

curl -s https://api.muapi.ai/api/v1/predictions/$REQUEST_ID/result -H "x-api-key: $MUAPI_API_KEY"

Python example

import os, time, requests

API = "https://api.muapi.ai/api/v1"
headers = {"x-api-key": os.environ["MUAPI_API_KEY"]}

r = requests.post(f"{API}/gemini-3-8-flash-tts", headers=headers, json={"speakers":[],"dialogue_turns":[]})
request_id = r.json()["request_id"]

while True:
    res = requests.get(f"{API}/predictions/{request_id}/result", headers=headers).json()
    if res["status"] == "completed":
        print(res["outputs"]); break
    if res["status"] == "failed":
        raise RuntimeError(res.get("error"))
    time.sleep(3)

Tài liệu đầy đủ và tích hợp đại lý/MCP: llms.txt. Get an API key at muapi.ai/access-keys.