remagicaDocs home
API referenceGenerations

Extract thumbnail frames

POST
/video-frames/extract

Needs a key withgenerations:submit

Finds a video's candidate thumbnail frames without a model call: shot changes plus an even grid, near-duplicates dropped, ranked by sharpness, exposure and faces; the best (48 by default) are stored as JPEGs. Free, and kept per video content: a video extracted before returns its frames at once. Otherwise it's queued: follow it with GET /video-frames/{analysisId}/events. Videos up to 2 GB.

Requires scope generations:submit.

Authorization

apiKey
headerx-api-key<token>

An API key of your workspace (rmg_…), created in the web app. It acts for that workspace, not for a person, and keeps working when its creator leaves.

Request Body

application/json
  1. body
key*string

Storage key of one of your videos (an upload or a generation's output).

Length1 <= length <= 1024
maxFrames?integer

How many candidate frames to keep (1–96, default 48). Used the first time a video is analyzed; later calls return what was kept then.

Range1 <= value <= 96

Response Body

The analysis, done or queued.

application/json
  1. response

A video's candidate thumbnail frames and AI picks.

brief*|

A thumbnail brief suggested from what the video says (subject, promise, job and recipe ids of the thumbnail engine), when it has speech.

completedAt*string|null
createdAt*string
credits*integer

Credits charged so far (only the AI pick is charged).

durationSeconds*number|null
error*string|null
frames*array<>|

The candidates in time order, once extracted.

id*string
mode*string

What the latest run does: extract (candidates only, free) or pick (the AI's tags and picks too).

Value in"extract""pick"
picks*array<>|

The AI's 1–3 best frames, with roles and reasons.

progress*integer
Range0 <= value <= 100
stage*string
Value in"queued""extracting""picking""completed""failed"
status*string
Value in"queued""processing""completed""failed"
videoKey*string
Example Request
curl -X POST 'https://api.remagica.com/api/v1/video-frames/extract' \  -H 'Content-Type: application/json' \  -d '{  "key": "uploads/org_123/0b6c.../talk.mp4"}'
Example Response
{  "brief": {    "headline": "string",    "job": "string",    "promise": "string",    "recipe": "string",    "subject": "string",    "title": "Autumn campaign"  },  "completedAt": "string",  "createdAt": "string",  "credits": 12,  "durationSeconds": 5,  "error": null,  "frames": [    {      "exposure": 1,      "faces": [        {          "h": 1,          "w": 1,          "x": 1,          "y": 1        }      ],      "height": 1280,      "key": "generations/e661f4c9-5b3d-4f60-8e2a-1d9c6b4f7e05/0.png",      "ms": 1,      "scene": true,      "score": 1,      "sharpness": 1,      "tags": {        "environment": "string",        "moment": "string",        "objects": [          "string"        ],        "people": [          {            "expression": "string",            "eyeContact": true          }        ],        "products": [          "string"        ],        "quality": 1,        "role": "subject"      },      "url": "https://files.remagica.com/generations/e661f4c9-5b3d-4f60-8e2a-1d9c6b4f7e05/0.png",      "width": 1024    }  ],  "id": "a5614527-5b3d-4f60-8e2a-1d9c6b4f7e05",  "mode": "extract",  "picks": [    {      "key": "generations/e661f4c9-5b3d-4f60-8e2a-1d9c6b4f7e05/0.png",      "ms": 1,      "reason": "string",      "role": "subject",      "url": "https://files.remagica.com/generations/e661f4c9-5b3d-4f60-8e2a-1d9c6b4f7e05/0.png"    }  ],  "progress": 1,  "stage": "queued",  "status": "queued",  "videoKey": "generations/e661f4c9-5b3d-4f60-8e2a-1d9c6b4f7e05/0.mp4"}