Generate Runway sound effects
Generate sound effects or audio scenes from a text prompt with the Runway API.
curl https://api.cometapi.com/runwayml/v1/sound_effect \
--request POST \
--header "Authorization: Bearer $COMETAPI_KEY" \
--header "Content-Type: application/json" \
--data '{
"model": "eleven_text_to_sound_v2",
"promptText": "Gentle rain falling on a wooden roof with distant thunder.",
"duration": 5.5,
"loop": true
}'{
"id": "123e4567-e89b-42d3-a456-426614174000"
}{
"code": "<string>",
"message": "<string>",
"data": "<unknown>"
}{
"error": {
"message": "<string>",
"type": "<string>",
"code": "<string>"
}
}POST /runwayml/v1/sound_effect to create an audio task from a text prompt.
Send your CometAPI API key with Bearer authentication and a JSON request body.
Choose a model
| Model ID | Required inputs | Optional controls |
|---|---|---|
eleven_text_to_sound_v2 | promptText with 1–3000 characters | duration from 0.5 to 30 seconds, including fractional seconds; loop |
seed_audio | promptText with 1–2048 characters | Up to three referenceAudios; speech, loudness, and pitch controls; output format |
eleven_text_to_sound_v2, omit duration to choose the length from the
prompt. Set loop: true to request a repeating sound effect.
For seed_audio, refer to referenceAudios in the prompt as @Audio1, @Audio2,
and @Audio3, in array order. Omit referenceAudios when you do not need a reference.
Replace each example audio URL with an accessible HTTPS URL of your audio file.
Do not include duration, loop, or voice with this model on this endpoint.
Configure audio controls
| Field | Values | Meaning |
|---|---|---|
speechRate | Integer from -50 to 100 | Negative slows speech; positive speeds it up. |
loudnessRate | Integer from -50 to 100 | Negative reduces volume; positive increases it. |
pitchRate | Integer from -12 to 12 | Pitch shift in semitones. |
sampleRate | 8000, 16000, 24000, 32000, 44100, 48000 | Audio sample rate in Hz. |
outputFormat | wav, mp3, ogg_opus | Output audio format. |
0 to keep its normal value.
Retrieve the result
Save the returnedid, then use Get a Runway task
to retrieve task status. When status is SUCCEEDED, read the audio URLs in
output. If the task fails, inspect failure and failureCode.Authorizations
Use your CometAPI API key.
Body
- eleven_text_to_sound_v2
- seed_audio
Request settings for eleven_text_to_sound_v2.
Model ID for this request.
eleven_text_to_sound_v2 "eleven_text_to_sound_v2"A text description of the sound effect to generate.
1 - 3000Sound 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 <= 30Set true to request a sound effect that loops seamlessly. Defaults to false.
Response
Task created. Save the returned id to retrieve task status.
Task ID for GET /runwayml/v1/tasks/{id}.
Task state, when returned.
Task submission timestamp, when returned.
Result URLs, when returned.
Failure explanation, when returned.
Machine-readable failure code, when returned.
Task estimate metadata, when returned.
Show child attributes
Show child attributes
Task cost metadata, when returned.
Show child attributes
Show child attributes
curl https://api.cometapi.com/runwayml/v1/sound_effect \
--request POST \
--header "Authorization: Bearer $COMETAPI_KEY" \
--header "Content-Type: application/json" \
--data '{
"model": "eleven_text_to_sound_v2",
"promptText": "Gentle rain falling on a wooden roof with distant thunder.",
"duration": 5.5,
"loop": true
}'{
"id": "123e4567-e89b-42d3-a456-426614174000"
}{
"code": "<string>",
"message": "<string>",
"data": "<unknown>"
}{
"error": {
"message": "<string>",
"type": "<string>",
"code": "<string>"
}
}