Prepare file transfer
prepare_transferStores one text file behind a temporary download link and shows a transfer card. Use only when the user wants a hosted download link. To stage a file, send file_name and content (ttl_hours is optional, 1 to 168, default 24). To check a link made earlier, send only transfer_id. Returns download_url, file_name, sha256, size_bytes, expires_at and transfer_id; ChatGPT also shows a card with the file details, time left and a download button. With no content and no transfer_id it stages nothing and returns status ready. Do not use to show a draft: draft_email, create_calendar_event and create_markdown_file already return the file text. The file is stored until the link expires.
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": "prepare_transfer"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| file | No | Set by ChatGPT when the user opens the card from a file. Do not fill this in yourself. | |
| content | No | Full text of the file to stage (at most 200,000 characters). Send it together with file_name. Without content, nothing is stored. | |
| file_name | No | File name with its extension, such as "report.md", "invite.ics" or "draft.eml". Send it together with content to stage a file. | |
| mime_type | No | Optional MIME type, such as "text/markdown", "text/calendar" or "message/rfc822". Guessed from file_name when omitted. | |
| ttl_hours | No | Hours until the download link expires, from 1 to 168. Default 24. | |
| transfer_id | No | ID of a transfer made earlier, from its transfer_id field (32 hex characters). Send it alone to check that link. An unknown or expired ID returns transfer_not_found. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| file | No | The file ChatGPT passed when the card was opened from a file. Set only in that case. | |
| notes | No | Short notes to pass on to the user. Set when status is ok. | |
| sha256 | No | SHA-256 checksum of the file as 64 hex characters. Set when status is ok. | |
| status | Yes | ok: a file is staged or found, and the download fields are set. ready: nothing is staged yet; read message for what to send. | |
| message | No | Set when status is ready: says what to send next. | |
| file_name | No | Cleaned file name. Set when status is ok, and when ready if a name was given. | |
| mime_type | No | MIME type of the file. Set when status is ok. | |
| expires_at | No | When the link stops working, as an ISO 8601 UTC time. Set when status is ok. | |
| size_bytes | No | File size in bytes. Set when status is ok. | |
| transfer_id | No | ID to check this link again later. Set when status is ok. | |
| download_url | No | Direct download URL. Set when status is ok. | |
| interactive_ui | Yes | Resource URI of the transfer card. |