temperaturenumber任意Gemini 3.8 Flash-Lite TTS の別テイクを作る temperature は 0〜2 で、高いほど演出に変化が出ます。Gemini 3.8 Flash-Lite TTS では省略時にモデル既定値を使い、秒単価は変わりません。
- デフォルト値
- 指定なし
- 制約
- minimum:0maximum:2
例は、選択中のエンドポイントの公開パラメーター定義から作っています。API キーとサンプル素材を差し替えて、ご自身のサーバーから送信してください。
SDK・連携https://api.spicyapi.ai/api/v1/jobs/createTaskAPI キーはサーバーの環境変数 SPICY_API_KEY に保存します。Bearer 認証を使用し、JSON リクエストには Content-Type: application/json を指定してください。
Authorization: Bearer $SPICY_API_KEY# Generate the idempotency key once; reuse it when retrying after a lost response.
export SPICY_IDEMPOTENCY_KEY="${SPICY_IDEMPOTENCY_KEY:-$(uuidgen)}"
curl -X POST https://api.spicyapi.ai/api/v1/jobs/createTask \
-H "Authorization: Bearer $SPICY_API_KEY" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: $SPICY_IDEMPOTENCY_KEY" \
-d '{
"model": "google/gemini-3.8-flash-lite-tts/text-to-speech",
"input": {
"text": "Welcome back. Your files finished rendering a minute ago and are ready to download.",
"voice_id": "Kore"
}
}'
# Copy data.taskId from the response into TASK_ID, then poll the status.
TASK_ID="TASK_ID_FROM_RESPONSE"
curl "https://api.spicyapi.ai/api/v1/jobs/recordInfo?taskId=$TASK_ID" \
-H "Authorization: Bearer $SPICY_API_KEY"このモデルの入力スキーマから生成した例です。API はどのリクエストも、同じスキーマで検証します。
これらのフィールドは、リクエスト本文の input オブジェクトに指定します。名前と型は API と一致します。デフォルト値の指定がない項目に、デフォルト値があると想定しないでください。
このモデルには項目どうしの依存関係があります。「条件付きで必須」の項目は、ほかの入力の内容によって必須になります。詳しい条件は、下の JSON Schema で確認してください。
temperaturenumber任意Gemini 3.8 Flash-Lite TTS の別テイクを作る temperature は 0〜2 で、高いほど演出に変化が出ます。Gemini 3.8 Flash-Lite TTS では省略時にモデル既定値を使い、秒単価は変わりません。
filler_wordsboolean任意Gemini 3.8 Flash-Lite TTS の filler_words は 2 人の対話にフィラーを加える設定で、初期値はオフです。1 人の読み上げには影響しません。
scenestring任意Gemini 3.8 Flash-Lite TTS の instructions で感情や話し方を指示し、必要に応じて style、accent、pace、scene を指定します。演出の解釈には幅があるため音声を試聴してください。
instructionsstring任意Gemini 3.8 Flash-Lite TTS の instructions で感情や話し方を指示し、必要に応じて style、accent、pace、scene を指定します。演出の解釈には幅があるため音声を試聴してください。
accentstring任意70 種類の音声を持つ Gemini 3.8 Flash-Lite TTS の accent で英語のアクセントを選び、対話では個別指定のない話者に適用します。
"neutral""american_general""american_valley""american_south""british_rp""british_brixton""transatlantic""australian"pacestring任意Gemini 3.8 Flash-Lite TTS の pace は natural、rapid_fire、the_drift、staccato です。10,000 文字以内の同じ台本でも、ゆっくり読むと課金秒数が増えます。
"natural""rapid_fire""the_drift""staccato"stylestring任意Gemini 3.8 Flash-Lite TTS の style は選んだ音声全体の話し方を指定し、Gemini 3.8 Flash-Lite TTS の対話では話者ごとの style が共通設定より優先されます。
"whisper""empathetic""vocal_smile""newscaster""promo_hype""deadpan"voice_idstring任意Gemini 3.8 Flash-Lite TTS では 70 種類の既成音声から選び、初期値は Kore です。対話ではGemini 3.8 Flash-Lite TTS の話者ごとに voice_id を設定します。
"Achernar""Achird""Algenib""Algieba""Alnilam""Aoede""Arlo""Autonoe""Bodi""Brio""Callirrhoe""Charon""Cleo""Cruz""Daro""Despina""Elio""Enceladus""Enya""Enzo""Erinome""Fenrir""Finn""Fola""Gacrux""Gero""Hali""Iapetus""Jett""Jori""Kira""Knox""Koda""Kore""Laomedeia""Leda""Lora""Ludo""Lumi""Mako""Milo""Neno""Nika""Nyla""Olin""Orus""Puck""Pulcherrima""Rami""Rasalgethi""Riko""Rina""Sadachbia""Sadaltager""Sami""Schedar""Sola""Sulafat""Tari""Tavi""Tova""Umbriel""Varo""Veda""Vindemiatrix""Zali""Zeno""Zephyr""Zubenelgenubi""Zuri"speakersarray<object>条件付きで必須Gemini 3.8 Flash-Lite TTS の dialogue では各行の speaker を speakers の名前と一致させます。話者は 1〜2 人、最大 20 行、各行 10,000 文字で、1 本の WAV にまとまります。SpicyAPI の Gemini 3.8 Flash-Lite TTS で一時的な音声複製を使う場合は dialogue と、成人本人の reference_audio_url・consent_audio_url が必要で、voice_id は省きます。各 WAV は 10 MB 以内、自然な参照音声は 10〜30 秒で、同じマイクと部屋で所定の同意文も録音します。AI 音声は使えず、本人提供の録音による検証は未実施です。
speakers[].namestringオブジェクト内で必須Name the dialogue lines use for this speaker.
speakers[].pacestring任意Rhythm of this speaker's lines.
"natural""rapid_fire""the_drift""staccato"speakers[].stylestring任意Manner of this speaker's lines.
"whisper""empathetic""vocal_smile""newscaster""promo_hype""deadpan"speakers[].accentstring任意English accent for this speaker.
"neutral""american_general""american_valley""american_south""british_rp""british_brixton""transatlantic""australian"speakers[].profilestring任意Short description of who is speaking; not read aloud.
speakers[].voice_idstring任意One of 70 prebuilt voices; omit when using cloning recordings. Defaults to Kore when no recordings are supplied.
"Achernar""Achird""Algenib""Algieba""Alnilam""Aoede""Arlo""Autonoe""Bodi""Brio""Callirrhoe""Charon""Cleo""Cruz""Daro""Despina""Elio""Enceladus""Enya""Enzo""Erinome""Fenrir""Finn""Fola""Gacrux""Gero""Hali""Iapetus""Jett""Jori""Kira""Knox""Koda""Kore""Laomedeia""Leda""Lora""Ludo""Lumi""Mako""Milo""Neno""Nika""Nyla""Olin""Orus""Puck""Pulcherrima""Rami""Rasalgethi""Riko""Rina""Sadachbia""Sadaltager""Sami""Schedar""Sola""Sulafat""Tari""Tavi""Tova""Umbriel""Varo""Veda""Vindemiatrix""Zali""Zeno""Zephyr""Zubenelgenubi""Zuri"speakers[].consent_audio_urlstring条件付きで必須WAV recording of the same adult granting permission to clone their voice; use the same microphone and room as the reference recording.
speakers[].reference_audio_urlstring条件付きで必須A 10–30 second WAV recording of the adult voice owner, in the language to generate. Required together with consent_audio_url; omit voice_id.
{
"type": "array",
"x-ui": {
"order": 96,
"widget": "object-list",
"advanced": false
},
"items": {
"type": "object",
"allOf": [
{
"if": {
"required": [
"reference_audio_url"
]
},
"then": {
"not": {
"required": [
"voice_id"
]
},
"required": [
"consent_audio_url"
]
}
},
{
"if": {
"required": [
"consent_audio_url"
]
},
"then": {
"not": {
"required": [
"voice_id"
]
},
"required": [
"reference_audio_url"
]
}
}
],
"required": [
"name"
],
"properties": {
"name": {
"type": "string",
"maxLength": 40,
"minLength": 1,
"description": "Name the dialogue lines use for this speaker."
},
"pace": {
"enum": [
"natural",
"rapid_fire",
"the_drift",
"staccato"
],
"type": "string",
"description": "Rhythm of this speaker's lines."
},
"style": {
"enum": [
"whisper",
"empathetic",
"vocal_smile",
"newscaster",
"promo_hype",
"deadpan"
],
"type": "string",
"description": "Manner of this speaker's lines."
},
"accent": {
"enum": [
"neutral",
"american_general",
"american_valley",
"american_south",
"british_rp",
"british_brixton",
"transatlantic",
"australian"
],
"type": "string",
"description": "English accent for this speaker."
},
"profile": {
"type": "string",
"maxLength": 300,
"description": "Short description of who is speaking; not read aloud."
},
"voice_id": {
"enum": [
"Achernar",
"Achird",
"Algenib",
"Algieba",
"Alnilam",
"Aoede",
"Arlo",
"Autonoe",
"Bodi",
"Brio",
"Callirrhoe",
"Charon",
"Cleo",
"Cruz",
"Daro",
"Despina",
"Elio",
"Enceladus",
"Enya",
"Enzo",
"Erinome",
"Fenrir",
"Finn",
"Fola",
"Gacrux",
"Gero",
"Hali",
"Iapetus",
"Jett",
"Jori",
"Kira",
"Knox",
"Koda",
"Kore",
"Laomedeia",
"Leda",
"Lora",
"Ludo",
"Lumi",
"Mako",
"Milo",
"Neno",
"Nika",
"Nyla",
"Olin",
"Orus",
"Puck",
"Pulcherrima",
"Rami",
"Rasalgethi",
"Riko",
"Rina",
"Sadachbia",
"Sadaltager",
"Sami",
"Schedar",
"Sola",
"Sulafat",
"Tari",
"Tavi",
"Tova",
"Umbriel",
"Varo",
"Veda",
"Vindemiatrix",
"Zali",
"Zeno",
"Zephyr",
"Zubenelgenubi",
"Zuri"
],
"type": "string",
"description": "One of 70 prebuilt voices; omit when using cloning recordings. Defaults to Kore when no recordings are supplied."
},
"consent_audio_url": {
"type": "string",
"x-ui": {
"accept": [
"audio/wav"
],
"widget": "upload",
"max_size_mb": 10
},
"format": "uri",
"description": "WAV recording of the same adult granting permission to clone their voice; use the same microphone and room as the reference recording."
},
"reference_audio_url": {
"type": "string",
"x-ui": {
"accept": [
"audio/wav"
],
"widget": "upload",
"max_size_mb": 10
},
"format": "uri",
"description": "A 10–30 second WAV recording of the adult voice owner, in the language to generate. Required together with consent_audio_url; omit voice_id."
}
},
"additionalProperties": false
},
"maxItems": 2,
"minItems": 1,
"description": "The cast for dialogue: one or two voices, each with a name the lines refer to."
}dialoguearray<object>条件付きで必須Gemini 3.8 Flash-Lite TTS の dialogue では各行の speaker を speakers の名前と一致させます。話者は 1〜2 人、最大 20 行、各行 10,000 文字で、1 本の WAV にまとまります。
dialogue[].textstringオブジェクト内で必須The line, exactly as it should be spoken.
dialogue[].speakerstringオブジェクト内で必須A name from speakers.
dialogue[].stylestring任意Delivery for this line: freely describe tone, emotion and pace. Overrides the speaker style.
textstring条件付きで必須Gemini 3.8 Flash-Lite TTS の text には読み上げる台本だけを 10,000 文字以内で入れ、演出は instructions に分けてください。
{
"type": "object",
"allOf": [
{
"if": {
"required": [
"dialogue"
]
},
"then": {
"required": [
"speakers"
]
}
}
],
"anyOf": [
{
"required": [
"text"
]
},
{
"required": [
"dialogue"
]
}
],
"required": [],
"x-pricing": {
"billingMode": "duration_capped",
"variantFields": []
},
"properties": {
"pace": {
"enum": [
"natural",
"rapid_fire",
"the_drift",
"staccato"
],
"type": "string",
"x-ui": {
"order": 75,
"widget": "select"
},
"description": "Rhythm of the reading. Omit it to keep the voice's own rhythm."
},
"text": {
"type": "string",
"x-ui": {
"rows": 6,
"order": 100,
"widget": "textarea",
"primary": true
},
"maxLength": 10000,
"minLength": 1,
"description": "Words to speak, up to 10,000 characters. Native inline cues include <laugh>, <sigh> and <short pause>."
},
"scene": {
"type": "string",
"x-ui": {
"rows": 2,
"order": 58,
"widget": "textarea"
},
"maxLength": 500,
"description": "Where and to whom the words are spoken. Shapes the delivery and is not spoken."
},
"style": {
"enum": [
"whisper",
"empathetic",
"vocal_smile",
"newscaster",
"promo_hype",
"deadpan"
],
"type": "string",
"x-ui": {
"order": 80,
"widget": "select"
},
"description": "Overall manner of the reading. Omit it to use the voice's own default manner."
},
"accent": {
"enum": [
"neutral",
"american_general",
"american_valley",
"american_south",
"british_rp",
"british_brixton",
"transatlantic",
"australian"
],
"type": "string",
"x-ui": {
"order": 70,
"widget": "select"
},
"description": "English accent used for the reading."
},
"dialogue": {
"type": "array",
"x-ui": {
"order": 98,
"widget": "object-list",
"advanced": false
},
"items": {
"type": "object",
"required": [
"speaker",
"text"
],
"properties": {
"text": {
"type": "string",
"maxLength": 10000,
"minLength": 1,
"description": "The line, exactly as it should be spoken."
},
"style": {
"type": "string",
"x-ui": {
"rows": 2,
"widget": "textarea"
},
"maxLength": 1000,
"description": "Delivery for this line: freely describe tone, emotion and pace. Overrides the speaker style."
},
"speaker": {
"type": "string",
"maxLength": 40,
"minLength": 1,
"description": "A name from speakers."
}
},
"additionalProperties": false
},
"maxItems": 20,
"minItems": 1,
"description": "A scripted conversation, used instead of text: each line names a speaker from speakers."
},
"speakers": {
"type": "array",
"x-ui": {
"order": 96,
"widget": "object-list",
"advanced": false
},
"items": {
"type": "object",
"allOf": [
{
"if": {
"required": [
"reference_audio_url"
]
},
"then": {
"not": {
"required": [
"voice_id"
]
},
"required": [
"consent_audio_url"
]
}
},
{
"if": {
"required": [
"consent_audio_url"
]
},
"then": {
"not": {
"required": [
"voice_id"
]
},
"required": [
"reference_audio_url"
]
}
}
],
"required": [
"name"
],
"properties": {
"name": {
"type": "string",
"maxLength": 40,
"minLength": 1,
"description": "Name the dialogue lines use for this speaker."
},
"pace": {
"enum": [
"natural",
"rapid_fire",
"the_drift",
"staccato"
],
"type": "string",
"description": "Rhythm of this speaker's lines."
},
"style": {
"enum": [
"whisper",
"empathetic",
"vocal_smile",
"newscaster",
"promo_hype",
"deadpan"
],
"type": "string",
"description": "Manner of this speaker's lines."
},
"accent": {
"enum": [
"neutral",
"american_general",
"american_valley",
"american_south",
"british_rp",
"british_brixton",
"transatlantic",
"australian"
],
"type": "string",
"description": "English accent for this speaker."
},
"profile": {
"type": "string",
"maxLength": 300,
"description": "Short description of who is speaking; not read aloud."
},
"voice_id": {
"enum": [
"Achernar",
"Achird",
"Algenib",
"Algieba",
"Alnilam",
"Aoede",
"Arlo",
"Autonoe",
"Bodi",
"Brio",
"Callirrhoe",
"Charon",
"Cleo",
"Cruz",
"Daro",
"Despina",
"Elio",
"Enceladus",
"Enya",
"Enzo",
"Erinome",
"Fenrir",
"Finn",
"Fola",
"Gacrux",
"Gero",
"Hali",
"Iapetus",
"Jett",
"Jori",
"Kira",
"Knox",
"Koda",
"Kore",
"Laomedeia",
"Leda",
"Lora",
"Ludo",
"Lumi",
"Mako",
"Milo",
"Neno",
"Nika",
"Nyla",
"Olin",
"Orus",
"Puck",
"Pulcherrima",
"Rami",
"Rasalgethi",
"Riko",
"Rina",
"Sadachbia",
"Sadaltager",
"Sami",
"Schedar",
"Sola",
"Sulafat",
"Tari",
"Tavi",
"Tova",
"Umbriel",
"Varo",
"Veda",
"Vindemiatrix",
"Zali",
"Zeno",
"Zephyr",
"Zubenelgenubi",
"Zuri"
],
"type": "string",
"description": "One of 70 prebuilt voices; omit when using cloning recordings. Defaults to Kore when no recordings are supplied."
},
"consent_audio_url": {
"type": "string",
"x-ui": {
"accept": [
"audio/wav"
],
"widget": "upload",
"max_size_mb": 10
},
"format": "uri",
"description": "WAV recording of the same adult granting permission to clone their voice; use the same microphone and room as the reference recording."
},
"reference_audio_url": {
"type": "string",
"x-ui": {
"accept": [
"audio/wav"
],
"widget": "upload",
"max_size_mb": 10
},
"format": "uri",
"description": "A 10–30 second WAV recording of the adult voice owner, in the language to generate. Required together with consent_audio_url; omit voice_id."
}
},
"additionalProperties": false
},
"maxItems": 2,
"minItems": 1,
"description": "The cast for dialogue: one or two voices, each with a name the lines refer to."
},
"voice_id": {
"enum": [
"Achernar",
"Achird",
"Algenib",
"Algieba",
"Alnilam",
"Aoede",
"Arlo",
"Autonoe",
"Bodi",
"Brio",
"Callirrhoe",
"Charon",
"Cleo",
"Cruz",
"Daro",
"Despina",
"Elio",
"Enceladus",
"Enya",
"Enzo",
"Erinome",
"Fenrir",
"Finn",
"Fola",
"Gacrux",
"Gero",
"Hali",
"Iapetus",
"Jett",
"Jori",
"Kira",
"Knox",
"Koda",
"Kore",
"Laomedeia",
"Leda",
"Lora",
"Ludo",
"Lumi",
"Mako",
"Milo",
"Neno",
"Nika",
"Nyla",
"Olin",
"Orus",
"Puck",
"Pulcherrima",
"Rami",
"Rasalgethi",
"Riko",
"Rina",
"Sadachbia",
"Sadaltager",
"Sami",
"Schedar",
"Sola",
"Sulafat",
"Tari",
"Tavi",
"Tova",
"Umbriel",
"Varo",
"Veda",
"Vindemiatrix",
"Zali",
"Zeno",
"Zephyr",
"Zubenelgenubi",
"Zuri"
],
"type": "string",
"x-ui": {
"order": 90,
"widget": "select",
"primary": true
},
"default": "Kore",
"description": "Prebuilt voice that reads the text. Each voice has a fixed character."
},
"temperature": {
"type": "number",
"x-ui": {
"step": 0.05,
"order": 40,
"widget": "slider"
},
"maximum": 2,
"minimum": 0,
"description": "Variation between takes; higher is less predictable."
},
"filler_words": {
"type": "boolean",
"x-ui": {
"order": 45,
"widget": "switch"
},
"default": false,
"description": "Allow filler words in a two-speaker conversation. Has no effect on single-speaker requests."
},
"instructions": {
"type": "string",
"x-ui": {
"rows": 3,
"order": 60,
"widget": "textarea"
},
"maxLength": 1000,
"description": "How to read the text: mood, distance from the microphone, who is listening. Shapes the delivery and is not spoken."
}
},
"additionalProperties": false
}HTTP 202 はタスクを受け付けたという意味で、生成が終わったという意味ではありません。返ってきた taskId を保存し、そのタスクの状態を問い合わせてください。結果を待っている間に、同じ内容でタスクを作り直さないでください。
HTTP/1.1 202 Accepted
Location: /api/v1/jobs/recordInfo?taskId=job_01k3m8x9q2z4v7n5p6r8s0t1w3
{
"code": 200,
"msg": "success",
"request_id": "req_example_create",
"data": {
"taskId": "job_01k3m8x9q2z4v7n5p6r8s0t1w3",
"state": "queued",
"estimatedCost": "0.750000"
}
}受理レスポンスには今回の概算料金が含まれるため、アプリのタスク履歴と請求画面に同じ金額を表示できます。
curl --get "https://api.spicyapi.ai/api/v1/jobs/recordInfo" \
--data-urlencode "taskId=$TASK_ID" \
-H "Authorization: Bearer $SPICY_API_KEY"ポーリングは約 2 秒間隔から始め、徐々に間隔を延ばします。終了状態になったら止めてください。通信が切れたときも、元の taskId で状態を確認します。作成をやり直すときは、同じ冪等キーと同じ本文をそのまま使い回してください。
import { verifyWebhook } from "@spicyapi/sdk";
// express.raw keeps the bytes we signed; express.json never matches.
app.post("/hooks/spicy", express.raw({ type: "application/json" }), (req, res) => {
const { payload } = verifyWebhook({
rawBody: req.body,
timestamp: req.header("X-Webhook-Timestamp"),
signature: req.header("X-Webhook-Signature"),
payloadVersion: Number(req.header("X-Webhook-Payload-Version")),
secret: process.env.SPICY_WEBHOOK_SECRET,
});
res.status(200).end();
void handleFinishedTask(payload);
});タスク作成時に callBackUrl を渡せば、完了したレコードが POST で届きます——ポーリングは一切不要です。配信には毎回 X-Webhook-Timestamp、X-Webhook-Signature、X-Webhook-Payload-Version が付きます。署名は taskId.timestamp.sha256(body) に対する HMAC-SHA256(base64)なので、生のバイト列で検証してください。JSON を解析して再度文字列化するとバイト列が変わり、検証は必ず失敗します。失敗した配信は再送されるため同じ taskId が二度届くことがあります。ハンドラーは冪等に。まず 2xx を返し、処理はその後で——応答が遅いと配信失敗として扱われます。
output を読むのは、state が succeeded のときだけにしてください。失敗したときは errorCode、errorMessage、request_id を手がかりに調べます。例に出ている料金や状態は、実際の請求ではありません。
{
"code": 200,
"msg": "success",
"request_id": "req_example_record",
"data": {
"taskId": "job_01k3m8x9q2z4v7n5p6r8s0t1w3",
"model": "google/gemini-3.8-flash-lite-tts/text-to-speech",
"state": "succeeded",
"output": {
"assets": [
{
"key": "tasks/2026/08/28/job_01k3m8x9q2z4v7n5p6r8s0t1w3/3f7a1c9e5b2d48f0a6c1e3d5b7f9a1c3.mp3",
"mime": "audio/mpeg",
"url": "https://example.r2.cloudflarestorage.com/results/job_01k3m8x9q2z4v7n5p6r8s0t1w3/result.mp3?X-Amz-Signature=SIGNATURE_FROM_RESPONSE",
"expiresAt": "2026-08-28T12:20:08.000Z"
}
]
},
"cost": "0.750000",
"settled": true,
"createdAt": "2026-08-28T12:00:00Z",
"completedAt": "2026-08-28T12:00:30Z"
}
}利用可能なファイルは assets[].url からそのまま開くか、ダウンロードできます。API の Authorization ヘッダーは不要です。署名付き URL は expiresAt で失効しますが、保存期間内であればタスクを再取得することで更新できます。処理中または利用できないファイルに URL はありません。署名付き URL は非公開情報として扱ってください。
アプリ、ターミナル、AI アシスタント、ビジュアルワークフローで SpicyAPI を活用。接続ガイドを選んでください。
上のコードを書く必要はありません。MCP サーバーを 1 回接続すれば、MCP に対応するエージェント(Claude Code、Codex、Cursor、Windsurf、VS Code、Gemini CLI、Cline、LibreChat)がこのモデルを名前で実行できます。シェルから 1 つのコマンドで実行することもできます。
Use google/gemini-3.8-flash-lite-tts/text-to-speech to generate a portrait of a dancer under neon light, and save it to ./out/.
エージェントは公開カタログからモデルを引き、ローカルファイルを代わりにアップロードし、正確な見積もりと上限額を示して確認を待ちます。承認するまで課金は発生しません。
claude mcp add spicyapi -e SPICY_API_KEY=$SPICY_API_KEY \
-- npx --yes --package=@spicyapi/mcp spicyapi-mcp
npx skills add spicyapi-ai/spicy-skill1 行目でツールを、2 行目で Skill を渡します。Skill は使い方の取り決めです——課金の前に見積もりを取り、ローカルファイルはバイト列を貼らずにアップロードし、完成した成果物の URL を推測せずに読む。ほかのクライアントも同じサーバーをそれぞれの設定ファイルから使います。開発者向けページをご覧ください。
npx @spicyapi/cli tasks create --model google/gemini-3.8-flash-lite-tts/text-to-speech \
--input-json '{"text":"Welcome back. Your files finished rendering a minute ago and are ready to download.","voice_id":"Kore"}' \
--wait入力は上の例と同じ、このエンドポイント固有のスキーマに従います。--wait はタスクの完了までポーリングして結果を表示します。CI では --yes を追加すると確認を省略できます。先に SPICY_API_KEY を設定してください。API、CLI、MCP サーバーで同じキーを使えます。
npx @spicyapi/cli tasks create --model google/gemini-3.8-flash-lite-tts/text-to-speech \
--input-json '{…}' --retention 1h --wait
npx @spicyapi/cli tasks get $TASK_ID # read back the retention that applied--retention は保持期間を短くするだけです——30m、1h、7d、あるいは 0 なら終了と同時に削除。実際に効くのはリクエスト・アカウント設定・プラットフォーム上限のうち最も短い値なので、指定した数値が通った前提で進めず、タスクレコードから読み戻してください。アカウントの許容より長い値を渡しても何も起きません。
ComfyUI Manager か下のコマンドで SpicyAPI ノードをインストールしたら、キャンバスで Gemini 3.8 Flash-Lite TTS · Text to Speech を検索してください。このノードにはこのページと同じオプションがあり、実行前に価格が表示されます。
cd ComfyUI/custom_nodes
git clone https://github.com/spicyapi-ai/comfyui-spicyapi埋め込みパネルはこのページと同じスキーマを参照するため、API 仕様とのずれを防げます。ドキュメント内の検索対象にする場合は、/api/embed/models/ の JSON を取得して描画してください。
<iframe src="https://spicyapi.ai/embed/ja/models/gemini-3-8-flash-lite-tts/api?model=google%2Fgemini-3.8-flash-lite-tts%2Ftext-to-speech" width="100%" height="560" loading="lazy" title="リクエスト例" style="border:1px solid rgba(0,0,0,.12)"></iframe>