upload_file
Get a file into cnaps.ai so a flow can use it. Handles images, video, audio and text (png, jpg, webp, avif, RAW / mp4, mov, webm, mpeg, avi, flv, wmv, 3gp / wav, mp3, m4a, aac, ogg, flac / txt). TIFF is stored as PNG either way; HEIC (iPhone photos) only through the upload link, which stores it as JPG. Two ways in, chosen by what you pass: (1) The user gave a public HTTP/HTTPS URL → pass file_url and it is registered directly. (2) The files are on the user's machine → pass nothing, and you get back an upload link to show them; then call again with the returned token to wait for the upload and get the URLs. One link takes multiple files — up to 20 files per link, dropped together or a few at a time — so make ONE link for several files, not one per file. A link is used up once the user presses Upload. You CANNOT send bytes from the chat through MCP — even if you can see the image or video, use the link flow. Returns URLs usable in create_flow input_files or run_flow inputs.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| token | No | Upload session token from a previous upload_file call. Provide it to wait for the user's upload and retrieve the file URLs. If it returns status "uploading", the user is still transferring — call again with the same token. | |
| file_url | No | Public URL to download the file from (e.g., 'https://example.com/photo.png'). Omit when the user has no URL — you will get an upload link instead. | |
| filename | No | Optional output filename for the file_url path. Defaults to the URL's filename. |