📦

Image Download

Download a previously processed image from storage

GET 0 credits /v1/image/download/{object_name}
curl "https://image.toolkitapi.io/v1/image/download/a1b2c3d4e5f6a7b8c9d0e1f2a3b4c5d6.png"
import httpx

resp = httpx.get(
    "https://image.toolkitapi.io/v1/image/download/a1b2c3d4e5f6a7b8c9d0e1f2a3b4c5d6.png",
)
print(resp.json())
const resp = await fetch("https://image.toolkitapi.io/v1/image/download/a1b2c3d4e5f6a7b8c9d0e1f2a3b4c5d6.png", {
});
const data = await resp.json();
console.log(data);
# See curl example
Response 200 OK
(binary image data returned with appropriate Content-Type header)

Try It Live

Live Demo

Description

Download a previously processed image from storage

How to Use

1

1. Call any image processing endpoint (resize, crop, compress, etc.) and note the `upload_url` in the response.

2

2. Extract the `object_name` from the URL — it will be a 32-character hex string with an image extension (e.g. `a1b2c3d4e5f6a7b8c9d0e1f2a3b4c5d6.png`).

3

3. Send a GET request to `/v1/image/download/{object_name}` to stream the image.

4

4. The response includes an appropriate `Content-Type` header and `Content-Disposition: inline` so the image renders directly in browsers.

About This Tool

Use the Image Download endpoint to retrieve images that were previously processed by any of the image toolkit endpoints. When MinIO storage is enabled, processing endpoints return a download URL instead of inline base64 — this endpoint streams that file to you.

The object name is the filename portion from the `upload_url` returned by processing endpoints. It follows a UUID-hex format with a standard image extension.

This keeps your internal object storage private while giving clients a clean, authenticated download URL.

Why Use This Tool

Frequently Asked Questions

What image formats are supported?
The endpoint supports PNG, JPEG, WebP, GIF, BMP, TIFF, and SVG files. The correct Content-Type header is set automatically based on the file extension.
How long are processed images stored?
Storage duration depends on your MinIO configuration. By default, processed images are available for download for a limited retention period after creation.
What happens if the object name is invalid?
The endpoint validates that the object name matches the expected UUID-hex format with a known image extension. Invalid names return a 400 error; missing files return a 404 error.

Start using Image Download now

Get your free API key and make your first request in under a minute.