Get an upload URL for a large file
assets_upload_urlFor an agent with a shell, on any server (this one reads no disk): opens a resumable upload for one video or audio file of up to 2GB and answers a session URL plus the exact curl that sends the file straight to storage. Run the curl, then call assets_upload_complete with the mediaKey; the key works in posts_create and edit_footage once complete answers. The URL writes only that one key, at exactly byteLength bytes, and expires within 7 days. Images and PDFs: fetch_asset from a public URL, or assets_upload on the local (stdio) server. Needs the write scope.
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": {
"filename": "<filename>",
"contentType": "<contentType>",
"byteLength": "<byteLength>"
},
"name": "assets_upload_url"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| filename | Yes | The file's name, e.g. demo.mp4: letters, digits, dot, dash, underscore. | |
| localPath | No | Optional: the file's path on your machine, written into the curl so it runs as is. | |
| byteLength | Yes | The file's exact size in bytes (wc -c < file). Storage refuses any other size. | |
| contentType | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| curl | Yes | ||
| next | No | ||
| mediaKey | Yes | ||
| expiresAt | No | ||
| sessionUrl | Yes | ||
| statusCurl | No |