Docs › Validation & dry runs
Validation & dry runs
Requests are checked before anything is created or started, against the real lengths of your videos where they're known. That includes trims past the end, clips that don't fit their video, transitions longer than their clips, redaction boxes outside the frame, and times after a video ends. Unknown fields (typos) are refused, never ignored.
Every problem is reported at once in details, each with its field path:
400
{
"message": "edit.clips[0].end: 80s is past the end of video 3f1c…, which is 60.0s (1:00); use null for \"to the end\" (and 1 more problem)",
"error": "INVALID_REQUEST",
"requestId": "…",
"details": [
{ "field": "edit.clips[0].end", "message": "80s is past the end of video 3f1c…, which is 60.0s (1:00); use null for \"to the end\"" },
{ "field": "redactions[0].w", "message": "must be a fraction of the frame from 0 to 1; got 1.2 (pixels? divide by the frame size)" }
]
}
Dry run
Add ?dryRun=true to POST /videos (an upload or an edit), POST /videos/{id}/complete or POST /videos/{id}/reprocess to check a request without creating or starting anything. It doesn't count toward your daily video limit. A valid request answers 200 with "valid": true; an edit also tells you its resulting length:
POST /videos?dryRun=true
{ "edit": { "clips": [ { "videoId": "3f1c…", "end": 30 },
{ "videoId": "9a8b…", "transition": { "type": "fade", "seconds": 1 } } ] } }
200 OK
{ "valid": true, "dryRun": true, "fileName": "Edit of 2 clips", "durationSeconds": 49.0, "duration": "49.0s (0:49)", "clips": [ … ] }
Use dry runs to validate user input in your app (for example, an edit timeline a user built) before submitting it.