Make thumbnails
Send a photo with the width and height you need and get a thumbnail at exactly those dimensions, square or rectangular, so a grid of fifty listings loads without full-size images. You pay per use, with no subscription.
This task is not available right now, so it cannot be purchased. Nothing is charged for it.
How it works & APIA product grid, a video library or a photo gallery lives or dies on thumbnails: hundreds of them, all the same size, loading fast.
Why a grid depends on its thumbnails
A product grid, a video library or a photo gallery depends on its thumbnails: hundreds of them, all the same size, loading fast. Full-resolution images are far too heavy to load in a grid of fifty listings, and resizing them one at a time in an editor stops working after a handful of files. That is why online stores, publishing sites and file managers show small previews instead of the original files. You send the source image with the width and height you want, and you get back a thumbnail at exactly those dimensions.
Square or rectangular, and the usual mistake
Square thumbnails became the default for grids and avatars because they tile neatly whatever the orientation of the original photo. The catch is cropping: a square cuts away parts of the picture that a rectangular preview would keep whole. Rectangular thumbnails keep more of the original framing and suit video covers, article previews, banners and listings, where the full width of the shot matters more than a perfect grid. The usual mistake is choosing one shape for everything; pick it for each place where the previews will appear.
Who needs thumbnails by the thousand
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.
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.
What you can do with it
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.
FAQ
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.
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.
Should my thumbnails be square or rectangular?
Square thumbnails line up neatly in grids and profile pictures whatever the photo's orientation, but they crop part of the picture. Rectangular ones keep more of the framing and suit video covers, article previews and listings.
Why not show the full-size photos in a product grid?
Because full-resolution images are far too heavy for a page that shows many at once, such as a grid of fifty listings. Small thumbnails at one fixed size are what keep those pages fast.
Can I create thumbnails for a whole catalog?
Yes. Each image is its own job, so thousands are handled the same way as one, and each finished thumbnail waits behind a download link that stays valid for 24 hours.
Related tools
For developers — API access
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.
API endpoint
One authenticated POST creates the task; the result comes back by webhook or a signed link. This capability is currently available through the API, not as an interactive Web tool.
Call it from your stack
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"}'const res = await fetch("https://api.kit.forhosting.com/image/thumbnail", {
method: "POST",
headers: {
"Authorization": `Bearer ${process.env.KIT_KEY}`,
"Content-Type": "application/json"
},
body: JSON.stringify({
"image": "https://ejemplo.com/imagen.jpg"
})
});
const { task_id } = await res.json();import os, requests
res = requests.post(
"https://api.kit.forhosting.com/image/thumbnail",
headers={"Authorization": f"Bearer {os.environ['KIT_KEY']}"},
json={
"image": "https://ejemplo.com/imagen.jpg"
},
)
task_id = res.json()["task_id"]<?php
$res = file_get_contents("https://api.kit.forhosting.com/image/thumbnail", false, stream_context_create([
"http" => [
"method" => "POST",
"header" => "Authorization: Bearer " . getenv("KIT_KEY") . "\r\nContent-Type: application/json",
"content" => '{"image":"https://ejemplo.com/imagen.jpg"}',
],
]));
$task = json_decode($res, true);body := bytes.NewBufferString(`{"image":"https://ejemplo.com/imagen.jpg"}`)
req, _ := http.NewRequest("POST", "https://api.kit.forhosting.com/image/thumbnail", body)
req.Header.Set("Authorization", "Bearer "+os.Getenv("KIT_KEY"))
req.Header.Set("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)Example request
{
"image": "https://ejemplo.com/imagen.jpg"
}Example response
{
"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.
Pricing
Published price — no tokens, no invented credits. A failed task is never charged.
Limits
max_mb | 15 |
max_megapixels | 12 |
Errors
| HTTP | Code | Meaning |
|---|---|---|
401 | unauthorized | Missing or invalid API key. |
402 | insufficient_balance | Your balance doesn't cover the task price. |
404 | unknown_type | That task type doesn't exist. |
429 | rate_limited | Too many requests. Use the webhook instead of polling. |
Technical notes
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.
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.
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
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.
Technical questions
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.
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.
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.