灵活的参数配置
可配置文档中列出的 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 中显示的模型 ID。
Key 级限流随使用层级伸缩。当前限制见定价页。
可以——变体只是参数,改 model 字段即可。
模型支持流式时,RunAPI 端到端流式。
在公共 GitHub 仓库提 issue 或邮件联系 support。
不需要。你的 RunAPI API key 足以访问此 variant 以及目录中的所有其他模型,无需底层提供方账户。