download_image
Download an image from a URL and return it as base64 or save it to a file.
Instructions
Download an image from a URL and return it as base64 or save to a file. Use this after generating an image to get the actual image data. Note: Z.AI image URLs expire after 30 days.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| url | Yes | The URL of the image to download (e.g., from generate_image or get_async_result) | |
| output | No | Output format: "base64" returns the image data directly, "file_output" saves to disk | base64 |
| file_output | No | Absolute path to save the image file (required if output is "file_output"). Example: /path/to/image.png |