JPG to PDF
The JPG to PDF API takes a set of images and stitches them into a single, ordered PDF document in one call. It is built for the moment a scanned receipt, a photographed contract, or a folder of phone snapshots needs to become one file you can email, archive, or push into a review queue. You send the images, you get back a task_id, and the finished PDF arrives by webhook or a signed link.
Run it online
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 problem it actually solves
Almost every business process eventually collides with the same friction: people submit information as loose images. A field technician photographs three sides of a damaged part, a customer uploads pictures of an invoice, an onboarding form collects a passport and two utility bills. Each image on its own is awkward to store, review, and sign off on. This endpoint collapses that mess into one PDF, in the order you specify, so downstream systems and human reviewers see a single coherent document instead of a scattered gallery. It is aimed at teams building document intake, claims processing, HR onboarding, and any workflow where images arrive faster than people can tidy them.
How the call works
You POST your images to /pdf/from-images and the API immediately returns a task_id. Because merging and rendering images is genuinely CPU-bound work, the endpoint is asynchronous by design: rather than holding your connection open while pages are laid out, it queues the job on our global edge and hands you a ticket. When the PDF is ready, we deliver it two ways, your choice. A signed webhook is the recommended path, since it lets your backend react the instant a document is finished, and there is also a signed link that stays valid for 24 hours if you would rather pull the result on your own schedule.
A note on the formats involved
JPG has been the default camera and screenshot format for three decades precisely because it compresses photographs so efficiently, which is exactly why it is everywhere and exactly why it is a poor container for a multi-page document. PDF was designed for the opposite job: fixed, portable pages that render the same on any device and can be signed, stamped, and archived. Converting from one to the other is not a gimmick, it is moving your content from a capture format into a delivery format. This service treats each image as a page, preserves its orientation, and produces a document any PDF reader on earth can open.
Fitting it into automation
This capability is designed to disappear into a pipeline. A typical flow: your app receives image uploads, fires them at the endpoint, stores the returned task_id, and moves on; minutes or seconds later the webhook lands and your system attaches the finished PDF to a case or record. Because every request is billed at a clear, published $0.002 per image and a failed task is never charged, you can budget conversions precisely and let the system run unattended. Retries with backoff happen automatically three times before you ever see an error, so transient hiccups do not become failed documents.
What you can do with it
Expense and receipt capture
An expense app lets employees snap several receipts on their phone, then merges them into one PDF attached to the reimbursement claim so finance reviews a single file instead of hunting through a photo roll.
Insurance claims intake
A claimant photographs damage from multiple angles and uploads the images; your backend combines them into one ordered PDF that adjusters can open, annotate, and file against the policy.
Onboarding and KYC document bundles
Collect a photographed ID, a proof of address, and a signed form as separate JPGs, then produce a single compliance-ready PDF per applicant that slots straight into your records system.
Digitizing paper for the archive
A back-office team photographs stacks of legacy paperwork with a phone and converts each stack into one searchable-ready PDF, replacing a bulky scanner in the document-preservation workflow.
FAQ
How do I convert JPG to PDF with an API?
Send your images in a POST to /pdf/from-images and the jpg to pdf api returns a task_id right away. The merged PDF is delivered when it is ready via a signed webhook or a signed link valid for 24 hours.
Can I combine multiple images into one PDF?
Yes, that is the core purpose of this endpoint. You pass a batch of images and each becomes a page, in the exact order you supply them, inside a single output PDF.
Is the JPG to PDF 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 only accept JPG, or other image formats too?
It is optimized for JPG since that is what cameras, phones, and screenshots produce most, and it handles common raster image inputs the same way, treating each one as a page in the resulting PDF.
Will converting reduce my image quality?
The service places each image onto a page as supplied rather than re-compressing it aggressively, so the visible quality of your JPGs is preserved in the PDF. What you upload is essentially what you get, laid out as pages.
How does the order of pages get decided?
Pages follow the order in which you provide the images in the request, so you control the sequence exactly. Arrange them the way you want them read before you send the call.
Can I convert images to PDF in bulk?
Yes. Each request bundles many images into one PDF, and because the endpoint is asynchronous you can fire off large volumes without blocking, then react to each webhook as its document lands.
What happens if a conversion fails?
The task is retried automatically three times with backoff before surfacing a clear error, and a failed task is never charged. You only pay for documents that are actually produced.
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
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.
Call it from your stack
curl -X POST https://api.kit.forhosting.com/pdf/from-images \
-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/pdf/from-images", {
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/pdf/from-images",
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/pdf/from-images", 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/pdf/from-images", 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": "pdf.from_images",
"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 | 25 |
max_pages | 200 |
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. |
413 | input_too_large | The file exceeds the size limit. |