Skip to main content
Version: 2.0.0

Update a clip

This endpoint updates a clip in a project.

HTTP Request

PUT https://app.resemble.ai/api/v2/projects/<project_uuid>/clips/<clip_uuid>
URL ParametersTypeDescription
clip_uuidstringUUID of the clip to update
project_uuidstringUUID of the project to which the clip should belong
JSON BodyTypeDescription
title(optional) stringTitle for this clip
bodystringContent to be synthesized
voice_uuidstringUUID of the voice to use for synthesizing
is_publicbooleanWhether this clip should be accessible publically
is_archivedbooleanWhether this clip should be archived
callback_uristringThe URL to POST the final clip to
precision(optional) one of the following values: PCM_32 or PCM_16The audio bit depth of generated audio
sample_rate(optional) one of the following values: 16000, 22050 or 44100The sample rate (Hz) of the generated audio
output_format(optional) one of the following values: wav or mp3The format of the generated audio
include_timestamps(optional) booleanWhether to include timestamps for the generated content -- see the documentation on timestamps for more information

HTTP Response

Only asynchronous requests are supported for updating a clip. A callback_uri must be provided and the client can expect to receive a POST request to the callback_uri endpoint with the asynchronous response described below.

Asynchronous Response

1. HTTP response returned to the requester:

{
"success": true,
"item": {
"uuid": <string>,
"title": <string>,
"body": <string>,
"voice_uuid": <string>,
"is_public": <boolean>,
"is_archived": <boolean>,
"created_at": <UTC Date>,
"updated_at": <UTC Date>,
}
}

2. Sends a POST request to the callback_uri with the following body:

The callback request will send a POST request to the callback URI provided. It will include a body of JSON:

{
"id": <string>,
"project_id": <string>,
"url": <string: url to audio which expires after 1 hour>,
"audio_timestamps": {
"graph_chars": <string[]>,
"graph_times": <float[[]]>,
"phon_chars": <string[]>,
"phon_times": <float[[]]>
},
"issues": <string[]>
}

Note:

  • audio_timestamps is only sent if the include_timestamps parameter was true in the original request

Examples

Asynchronous Synthesis

NodeJS
1 Coming soon...

tip
webhook.site is a great development tool for testing callbacks.

Try it out

API Key:
Project UUID:
Clip UUID:
JSON Body: