Start a large file upload
chirpie_create_media_uploadStart a direct upload, for a file too large to send to chirpie_upload_media as base64 data. Returns an upload_id, an upload_url, a method and headers. Send the file's bytes as the request body to upload_url with exactly that method and those headers, for example: curl -X PUT --data-binary @video.mp4 -H "" "<upload_url>". Then call chirpie_upload_media with the upload_id, which checks the file and returns its media id. The target closes after an hour. Direct uploads take up to 20 MB for an image and 512 MB for a video.
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": {
"content_type": "<content_type>",
"size": "<size>"
},
"name": "chirpie_create_media_upload"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| size | Yes | The file's exact size in bytes. The upload may carry no more than this. | |
| filename | No | A name to show in the dashboard. Never used to decide the file type. | |
| content_type | Yes | The file's type: image/jpeg, image/png, image/webp, image/gif, video/mp4 or video/quicktime. | |
| idempotency_key | No | A key of your own making. The same key with the same request hands back the same upload target for 24 hours. |