Edit videos into a new video
POST
http://localhost:4000/api/v1 /media/edit clips is the list of pieces in playing order (the same video may appear several times, trimmed differently): trimming, splitting, reordering and merging are all that list. Optional: mute or audioMediaId (a library audio file replacing the sound), ratio (centred crop), rotate, flip, speed (0.25 to 4), timed texts and coverMs. Answers the job: poll GET /media/jobs/{id}; the new file is its resultMediaId. The original files stay as they are.
Request body
application/json
clipsobject[]
required
Show child parameters
mediaIdstring
required
startMsinteger
required
endMsinteger
required
muteboolean
audioMediaIdstring
ratiostring
rotateflipstring
speednumber
textsobject[]
Show child parameters
textstring
required
startMsinteger
required
endMsinteger
required
fxnumber
required
fynumber
required
sizePctnumber
required
colorstring
required
coverMsinteger
{
"clips": [
{
"mediaId": "string",
"startMs": 0,
"endMs": 0
}
],
"mute": true,
"audioMediaId": "string",
"ratio": "1:1",
"rotate": {},
"flip": "h",
"speed": 0,
"texts": [
{
"text": "string",
"startMs": 0,
"endMs": 0,
"fx": 0,
"fy": 0,
"sizePct": 0,
"color": "string"
}
],
"coverMs": 0
}Code samples
cURL
curl -X POST "http://localhost:4000/api/v1/media/edit" \
-H "Authorization: Bearer $API_KEY" \
-H "Content-Type: application/json" \
-d '{"clips":[{"mediaId":"string","startMs":0,"endMs":0}],"mute":true,"audioMediaId":"string","ratio":"1:1","rotate":{},"flip":"h","speed":0,"texts":[{"text":"string","startMs":0,"endMs":0,"fx":0,"fy":0,"sizePct":0,"color":"string"}],"coverMs":0}'TypeScript
Python
Go
PHP
Ruby
Java
Responses
200 OK
Example
{}Option 1
{}Option 2
{}Updated