Finalize Upload
finalize_uploadFinalize a direct upload once you have PUT the bytes to the uploadUrl from create_upload. Confirms the bytes landed and starts ingest: image/asset become ready immediately (status "complete"); audio/video enter processing (status "processing"). Returns { id, status, processingPhase }. 400 if no bytes were uploaded (PUT first) or the item is not yours. Then call wait_job(kind="media", id=mediaItemId), or use a media.completed webhook.
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": "finalize_upload"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| body | Yes | POST /media/:id/finalize body — optional declared audioRole. | |
| 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 |
|---|---|---|---|
| id | No | ||
| status | No | ||
| processingPhase | No |