ForHosting KIT · Images

Make thumbnails

A product grid, a video library or a photo gallery lives or dies on thumbnails: hundreds of them, all the same size, loading fast. This endpoint takes a source image and returns a resized thumbnail at the exact dimensions you specify, ready to be generated by the thousand without a single manual resize.

● StablePer request + per image$0.002
Use it from WebAPIEmailApp soonTelegram soon

Run this on our servers with your account. Free tools run in your browser; this one bills your KIT balance per the price above.

The everyday problem behind thumbnails

Full-resolution images are too heavy to load in a grid of fifty listings, and resizing them one at a time in an editor doesn't scale past a handful of files. A thumbnail generator turns that manual, repetitive step into a single REST call: send the source, get back an image sized for the grid, the sidebar or the search result it needs to fit.

Who runs thumbnails through an API

E-commerce platforms rendering product grids that need to load instantly; content sites generating preview images for hundreds of articles; DAM systems and file managers that show a folder full of images as small previews rather than full files. Anywhere a page shows many images at once, thumbnails are what keeps it fast.

What happens to your image

You post the source file with the target width and height, we return a task_id immediately, and the job resizes it to those exact dimensions, whether that's a square icon or a rectangular preview matching a different aspect ratio than the original. Once it's done you're notified by signed webhook, or you fetch the thumbnail from a signed link valid for 24 hours.

Fitting it into a media pipeline

Because it's async and only billed on success, thumbnail generation drops into any upload pipeline without slowing it down: a user uploads a photo, the original gets stored, and a thumbnail request fires in the background so the grid never waits on a resize. Batches of thousands work the same way — one request per image, results collected as webhooks arrive.

Square versus rectangular, and why both matter

Square thumbnails became the default for grids and avatars because they tile predictably regardless of the source photo's orientation, but they crop content that a rectangular preview would keep whole. A rectangular thumbnail preserves more of the original framing and suits video previews, banners and listings where the full width of the shot matters more than a tidy grid. Supporting both means the same endpoint fits a product catalog and a video library equally well, without maintaining two separate resizing tools for two separate teams.

Product grid rendering

An online store generates a square thumbnail for every SKU photo so category pages load fast without shipping full-resolution images.

Article preview images

A publishing platform creates a rectangular thumbnail for each article's hero image to show in the homepage feed and search results.

File manager previews

A cloud storage app shows small thumbnails for every image in a folder instead of loading the original files to render the view.

Video library covers

A media platform generates a consistent rectangular thumbnail size for every video cover uploaded by creators.

Is the Thumbnail Generator API available now?

Yes, it's live at POST /image/thumbnail with the pricing below already in effect.

How is it priced?

$0.002 per request plus $0.005 per image, published and unchanged regardless of how many thumbnails you generate.

Can I get square and rectangular thumbnails from the same endpoint?

Yes, you specify the target width and height in the request; square, rectangular or any custom ratio is the same call.

What formats does it support?

Common raster formats such as JPEG, PNG and WebP, with the thumbnail returned in the same format as the source unless you request otherwise.

Is it a free API?

There's no free tier — free tiers get abused and slow everyone down. Access runs on a prepaid ForHosting KIT balance: top up from $10.00 (it never expires) and each request is charged at its published price, so a call with no balance returns HTTP 402. No subscription, no tokens, no invented credits, and a failed task is never charged.

How do I receive the thumbnail?

By signed webhook once it's generated, or via a signed link valid for 24 hours.

Am I charged for failed thumbnails?

No. Failed tasks retry automatically up to three times and are never billed; you get a clear error instead.

Can I generate thumbnails for a whole library at once?

Yes — each request handles one image and returns its own task_id, so a library of thousands is simply parallel requests collected by webhook.

Everything on this page is available programmatically. This section is for teams who want to wire it into their own systems; everyone else can just use the tool above.

POSThttps://api.kit.forhosting.com/image/thumbnail

Prefer to automate it? One authenticated POST creates the task; the result comes back by webhook or a signed link. The same capability also runs here on the web, and soon from our app, email and Telegram.

curl -X POST https://api.kit.forhosting.com/image/thumbnail \
  -H "Authorization: Bearer $KIT_KEY" \
  -H "Content-Type: application/json" \
  -d '{"image":"https://ejemplo.com/imagen.jpg"}'
{
  "image": "https://ejemplo.com/imagen.jpg"
}
{
  "task_id": "tsk_a1b2c3d4e5f6a1b2c3d4e5f6",
  "type": "image.thumbnail",
  "status": "queued",
  "_links": {
    "result": "/tasks/tsk_…/result"
  }
}

The API is asynchronous: the call returns a task_id immediately and the result arrives by webhook. Polling is capped at 1 req/s per task.

Per request$0.002
Per image$0.005

Published price — no tokens, no invented credits. A failed task is never charged.

max_mb15
max_megapixels12
HTTPCodeMeaning
401unauthorizedMissing or invalid API key.
402insufficient_balanceYour balance doesn't cover the task price.
404unknown_typeThat task type doesn't exist.
429rate_limitedToo many requests. Use the webhook instead of polling.

Read the full KIT documentation →