upload_file
Get a file into cnaps.ai so a flow can use it. Handles images, video, audio and text (png, jpg, webp, RAW / mp4, mov, webm, mpeg, avi, flv, wmv, 3gp / wav, mp3, m4a, aac, ogg, flac / txt). 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 file is 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. 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 (up to 15 minutes) and retrieve the file URLs. | |
| 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. |