create-upload-url
Use create-upload-url to upload a file that your AI application has the bytes for, such as a chat attachment, a local file, or generated content. The tool supports images, videos, PDFs, and other documents. For a small image or video file that's already at a public URL, use upload-asset-from-url instead.
Uploading a file takes two steps:
- Call
create-upload-urlto get anuploadUrl. - Send the file's raw bytes as the body of a single HTTP
POSTrequest to theuploadUrl, with the headerContent-Type: application/octet-stream. Don't use a multipart form, base64 encoding, or a JSON wrapper.
Example prompt
"Upload this logo to my Canva account."
The tool takes no parameters.
Example responses
IDs, URLs, and tokens below are placeholders; field names and structure are exactly as returned.
The tool returns the upload URL and HTTP method:
{"uploadUrl": "https://www.canva.com/_blob/upload/ingress/upload/file/agent-tool?_sat=EXAMPLE_TOKEN","httpMethod": "POST","resultNote": "The upload response contains resource IDs for the uploaded file; pass them to other Canva tools to reference the file."}
The response to the POST request contains the ID of the uploaded file. The ID's name depends on the file type: mediaId for images, videoId for videos, and fileId for documents, such as PDFs.
{"mediaId": "MEDIA_EXAMPLE"}
Pass the ID to other tools to reference the file, such as in imageReferences for generate-image.
Each upload URL allows exactly one upload and expires after a short time. If the URL has been used, has expired, or the upload was rejected, call create-upload-url again for a new URL. Never retry a used or expired URL.