ForHosting KIT · Documents & PDF

Make a PDF thumbnail

A file picker full of identical grey PDF icons forces every user to open and close documents just to find the right one. This PDF thumbnail API renders the first page of any PDF into a preview image, so a document library, a chat attachment or an upload grid can show what's actually inside before anyone clicks.

● StablePer request + per document$0.040
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.

Why a generic icon isn't enough

A folder of contracts, invoices or scanned forms all look identical from the outside — same file extension, same grey icon, same guesswork about which one is which. That forces users into a slow loop of opening a document, glancing at it, closing it, and trying the next one, which is exactly the kind of friction a small preview image eliminates. A first-page thumbnail turns a wall of filenames into something a person can scan visually in seconds, the same way a photo gallery beats a folder of numbered files.

What the endpoint returns

Send a document to POST /pdf/thumbnail and it returns a task_id immediately, since rendering happens asynchronously in the background. The first page is rasterized into a standard image, sized for typical preview contexts such as file lists, grids and attachment cards, capturing the page exactly as it would print or display, including any images, colors and text layout on that page. Pages beyond the first are not rendered, since a thumbnail is meant to answer one question fast: what is this document?

Why the first page carries the weight

Document conventions have long treated page one as the summary of everything that follows — a cover sheet, a title block, a letterhead, an invoice header with the amount and date visible at a glance. That convention is precisely why a single-page render is useful rather than limiting: for the overwhelming majority of business documents, the first page alone tells a viewer more than a filename ever could, without the cost of rendering every page of every file in a library.

Where it earns its place in a workflow

It fits naturally into any document management screen, a customer portal where users upload their own files, a CRM that attaches PDFs to records, or a chat and messaging product that needs a visual attachment preview instead of a plain filename link. Generating the thumbnail asynchronously at upload time, rather than on every page load, keeps interfaces fast since the preview is ready and cached well before anyone needs to see it.

Delivery and pricing

The thumbnail image is delivered through a signed webhook, recommended for automated pipelines, or a signed link valid for 24 hours; the source document and generated image are deleted after the retention window and are never used to train anything. Pricing is $0.040 per request plus $0.001 per document, a predictable structure whether you're generating one preview or running it across a large existing library. This endpoint is live now and ready for production traffic.

Show real previews in a document library grid

Replace a wall of identical PDF icons in a file manager or knowledge base with actual first-page thumbnails, so users recognize the document they need without opening it.

Preview attachments in chat or support tickets

Render a visual thumbnail for PDFs attached to a support ticket or chat message, so agents see what was sent without downloading every file.

Populate a CRM record with a document snapshot

Attach a small preview image next to each contract or invoice stored on a customer record, giving sales and support a visual anchor at a glance.

Speed up review queues in a document portal

Generate thumbnails for every PDF uploaded to an intake or review portal, letting staff triage a queue visually instead of clicking into each file one by one.

How do I generate a PDF thumbnail with an API?

Send the file to POST /pdf/thumbnail, which returns a task_id right away. The rendered first-page image is delivered by webhook or signed link once the task finishes.

Is the PDF thumbnail API free?

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.

Does it generate thumbnails for every page or just one?

Only the first page is rendered, since it's the page that most reliably represents the whole document and is what a preview needs to answer the question of what the file contains.

What image format does the thumbnail come in?

The first page is rasterized into a standard preview image sized for typical file-list, grid and attachment-card contexts.

Can I generate thumbnails for a large batch of PDFs?

Yes. Each request is an independent asynchronous task, so you can submit a large existing library in parallel and collect each thumbnail by webhook as it completes.

Will the thumbnail look different from the actual printed page?

No. The render captures the first page as it would print or display, including images, colors and text layout, just scaled down to preview size.

How is pricing calculated for thumbnails?

Each request costs a flat $0.040 plus $0.001 per document processed, so cost scales predictably whether you're rendering a single file or an entire archive.

Is the thumbnail endpoint live right now?

Yes, it is live and accepting production traffic today.

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/pdf/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/pdf/thumbnail \
  -H "Authorization: Bearer $KIT_KEY" \
  -H "Content-Type: application/json" \
  -d '{"pdf":"https://ejemplo.com/documento.pdf"}'
{
  "pdf": "https://ejemplo.com/documento.pdf"
}
{
  "task_id": "tsk_a1b2c3d4e5f6a1b2c3d4e5f6",
  "type": "pdf.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.040
Per document$0.001

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

max_mb25
max_pages200
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.
422task_failedThe task failed after 3 retries. You are never charged for it.

Read the full KIT documentation →