Upload an image file
upload_image_fileUpload an image you hold as a file, with no action from the user: only for an agent that can run shell commands and has the file on its own filesystem (a coding agent such as Replit, Cursor or Claude Code working in a project). Pass the file's name as it is on disk; you get back a creativeId reserved for it and a curl command. Run the command: it posts the file to Rawa and answers {"creativeId": ...} once the image is in the brand's library. Use the creativeId the command prints, not the reserved one: when the library already holds the same image, it prints that creative's id with "alreadyInLibrary": true and adds no copy. Then pass that creativeId to resize_creative, edit_creative, remove_background, sharpen_creative or any other tool, in the same turn. Never use this for an image the user pasted or attached in a chat: you cannot read such an attachment and there is no file to post; call request_image_upload instead. For an image already at a public https URL, pass imageUrl to the tool directly and skip the upload. The file must be a JPEG, PNG, WebP, AVIF, HEIC or GIF of at most 25 MB. The command works for one hour and for one upload; if curl fails, call this tool again for a fresh command rather than retrying the same one. Free: nothing is charged for the upload.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| brandId | No | A brand id from get_workspace or list_brands, or the brand's name. Omit it when the organization has a single brand. | |
| purpose | No | What the image is for, kept with the upload, e.g. 'Resize for Snapchat'. | |
| fileSize | No | The file's size in bytes, when you know it. | |
| filename | Yes | The file's path or name as curl will read it from disk, e.g. 'assets/hero.png'. | |
| mimeType | No | The file's type, e.g. image/png. Read from the extension when omitted. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| curl | Yes | ||
| next | Yes | ||
| maxBytes | Yes | ||
| mimeType | Yes | ||
| uploadId | Yes | ||
| expiresAt | Yes | ||
| uploadUrl | Yes | ||
| creativeId | Yes | ||
| uploadToken | Yes |