Combining invoices, contracts, or report appendices shouldn't require opening Adobe Acrobat. If you're building automation โ or asking an AI agent to handle document workflows โ you need a merge PDF API that accepts multiple files and returns one.
Agent Media Tools exposes POST /api/merge-pdf. Upload up to 10 PDFs, get a single merged file back. Here's how to use it from scripts, workflows, and AI agents.
PDF tools require a free login (session cookie) for abuse prevention. For scripts, use the browser tool once or authenticate via API key on Premium.
curl -X POST https://agentmediatools.com/api/merge-pdf \ -b "connect.sid=YOUR_SESSION_COOKIE" \ -F "pdfs=@chapter1.pdf" \ -F "pdfs=@chapter2.pdf" \ -F "pdfs=@chapter3.pdf" \ -o combined.pdf
Files are merged in upload order. Max 10 PDFs per request.
import requests
session = requests.Session()
# Log in once, reuse session
session.post("https://agentmediatools.com/api/login", json={
"username": "your_user", "password": "your_pass"
})
files = [
("pdfs", open("a.pdf", "rb")),
("pdfs", open("b.pdf", "rb")),
]
r = session.post("https://agentmediatools.com/api/merge-pdf", files=files)
with open("merged.pdf", "wb") as f:
f.write(r.content)
Merge PDFs by POSTing to https://agentmediatools.com/api/merge-pdf with multipart field "pdfs" repeated for each file (max 10). Requires login session or Premium API key. Response is the merged PDF binary.
/api/merge-pdfNo custom server needed โ one HTTP node does the merge.
Merge PDFs free: Open the tool ยท Premium โ 1,000/day ยท Full API docs
More at agentmediatools.com/blog