Finalize Media Upload
finalize_media_uploadStep 2 after create_media_upload_url and the PUT: checks the file arrived, is within the declared size and really is a supported video/image (by its bytes), stores it in the user's account and returns its mediaId and permanent public URL. Safe to call again — a finished upload returns the same result. A file that fails the checks is discarded. Output: { mediaId, status: 'ready', url, kind, contentType, sizeBytes, filename }.
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": {
"mediaId": "<mediaId>"
},
"name": "finalize_media_upload"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| mediaId | Yes | The mediaId returned by create_media_upload_url |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| url | Yes | Permanent public URL of the stored file | |
| kind | Yes | ||
| status | Yes | ||
| mediaId | Yes | Opaque id (med_…) — pass it to create_post_from_video | |
| filename | Yes | ||
| sizeBytes | Yes | Stored size in bytes | |
| contentType | Yes | Content type detected from the stored bytes |