Lets GenDocs
Generation API

Extract a video

Analyze an owned video into structured scenes and frame suggestions.

Read as Markdown ↗

POST /api/generate/extract/video

Requires generate scope and Idempotency-Key. Use an owned ready video asset uploaded through Upload assets. The video must be under 25 MiB and shorter than 120 seconds; authoritative metadata, ownership, and private delivery are checked.

FieldTypeMeaning
modelstring, requiredFixed qwen/qwen3.7-flash.
videoAssetIdstring, requiredOwned ready video ID, 1–128 characters.
promptstringOptional analysis instructions, up to 2,000 characters; default empty.
maxGemsintegerOptional ceiling, 0–1,000,000.

Unknown fields are rejected. The JSON request is bounded to 16,000 bytes.

{
  "model": "qwen/qwen3.7-flash",
  "videoAssetId": "OWNED_VIDEO_ASSET_ID",
  "prompt": "Describe the scene changes and suggest representative frames.",
  "maxGems": 100
}

Response

HTTP 200 returns {id, extraction}. Extraction includes analysis, durationSeconds, frames, and optional segments. Frame times are unique and in range; segments do not overlap. The response provides frame suggestions, not captured image assets. Capture frames locally from your video if needed.

The API reserves a conservative analysis allowance based on 262,144 video input tokens plus 8,192 output tokens and the reviewed rate card. Actual measured usage settles once and cannot exceed that reservation. Account LLM quota and moderation apply.

An exact same-identity replay returns a saved result. Pending/uncertain work returns REQUEST_UNCERTAIN without another dispatch. A billed malformed result returns 409 ANALYSIS_FAILED and retains that result for replay; do not mistake it for an unbilled failure. Missing usage can retain a conservative reservation for investigation. Extraction is synchronous JSON, not a media task.

On this page