Prepare Media
prepare_mediaPrepare the perception artifact an authored edit needs BEFORE sighted review. Pass body.kind="subjectTrack" for face/active-speaker reframing, or body.kind="matte" for a true zPlane:"behind-subject" graphic. Pass body.intent {startSec,endSec} using SOURCE time (the media trim, not timeline time); it is required for mattes and strongly recommended for subject tracks so the prepared fact exactly matches the clip and quote. This is the supported product path — never accept a preview that silently flattens depth or ignores speaker tracking. Returns a fact receipt; with intent, poll get_media_facts using the same kind/window until exact.state is ready; without intent, omit all three filters and find the whole-source subjectTrack in facts until status is ready (failed is terminal). Existing pending/ready facts are reused without another charge.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"mediaItemId": "<mediaItemId>",
"body": "<body>"
},
"name": "prepare_media"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| body | Yes | POST /media/:id/facts body. | |
| commandId | No | Retry identity. A call repeated with the same commandId returns the first result instead of acting twice. | |
| mediaItemId | Yes | mediaItemId (path). |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| factId | No | ||
| status | No | ||
| quotedUsd | No | ||
| alreadyExisted | No | True when this exact fact was already pending or ready. Nothing was dispatched and nothing will be charged. |