Combine multiple PDF files into a single document. Drag to reorder files before merging.
# Step 1: Start merge job curl -X POST https://www.bastiantechnologies.com/api/pdf/merge \ -H "X-API-Key: your_api_key" \ -F "pdfs=@file1.pdf" \ -F "pdfs=@file2.pdf" # Step 2: Poll status curl https://www.bastiantechnologies.com/api/pdf/merge/status/{jobId} \ -H "X-API-Key: your_api_key" # Step 3: Download curl https://www.bastiantechnologies.com/api/pdf/merge/download/{jobId} \ -H "X-API-Key: your_api_key" -o merged.pdf
const fd = new FormData(); fd.append('pdfs', file1); fd.append('pdfs', file2); const { jobId } = await fetch('/api/pdf/merge', { method: 'POST', headers: { 'X-API-Key': 'your_api_key' }, body: fd }).then(r => r.json()); // Poll until done let data; do { await new Promise(r => setTimeout(r, 1500)); data = await fetch(`/api/pdf/merge/status/${jobId}`, { headers: { 'X-API-Key': 'your_api_key' } }).then(r => r.json()); } while (data.status === 'processing'); // Download window.location = `/api/pdf/merge/download/${jobId}`;
import requests, time headers = {"X-API-Key": "your_api_key"} files = [("pdfs", open("file1.pdf", "rb")), ("pdfs", open("file2.pdf", "rb"))] r = requests.post("https://www.bastiantechnologies.com/api/pdf/merge", headers=headers, files=files) job_id = r.json()["jobId"] while True: s = requests.get(f"https://www.bastiantechnologies.com/api/pdf/merge/status/{job_id}", headers=headers).json() if s["status"] in ["completed", "failed"]: break time.sleep(1.5) pdf = requests.get(f"https://www.bastiantechnologies.com/api/pdf/merge/download/{job_id}", headers=headers) open("merged.pdf", "wb").write(pdf.content)
// HTTP Request node — Start merge Method: POST URL: https://www.bastiantechnologies.com/api/pdf/merge Auth Header: X-API-Key: your_api_key Body Type: Form-Data Field name: pdfs (use "pdfs" not "pdf") // Poll with Wait + HTTP Request until status === "completed" URL: https://www.bastiantechnologies.com/api/pdf/merge/status/{{ $json.jobId }} // Download URL: https://www.bastiantechnologies.com/api/pdf/merge/download/{{ $json.jobId }}