Upload a local file
create_uploadGet a one-time URL for uploading a local file. Then PUT the raw bytes to uploadUrl with the Content-Type header set to the returned contentType (for example: curl -X PUT "$uploadUrl" -H "Content-Type: $contentType" --data-binary @photo.png), and pass the returned fileUrl as imageUrl or videoUrl. Free.
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": {
"extension": "<extension>",
"size": "<size>"
},
"name": "create_upload"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| size | Yes | The file's exact size in bytes. The upload is refused if it sends any other number of bytes. | |
| extension | Yes | The file's extension, for example png, jpg, webp or mp4. |