跳轉到主要內容
POST
使用 POST /runwayml/v1/sound_effect 從文字 Prompt 建立音訊任務。 使用 Bearer 驗證傳送 CometAPI API 金鑰和 JSON 請求主體。

選擇模型

對於 eleven_text_to_sound_v2,請省略 duration,以從 Prompt 選擇長度。設定 loop: true 以要求重複播放的音效。 對於 seed_audio,請在 Prompt 中依陣列順序將 referenceAudios 參照為 @Audio1、@Audio2, 以及 @Audio3。不需要參照時,請省略 referenceAudios。 將每個範例音訊 URL 替換為可存取的音訊檔案 HTTPS URL。 請勿在此端點上搭配此模型包含 duration、loop 或 voice。

設定音訊控制項

對於三個速率控制項,請省略該欄位或使用 0 以保留其正常值。

擷取結果

儲存傳回的 id,然後使用 取得 Runway 任務 以擷取任務狀態。當 status 為 SUCCEEDED 時,讀取 output中的音訊 URL。如果任務失敗,請檢查 failure 和 failureCode。

授權

Authorization
string
header
必填

Use your CometAPI API key.

主體

application/json

Request settings for eleven_text_to_sound_v2.

model
enum<string>
必填

Model ID for this request.

可用選項:
eleven_text_to_sound_v2
Allowed value: "eleven_text_to_sound_v2"
promptText
string
必填

A text description of the sound effect to generate.

Required string length: 1 - 3000
duration
number

Sound effect duration in seconds, from 0.5 to 30. Fractional seconds are accepted. Omit this field to choose duration from the prompt.

必填範圍: 0.5 <= x <= 30
loop
boolean
預設值:false

Set true to request a sound effect that loops seamlessly. Defaults to false.

回應

Task created. Save the returned id to retrieve task status.

id
string
必填

Task ID for GET /runwayml/v1/tasks/{id}.

status
string

Task state, when returned.

createdAt
string<date-time>

Task submission timestamp, when returned.

output
string<uri>[]

Result URLs, when returned.

failure
string

Failure explanation, when returned.

failureCode
string

Machine-readable failure code, when returned.

estimatedCost
object

Task estimate metadata, when returned.

cost
object

Task cost metadata, when returned.

最後修改於 2026年9月22日