使用 RunComfy 的 API 執行 bytedance/seed-audio-1.0/text-to-audio。 可接受的輸入與輸出請參閱模型的 資料結構說明。
curl --request POST \
--url https://model-api.runcomfy.net/v1/models/bytedance/seed-audio-1.0/text-to-audio \
--header "Content-Type: application/json" \
--header "Authorization: Bearer <token>" \
--data '{
"prompt": "Welcome back to the late-night show. Settle in, pour something warm, and let's ease into the next track together."
}'將 YOUR_API_TOKEN 環境變數設為您的 API 金鑰(在 個人資料中管理金鑰),並在每個請求的 Authorization 標頭中以 Bearer 權杖形式攜帶: Authorization: Bearer $YOUR_API_TOKEN。
提交非同步生成工作後,將立即取得 request_id 以及用於查詢狀態、取得結果與取消的 URL。
curl --request POST \
--url https://model-api.runcomfy.net/v1/models/bytedance/seed-audio-1.0/text-to-audio \
--header "Content-Type: application/json" \
--header "Authorization: Bearer <token>" \
--data '{
"prompt": "Welcome back to the late-night show. Settle in, pour something warm, and let's ease into the next track together."
}'依 request_id 取得目前狀態(「in_queue」、「in_progress」、「completed」或「cancelled」)。
curl --request GET \
--url https://model-api.runcomfy.net/v1/requests/{request_id}/status \
--header "Authorization: Bearer <token>"取得指定 request_id 的最終輸出與中繼資料;若工作尚未完成,回應會回傳目前狀態,方便繼續輪詢。
curl --request GET \
--url https://model-api.runcomfy.net/v1/requests/{request_id}/result \
--header "Authorization: Bearer <token>"透過 request_id 取消排隊中的工作;進行中的工作無法取消。
curl --request POST \
--url https://model-api.runcomfy.net/v1/requests/{request_id}/cancel \
--header "Authorization: Bearer <token>"請提供可公開存取的 HTTPS 位址。確保目標主機允許伺服器端抓取(無需登入或 Cookie)、未被限流或阻擋機器人。建議:圖片 ≤ 50 MB(約 4K),影片 ≤ 100 MB(約 720p 下 2–5 分鐘)。私人資產請使用穩定或預先簽署 URL。
{
"type": "object",
"title": "輸入結構",
"required": [
"prompt"
],
"properties": {
"prompt": {
"title": "提示詞",
"description": "要合成的文字。請依序使用 @Audio1、@Audio2、@Audio3 引用參考音訊片段。",
"type": "string",
"default": "Welcome back to the late-night show. Settle in, pour something warm, and let's ease into the next track together."
},
"voice": {
"title": "聲音",
"description": "用於合成的預設聲音。",
"type": "string",
"enum": [
"vivi_mixed_en_zh_ja_es_id",
"mindy_en_es_id_pt_zh",
"kian_en_zh",
"cedric_en_zh",
"sophie_en_zh",
"jean_en_zh",
"magnus_en_zh",
"mabel_en_zh",
"nadia_en_zh",
"opal_en_zh",
"pearl_en_zh",
"quentin_en_zh",
"corinne_mixed_en_zh",
"esther_mixed_en_zh",
"lyla_mixed_en_zh",
"tracy_es_zh",
"sandy_es_mixed_en_zh",
"felix_zh",
"celeste_zh",
"monkey_king_zh"
],
"default": "vivi_mixed_en_zh_ja_es_id"
},
"audio_urls": {
"title": "參考音訊 URL",
"description": "最多可加入 3 段參考音訊,並在提示詞中以 @Audio1、@Audio2、@Audio3 引用。每段最長 30s、最大 10MB,支援 wav/mp3/pcm/ogg_opus。",
"type": "array",
"items": {
"type": "string",
"format": "audio_uri"
},
"maxItems": 3
},
"image_url": {
"title": "參考圖片 URL",
"description": "一張參考圖片(jpeg/png/webp,最大 10MB)。不能與參考音訊同時使用。",
"type": "string"
},
"output_format": {
"title": "輸出格式",
"description": "輸出音訊的容器格式。",
"type": "string",
"enum": [
"wav",
"mp3",
"pcm",
"ogg_opus"
],
"default": "mp3"
},
"sample_rate": {
"title": "取樣率 (Hz)",
"description": "輸出音訊的取樣率,以 Hz 為單位。",
"type": "integer",
"enum": [
8000,
16000,
24000,
32000,
44100,
48000
],
"default": 24000
},
"speed": {
"title": "語速",
"description": "朗讀速度。1.0 為正常速度,0.5 為半速,2.0 為雙倍速度。",
"type": "number",
"minimum": 0.5,
"maximum": 2,
"default": 1
},
"volume": {
"title": "音量",
"description": "輸出音量。1.0 為正常音量,0.5 為一半,2.0 為兩倍。",
"type": "number",
"minimum": 0.5,
"maximum": 2,
"default": 1
},
"pitch": {
"title": "音高",
"description": "以半音為單位調整聲音音高。0 為正常音高,-12 降低一個八度,12 提高一個八度。",
"type": "integer",
"minimum": -12,
"maximum": 12,
"default": 0
}
}
}{
"output": {
"type": "object",
"properties": {
"image": {
"type": "string",
"format": "uri",
"description": "單張圖片 URL"
},
"video": {
"type": "string",
"format": "uri",
"description": "單一影片 URL"
},
"images": {
"type": "array",
"description": "多張圖片 URL",
"items": {
"type": "string",
"format": "uri"
}
},
"videos": {
"type": "array",
"description": "多個影片 URL",
"items": {
"type": "string",
"format": "uri"
}
}
}
}
}RunComfy 是首選的 ComfyUI 平台,提供 ComfyUI 在線 環境和服務,以及 ComfyUI 工作流程 具有驚豔的視覺效果。 RunComfy還提供 AI Models, 幫助藝術家利用最新的AI工具創作出令人驚艷的藝術作品。