Finish a local file upload (step 2 of 2)
complete_media_uploadAfter the PUT to upload_url: checks that the stored file has exactly the declared size and type (otherwise the upload is dropped and you start again with create_media_upload), measures a video (width and height as displayed, duration_ms), and makes the media ready for create_post.media_ids. width, height and duration_ms are fallbacks, used only when a video can't be measured. Calling it again returns the same media.
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": {
"workspace_id": "<workspace_id>",
"media_id": "<media_id>"
},
"name": "complete_media_upload"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| width | No | Fallback only: used when the video can't be measured. | |
| height | No | Fallback only: used when the video can't be measured. | |
| media_id | Yes | media_id from create_media_upload | |
| duration_ms | No | Fallback only: used when the video can't be measured. | |
| workspace_id | Yes | Workspace id from list_workspaces |