Create upload
create_uploadGets a place to put a file that is on the user's device or in your sandbox when there is no public URL. Returns a file_id to pass as source, an upload_page_url to show the user (they open it and drop the file; it resumes on weak connections), and an upload_put_url you can PUT the raw bytes to. The file_id works once the upload finishes. Unused uploads expire after 1 hour; uploaded files are deleted within 24 hours of the job that uses them.
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": {
"file_name": "<file_name>"
},
"name": "create_upload"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| purpose | No | What the file is for. | job_input |
| file_name | Yes | File name with extension. | |
| size_bytes | No | Size in bytes, if known. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| file_id | Yes | ||
| upload_id | No | ||
| expires_at | Yes | ||
| upload_put_url | No | ||
| upload_page_url | Yes | Page where the user signs in and drops the file (it sends the file to this upload); null when the upload has no page. |