靈活的參數
可設定 7 個已記錄的參數,包括 background_music, custom_mode, prompt, script, tone。
curl -X POST https://runapi.ai/api/v1/suno/text_to_speech \
-H "Authorization: Bearer $RUNAPI_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "suno-speech",
"custom_mode": false,
"prompt": "A short morning news introduction."
}'
import { SunoClient } from "@runapi.ai/suno";
const client = new SunoClient();
const result = await client.textToSpeech.run({
model: "suno-speech",
custom_mode: false,
prompt: "A short morning news introduction.",
});
import os
import requests
response = requests.post(
"https://runapi.ai/api/v1/suno/text_to_speech",
headers={"Authorization": f"Bearer {os.environ['RUNAPI_API_KEY']}"},
json={"model":"suno-speech","custom_mode":false,"prompt":"A short morning news introduction."}
)
response.raise_for_status()
<?php
$client = curl_init("https://runapi.ai/api/v1/suno/text_to_speech");
curl_setopt_array($client, [
CURLOPT_HTTPHEADER => ["Authorization: Bearer " . getenv("RUNAPI_API_KEY"), "Content-Type: application/json"],
CURLOPT_POSTFIELDS => json_encode([
'model' => 'suno-speech',
'custom_mode' => false,
'prompt' => 'A short morning news introduction.',
])
]);
$response = curl_exec($client);
RunApi client = new RunApi(System.getenv("RUNAPI_API_KEY"));
Task task = client.textToSpeech().run({"model":"suno-speech","custom_mode":false,"prompt":"A short morning news introduction."});
task.waitForResult();
require "runapi/suno"
client = RunApi::Suno::Client.new
result = client.text_to_speech.run(
model: "suno-speech",
custom_mode: false,
prompt: "A short morning news introduction."
)
client := runapi.NewClient(os.Getenv("RUNAPI_API_KEY"))
task, err := client.textToSpeech.Run({"model":"suno-speech","custom_mode":false,"prompt":"A short morning news introduction."})
if err != nil { log.Fatal(err) }
task.Wait()
$ runapi generate \
--model suno-speech \
--endpoint text_to_speech \
--wait
10 個版本可用
選擇任意模型,數秒內即可開始生成。
目前沒有可用的模型。
| 提供者 | Suno |
| 模型 ID | suno-speech |
| 模態 | 音訊與音樂 |
| 任務類型 | Asynchronous |
| API 端點 | /api/v1/suno/text_to_speech |
| 計費單位 | 次請求 |
| 輸入參數 | background_music, callback_url, custom_mode, model, prompt, script, tone, variety, vocal_gender |
| 目錄狀態 | 可正常運作 |
免費註冊後,在控制台建立 suno-speech 的 API 金鑰。
向 /api/v1/suno/text_to_speech 發送 POST 請求,並傳入 suno-speech 模型 ID 和參數。
輪詢工作或按照回呼取得已完成的 suno-speech 結果。
可設定 7 個已記錄的參數,包括 background_music, custom_mode, prompt, script, tone。
開放 1 個公開 endpoint:text_to_speech。
非同步任務接受回調 URL,用於接收完成通知。
按 次請求 計量,無需訂閱。
toneTone, rhythm, emotion, and setting, trimmed before validation. Only allowed when custom_mode is true.
promptScene description, trimmed before validation. Required when custom_mode is false; forbidden when true.
scriptText to speak, trimmed before validation. Required when custom_mode is true; forbidden when false.
varietyStyle variety from exact to highly varied. Only allowed when custom_mode is true. (0, 1, 2, 3, 4)
custom_modeRequired mode switch. False creates a script from prompt; true speaks the supplied script. (true, false)
callback_urlWebhook URL for async notifications.
vocal_genderVocal gender. Only allowed when custom_mode is true. (male, female)
background_musicWhether to add background music. Only allowed when custom_mode is true. (true, false)
生成同集數氛圍匹配的免版稅背景音樂,無需付授權費。
為程序生成關卡製作可自適應的環境音景同音效。
無需錄音室,都可以為客戶廣告生成自訂旁白同音效。
傳入 quickstart 顯示嘅 model ID。
每個 key 的 rate limit 會按使用層級而定。請查看定價頁了解最新限制。
可以——variant 只係一個旗標。只要更改 model 參數就可以切換。
在可用 streaming 的情況下,RunAPI 會端到端串流。
可以在公開 GitHub repo 開 issue,或者電郵支援團隊。
不需要。你的 RunAPI API key 足以存取此 variant 及目錄中的所有其他模型,無需底層供應商帳戶。