Request Video Moments Api
POST/v2/videos/{video_id}/moments/request
Request Moments for a processed video. Credits are charged once per video.
Moments are not computed for a video until they are requested here. The video must be
completed (409 otherwise). A successful request charges the credits once, queues the
computation and returns the same body as GET /v2/videos/{video_id}/moments
(status: computing, then ready as that call is polled).
Requesting is idempotent: when Moments was already requested for the video, this returns
200 with the current moments and charges nothing. Moments stay with the video through
edits, trimming and reprocessing; recomputing them after such changes is free.
With too few credits the call answers 402 and nothing is requested. Credits are
charged once per video, whatever the number of attempts. If a call fails with a server
error after the charge, repeat it: it completes the request and charges nothing more.
A second request for the same video made while the first is still being processed
answers 409; retry it.
Requires the same access as the video's other charged analyses (the owner or a member
allowed to write) and, for a delegated app, the media.write scope.
Request
Responses
- 200
- 401
- 402
- 404
- 409
- 422
- 503
Successful Response
Missing, malformed or rejected credentials — no X-API-Key / Authorization: Bearer <jwt>, an expired token, or a caller that lacks the role the route requires. Note that this API answers authorization failures with 401 as well as 403 (see the 403 entry where a route declares both).
Not enough credits, or a workspace budget refuses the charge. Nothing was charged and Moments was not requested.
No such resource, or it is not visible to this caller. Ownership failures are reported as 404 rather than 403 so the API does not confirm the existence of another account's records.
Either the video has not finished processing, and the body is what GET /v2/videos/{video_id}/moments returns for it (status: unavailable); or a request for the same video is already being processed, and the body is {"detail": ...}: retry it.
Validation Error
The credits or budgets that would pay for the request could not be checked. Nothing was charged; retry.