upload_file
Upload a base64-encoded image to get a temporary URL for use with image processing tools. Accepts JPEG, PNG, WEBP, or GIF up to 10 MB.
Instructions
Upload a base64-encoded image to ToolSnap temporary storage and receive a short-lived URL to pass to tools like remove_background. The file is automatically deleted once consumed by a tool. Returns JSON with url (temporary), key, content_type, file_size_bytes. Returns an error if the base64 data is malformed or the content_type is not supported. Do NOT use this URL as a permanent link. Accepts JPEG, PNG, WEBP, or GIF up to 10 MB. Free — no payment required.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| data | Yes | Base64-encoded image data (no data: URI prefix — just the raw base64 string). | |
| content_type | Yes | MIME type of the image: "image/jpeg", "image/png", "image/webp", or "image/gif". |