Video Emotion API

Request Video Moments Api

Changed on

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.

post/v2/videos/{video_id}/moments/request

Request

  • Base URL
    https://api.imentiv.ai (the document declares no server; this is the origin it was published from)
  • Auth
    • API key in header X-API-Key
    • or HTTP bearer
    • or OAuth 2
      Authorization code: https://api.imentiv.ai/oauth/authorize
      Token URL: https://api.imentiv.ai/oauth/token scopes: media.write

Path parameters

video_idstring required

The unique video ID of the video to request moments for

Response

Successful Response

video_idstring required
statusstring required

ready, computing, failed or unavailable.

reasonstring nullable

Why status is unavailable when the video is complete: not_requested means Moments has not been requested for this video (see POST /v2/videos/{video_id}/moments/request). Null otherwise, including while the video is still processing.

staleboolean

True when a recomputation is pending for newer inputs.

generationinteger nullable

Which computation these moments belong to. Null when no moments are returned. Compare it together with profile_version and computed_at; it does not change on every recomputation.

profile_versionstring nullable

Analysis profile version these moments were computed with, the same value as profile.version when a profile is present. Null when no moments are returned.

countsobject

Number of moments per kind.

computed_atstring date-time nullable

When these moments were computed.

Changes