---
title: Generate Image Thumbnails API
slug: generate-thumbnail
url: https://apyhub.com/apyhub/service/generate-thumbnail
provider: ApyHub
categories: [Media Kit]
tags: [thumbnail, image-resize, image-processing]
auth: api_key
version: 1.0
service_type: sync
endpoints: 4
atoms: 30
mcp: true
alias: image-processor-thumbnail
---

# Generate Image Thumbnails API

Create thumbnails from an uploaded image or image URL. Set the width and height, then get binary output or a signed URL back.

## Endpoints

| Method | URL | Description | Atoms |
| --- | --- | --- | --- |
| POST | `https://api.eu.apyhub.com/apyhub/generate-thumbnail/multi-part/link` | What it does Generates a thumbnail from an uploaded image file and returns a JSON object containing… | 30 |
| POST | `https://api.eu.apyhub.com/apyhub/generate-thumbnail/url/download` | What it does Downloads an image from a URL and generates a thumbnail using the width and height que… | 30 |
| POST | `https://api.eu.apyhub.com/apyhub/generate-thumbnail/url/link` | What it does Generates a thumbnail from a source image URL. The request sends the image URL in the… | 30 |
| POST | `https://api.eu.apyhub.com/apyhub/generate-thumbnail/multi-part/download` | What it does Generates a thumbnail from an uploaded image and returns the resulting file as binary… | 30 |

## Endpoint reference

### Generate thumbnail (multipart, signed URL)

`POST https://api.eu.apyhub.com/apyhub/generate-thumbnail/multi-part/link` · 30 atoms · accepts `multipart/form-data` · returns `application/json`

| Parameter | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `image` | body | string (binary) | no |  |
| `width` | query | integer | yes |  |
| `height` | query | integer | yes |  |
| `output` | query | string | no | Example: `my-invite`. |
| `preserve_format` | query | boolean | no |  |
| `auto_orientation` | query | boolean | no |  |

#### Quickstart

Generate a thumbnail from an image URL with the required dimensions.

```bash
curl -X POST "https://api.eu.apyhub.com/apyhub/generate-thumbnail/multi-part/link?width=800&height=600" \
  -H "apy-token: $APY_TOKEN" \
  -F "image=@/path/to/image.jpg"
```

#### What you'll get back

Returns a JSON object with a `data` string field containing the generated thumbnail URL.

```json
{
  "data": "https://example.com/thumbnail.png"
}
```

### Generate thumbnail (URL fetch, download)

`POST https://api.eu.apyhub.com/apyhub/generate-thumbnail/url/download` · 30 atoms · accepts `application/json` · returns `application/json`

| Parameter | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `url` | body | string (uri) | no | Example: `https://assets.apyhub.com/samples/sample.jpg`. |
| `width` | query | integer | yes |  |
| `height` | query | integer | yes |  |
| `output` | query | string | no | Example: `my-invite`. |
| `preserve_format` | query | boolean | no |  |
| `auto_orientation` | query | boolean | no |  |

#### Quickstart

Download a thumbnail from a URL by sending the image URL in the JSON body and the required `width` and `height` as query parameters.

```bash
curl -X POST "https://api.eu.apyhub.com/apyhub/generate-thumbnail/url/download?width=200&height=200" \
  -H "apy-token: $APY_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"url":"https://assets.apyhub.com/samples/sample.jpg"}'
```

#### What you'll get back

Returns the thumbnail as a binary response body (`string` with `format: binary`), not JSON.

```text
<binary image data>
```

### Generate thumbnail (URL fetch, signed URL)

`POST https://api.eu.apyhub.com/apyhub/generate-thumbnail/url/link` · 30 atoms · accepts `application/json` · returns `application/json`

| Parameter | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `url` | body | string (uri) | no | Example: `https://assets.apyhub.com/samples/sample.jpg`. |
| `width` | query | integer | yes |  |
| `height` | query | integer | yes |  |
| `output` | query | string | no | Example: `my-invite`. |
| `preserve_format` | query | boolean | no |  |
| `auto_orientation` | query | boolean | no |  |

#### Quickstart

Generate a thumbnail from a source image URL by passing the image URL in the JSON body and the thumbnail size as query parameters.

```bash
curl -X POST "https://api.eu.apyhub.com/apyhub/generate-thumbnail/url/link?width=300&height=200" \
  -H "apy-token: $APY_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"url":"https://assets.apyhub.com/samples/sample.jpg"}'
```

#### What you'll get back

Returns a JSON object with a `data` string field containing a URI to the generated thumbnail.

```json
{
  "data": "https://example.com/thumbnail.jpg"
}
```

### Generate thumbnail (multipart, download)

`POST https://api.eu.apyhub.com/apyhub/generate-thumbnail/multi-part/download` · 30 atoms · accepts `multipart/form-data` · returns `application/json`

| Parameter | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `image` | body | string (binary) | no |  |
| `width` | query | integer | yes |  |
| `height` | query | integer | yes |  |
| `output` | query | string | no | Example: `my-invite`. |
| `preserve_format` | query | boolean | no |  |
| `auto_orientation` | query | boolean | no |  |

#### Quickstart

Download a thumbnail image from a source image by providing its URL and the required size.

```bash
curl -X POST "https://api.eu.apyhub.com/apyhub/generate-thumbnail/multi-part/download?width=300&height=200" \
  -H "apy-token: $APY_TOKEN" \
  -F "image=@/path/to/image.jpg"
```

#### What you'll get back

Returns a binary file (`string` with `format: binary`) containing the generated thumbnail image.

## About

## What it does
Thumbnail Generator creates a thumbnail from an uploaded image or a remote image URL. Send `image` in a multipart request or `url` in the JSON body, and set `width` and `height` in the query string to control the output size.

Use `output` when you want a named file, and `preserve_format` if you need to keep the original image format. `auto_orientation` helps correct images with orientation metadata before the thumbnail is generated. The service supports both direct downloads and signed URL responses, so you can fit it into batch jobs or browser-driven workflows.

The response is intentionally simple. Depending on the endpoint, you either get binary thumbnail data or a JSON object with a `data` URI. That makes it easy to plug into upload flows, CMS pipelines, product galleries, or user-generated content moderation screens where you need a smaller preview version fast.

If you are resizing images for listings, previews, or email attachments, Thumbnail Generator gives you a consistent way to turn a source image into a smaller, usable thumbnail without adding image processing logic to your app.

## Usage

Base URL: `https://api.eu.apyhub.com` (default region — see
`GET https://apyhub.com/api/public/regions` for the rest).

Authenticate with an ApyHub API key in the `apy-token` header.
Full docs and a live playground: https://apyhub.com/apyhub/service/generate-thumbnail
