Video Emotion API

Regenerate Video Moments Api

Changed on

Compute a video's Moments again: the Regenerate button, and Retry after a failure.

Answers 202 with the same body as GET /v2/videos/{video_id}/moments when this request queued a computation, and 200 with the current body when nothing was started. regenerate_credits on the GET says what a regeneration costs; it is charged once per out-of-date result, never for a Retry, and never for a video whose Moments was bought. Repeating a request with the same Idempotency-Key within a day returns the first answer's status code and never starts or charges again.

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/regenerate

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 codehttps://api.imentiv.ai/oauth/authorize
      Token URLhttps://api.imentiv.ai/oauth/token
      Scopesmedia.write

Path parameters

video_idstring required

The unique video ID of the video to regenerate moments for

Headers

Idempotency-Keystring required

One per click; resend the same key only to retry the same request.

Response

Nothing was started: the moments are current, a computation is already queued or running, a retry is not allowed yet, or the video has no Moments.

video_idstring required
statusstring required

ready, computing, failed or unavailable.

reasonstring nullable

Why there are no current Moments for a complete video. not_requested (with status: unavailable): Moments has not been requested for this video (see POST /v2/videos/{video_id}/moments/request). purchase_pending: a purchase of Moments for this video is being completed; request is null so it is not offered again, and nothing more is charged. Read again shortly. 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.

recomputingboolean

True while a computation is queued or running for this video: the first one (status: computing), or newer moments for a stale result.

kindsobject

How to present every kind in moments, coverage and profile.safety_kinds.

can_regenerateboolean

This caller may call POST /v2/videos/{video_id}/moments/regenerate now: the result is out of date or failed, nothing is recomputing it, a retry is allowed, and the caller may run analyses on the video. Always false for a reader who sees the video only because it is shared or a sample, and on the request route's answer.

regenerate_creditsnumber

What a regeneration would cost now: what buying Moments for this video costs (per started minute of video, with a minimum), for a result out of date after an edit. 0 when it is free (a video whose Moments was bought, a first computation, a Retry after a failed regeneration, or a result out of date for another reason) or when can_regenerate is false. Ask for confirmation only when it is above 0.

Changes