Create upload address
create_uploadA signed address to upload one file into the account: an image (PNG, JPEG or WebP, up to 10 MB), a video (MP4 or MOV, up to 200 MB: video_upscale takes 3 minutes, every other tool 50 MB) or a sound (MP3 or WAV, up to 15 MB). Use it from a shell. For a file up to 4 MB, one PUT whose answer is JSON with url, valid 15 minutes. For a larger one pass size (bytes, e.g. from wc -c < file) and content_type: you get upload_url with the exact headers to PUT the file straight into the store, then POST complete_url, whose answer is JSON with url (curl does both). Always take that url (a video's url carries its size and length, e.g. …-1280x720_12s.mp4). Pass an image as params.image or in params.references, a video as params.video (recast, video_upscale, the video tools), a sound as params.audio of lip_sync. For an image on the web use import_image instead.
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "create_upload"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| size | No | The file's size in bytes; needed for a file over 4 MB. | |
| content_type | No | The file's type; needed with size over 4 MB. |