ForHosting KIT · Documents & PDF

Merge PDF files

The Merge PDF API takes a list of PDF files and stitches them into a single document, page for page, in the precise order you specify. Bookmarks, page sizes, and orientation are preserved as they were, so a contract, its annexes, and a signature sheet arrive as one clean file instead of a folder someone has to assemble by hand.

● StablePer request + per page$0.008
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.

One document out of many

Assembling PDFs by hand eats an afternoon and still produces mistakes: a page out of sequence, an annex left out, the wrong cover letter. The merge pdf api removes that step entirely. You send an ordered list of source files, and you get back one document whose pages follow exactly the sequence you declared. Built for teams that generate paperwork programmatically — legal, finance, logistics, HR — where the deliverable is almost always several PDFs that need to become one.

How the merge works

You call POST /pdf/merge with your ordered inputs and receive a task_id immediately. The job runs asynchronously on our global edge, so your request never blocks while a large concatenation completes. When the document is ready we notify you: a signed webhook to your endpoint (recommended) or a signed link valid for twenty-four hours. The merger keeps each source page intact — no re-rasterizing, no silent downscaling — concatenating the underlying page objects, which is why text stays selectable and vector graphics stay crisp.

Why PDF makes this harder than it looks

PDF was designed in the early 1990s to freeze a page's appearance across every machine — but that fixed-layout promise means a PDF is not a simple stream you can glue end to end. Each file carries its own cross-reference table, object numbering, and often its own fonts and metadata. A correct merge has to renumber every object, rebuild the reference table, and reconcile shared resources so the result opens cleanly in any reader. Doing that reliably across arbitrary, real-world files is exactly what this endpoint handles for you.

Built for pipelines, not clicks

Because it is asynchronous and returns a task_id, the merge slots naturally into a queue, a cron job, or an event-driven workflow. A document is generated, invoices are exported, a batch closes — and the merge fires as one step among many without a human opening a desktop tool. Delivery by signed webhook lets the next stage react the moment the file exists, so a combined statement flows straight to storage, e-signature, or email.

Honest pricing and safe handling

Billing is by page at $0.008 per request — a published base rate plus a per-page rate, with no tokens and no invented credits. A task that fails is never charged; we retry three times with backoff and, if it still cannot complete, return a clear error instead of a bill. Access requires prepaid balance, which is what keeps the service fast and free of abuse; requests without it return 402. Your files live only for the retention window, are then deleted, and are never used to train anything.

Contracts with annexes

A legal ops team generates a base agreement, several exhibits, and a signature page as separate PDFs, then merges them into one court-ready file in the correct order before sending it for e-signature.

Monthly statement packs

A billing platform produces a cover summary and one invoice per line item, then merges them per customer so each client receives a single, paginated statement instead of a dozen attachments.

Onboarding document bundles

An HR system collects an offer letter, policy handbook, and tax forms generated at different steps and combines them into one welcome packet the new hire downloads from a single link.

Shipping and customs paperwork

A logistics service concatenates a commercial invoice, packing list, and certificate of origin into one document per shipment so customs brokers receive everything in the expected sequence.

How do I merge PDFs with an API?

Send an ordered list of PDF files to POST /pdf/merge and you receive a task_id. The merge pdf api processes the job asynchronously and delivers the combined file by signed webhook or a signed link valid for 24 hours.

Is the merge 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.

Are the pages combined in the order I choose?

Yes. The output follows the exact sequence of the list you send, file by file and page by page, so you control precisely where each document lands in the final PDF.

Does merging reduce the quality of my PDFs?

No. Pages are concatenated at the object level rather than re-rendered, so text stays selectable and vector graphics stay sharp. Each source page arrives in the merged file as it was.

Can I merge many PDFs at once in bulk?

Yes. Each call combines a whole ordered list into one document, and because the endpoint is asynchronous you can fire many merge jobs in parallel from a queue or batch process without blocking.

What happens if a merge fails?

A failed task is never charged. We retry three times with backoff, and if it still cannot complete you get a clear error explaining why instead of a silent failure or a charge.

How is a merge different from combining PDFs in a desktop app?

A desktop tool needs a person clicking through files. This API merges programmatically inside your pipeline, so combining PDFs becomes one automated step triggered by your own systems.

How long can I access the merged file?

The signed link stays valid for 24 hours, or you can receive the result immediately by signed webhook. After the retention window your files are deleted and never used for training.

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/merge

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/merge \
  -H "Authorization: Bearer $KIT_KEY" \
  -H "Content-Type: application/json" \
  -d '{"pdfs":["https://ejemplo.com/a.pdf","https://ejemplo.com/b.pdf"]}'
{
  "pdfs": [
    "https://ejemplo.com/a.pdf",
    "https://ejemplo.com/b.pdf"
  ]
}
{
  "task_id": "tsk_a1b2c3d4e5f6a1b2c3d4e5f6",
  "type": "pdf.merge",
  "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.008

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.
413input_too_largeThe file exceeds the size limit.

Read the full KIT documentation →