Convert Runway speech
Convert recorded dialogue into a selected voice with the Runway API.
curl https://api.cometapi.com/runwayml/v1/speech_to_speech \
--request POST \
--header "Authorization: Bearer $COMETAPI_KEY" \
--header "Content-Type: application/json" \
--data '{
"model": "eleven_multilingual_sts_v2",
"media": {
"type": "audio",
"uri": "https://your-audio-host/source-speech.mp3"
},
"voice": {
"type": "runway-preset",
"presetId": "Maya"
}
}'{
"id": "123e4567-e89b-42d3-a456-426614174000"
}{
"code": "<string>",
"message": "<string>",
"data": "<unknown>"
}{
"error": {
"message": "<string>",
"type": "<string>",
"code": "<string>"
}
}POST /runwayml/v1/speech_to_speech to convert recorded dialogue into a
preset voice. Use the model ID eleven_multilingual_sts_v2.
Send your CometAPI API key with Bearer authentication and a JSON request body.
Provide dialogue and a voice
| Field | Required value |
|---|---|
model | eleven_multilingual_sts_v2 |
media.type | audio for an audio file or video for a video containing dialogue |
media.uri | Accessible HTTPS URL of the source file |
voice.type | runway-preset |
voice.presetId | A preset voice from the request schema, such as Maya |
media.type to video and supply its video URL in media.uri.
Set removeBackgroundNoise: true to remove background noise from the generated
speech. Omit this field to use the model default.
Retrieve the result
Save the returnedid, then use Get a Runway task
to retrieve task status. When status is SUCCEEDED, download the resulting
media from the URLs in output. If the task fails, inspect failure and
failureCode.Authorizations
Use your CometAPI API key.
Body
Request settings for eleven_multilingual_sts_v2.
Model ID for this request.
eleven_multilingual_sts_v2 "eleven_multilingual_sts_v2"Audio or video file containing the dialogue to convert.
- SpeechToSpeechAudio
- SpeechToSpeechVideo
Show child attributes
Show child attributes
The voice to use for the generated speech.
Show child attributes
Show child attributes
Set true to remove background noise from the generated speech. Omit or use false for the model default.
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/speech_to_speech \
--request POST \
--header "Authorization: Bearer $COMETAPI_KEY" \
--header "Content-Type: application/json" \
--data '{
"model": "eleven_multilingual_sts_v2",
"media": {
"type": "audio",
"uri": "https://your-audio-host/source-speech.mp3"
},
"voice": {
"type": "runway-preset",
"presetId": "Maya"
}
}'{
"id": "123e4567-e89b-42d3-a456-426614174000"
}{
"code": "<string>",
"message": "<string>",
"data": "<unknown>"
}{
"error": {
"message": "<string>",
"type": "<string>",
"code": "<string>"
}
}