Merge PDFs
curl --request POST \
--url https://app.dumplingai.com/api/v1/merge-pdfs \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"inputMethod": "url",
"files": [
"https://example.com/cover.pdf",
"https://example.com/appendix.pdf"
],
"metadata": {
"Title": "2025 Strategy Overview"
}
}
'import requests
url = "https://app.dumplingai.com/api/v1/merge-pdfs"
payload = {
"inputMethod": "url",
"files": ["https://example.com/cover.pdf", "https://example.com/appendix.pdf"],
"metadata": { "Title": "2025 Strategy Overview" }
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
inputMethod: 'url',
files: ['https://example.com/cover.pdf', 'https://example.com/appendix.pdf'],
metadata: {Title: '2025 Strategy Overview'}
})
};
fetch('https://app.dumplingai.com/api/v1/merge-pdfs', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://app.dumplingai.com/api/v1/merge-pdfs",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'inputMethod' => 'url',
'files' => [
'https://example.com/cover.pdf',
'https://example.com/appendix.pdf'
],
'metadata' => [
'Title' => '2025 Strategy Overview'
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://app.dumplingai.com/api/v1/merge-pdfs"
payload := strings.NewReader("{\n \"inputMethod\": \"url\",\n \"files\": [\n \"https://example.com/cover.pdf\",\n \"https://example.com/appendix.pdf\"\n ],\n \"metadata\": {\n \"Title\": \"2025 Strategy Overview\"\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://app.dumplingai.com/api/v1/merge-pdfs")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"inputMethod\": \"url\",\n \"files\": [\n \"https://example.com/cover.pdf\",\n \"https://example.com/appendix.pdf\"\n ],\n \"metadata\": {\n \"Title\": \"2025 Strategy Overview\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.dumplingai.com/api/v1/merge-pdfs")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"inputMethod\": \"url\",\n \"files\": [\n \"https://example.com/cover.pdf\",\n \"https://example.com/appendix.pdf\"\n ],\n \"metadata\": {\n \"Title\": \"2025 Strategy Overview\"\n }\n}"
response = http.request(request)
puts response.read_body{
"url": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}Document Processing
Merge PDFs
Merge multiple PDFs into a single document.
POST
/
api
/
v1
/
merge-pdfs
Merge PDFs
curl --request POST \
--url https://app.dumplingai.com/api/v1/merge-pdfs \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"inputMethod": "url",
"files": [
"https://example.com/cover.pdf",
"https://example.com/appendix.pdf"
],
"metadata": {
"Title": "2025 Strategy Overview"
}
}
'import requests
url = "https://app.dumplingai.com/api/v1/merge-pdfs"
payload = {
"inputMethod": "url",
"files": ["https://example.com/cover.pdf", "https://example.com/appendix.pdf"],
"metadata": { "Title": "2025 Strategy Overview" }
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
inputMethod: 'url',
files: ['https://example.com/cover.pdf', 'https://example.com/appendix.pdf'],
metadata: {Title: '2025 Strategy Overview'}
})
};
fetch('https://app.dumplingai.com/api/v1/merge-pdfs', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://app.dumplingai.com/api/v1/merge-pdfs",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'inputMethod' => 'url',
'files' => [
'https://example.com/cover.pdf',
'https://example.com/appendix.pdf'
],
'metadata' => [
'Title' => '2025 Strategy Overview'
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://app.dumplingai.com/api/v1/merge-pdfs"
payload := strings.NewReader("{\n \"inputMethod\": \"url\",\n \"files\": [\n \"https://example.com/cover.pdf\",\n \"https://example.com/appendix.pdf\"\n ],\n \"metadata\": {\n \"Title\": \"2025 Strategy Overview\"\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://app.dumplingai.com/api/v1/merge-pdfs")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"inputMethod\": \"url\",\n \"files\": [\n \"https://example.com/cover.pdf\",\n \"https://example.com/appendix.pdf\"\n ],\n \"metadata\": {\n \"Title\": \"2025 Strategy Overview\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.dumplingai.com/api/v1/merge-pdfs")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"inputMethod\": \"url\",\n \"files\": [\n \"https://example.com/cover.pdf\",\n \"https://example.com/appendix.pdf\"\n ],\n \"metadata\": {\n \"Title\": \"2025 Strategy Overview\"\n }\n}"
response = http.request(request)
puts response.read_body{
"url": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}Description
This endpoint merges multiple PDF files into a single PDF.Endpoint
POST /api/v1/merge-pdfs
Headers
- Content-Type:
application/json - Authorization: Bearer
<API_KEY>(required)
Request Body
{
"inputMethod": "string", // Required. Either "url" or "base64"
"files": ["string"], // Required. Array of URLs or base64-encoded PDF contents
"metadata": {
// Optional. Metadata for the merged PDF
"Title": "string",
"Author": "string",
"Subject": "string",
"Keywords": "string"
},
"pdfa": "string", // Optional. PDF/A compliance level: "PDF/A-1b", "PDF/A-2b", or "PDF/A-3b"
"pdfua": "boolean", // Optional. Enable PDF/UA compliance
"requestSource": "string" // Optional. Source of the request
}
Responses
Success (200)
Returns the URL of the merged PDF.{
"url": "string" // URL to the merged PDF file
}
Notes
- Credit usage: 50 credits per 100MB of output PDF size
- Requires at least 2 PDF files to merge
- Optional PDF/A and PDF/UA compliance
- Optional metadata for the merged PDF
- Files are temporarily stored (24-hour retention)
Rate Limiting
Rate limit headers are included in the response.Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Body
application/json
Indicates whether binary content is supplied via URL or base64-encoded string.
Available options:
url, base64 Array of PDF URLs or base64-encoded PDF contents to merge.
Minimum array length:
2Optional metadata map to embed within the merged PDF.
Optional PDF/A compliance level to apply when merging.
Available options:
PDF/A-1b, PDF/A-2b, PDF/A-3b Whether to attempt enabling PDF/UA compliance.
Optional identifier describing where the API request originated.
Available options:
API, WEB, MAKE_DOT_COM, ZAPIER, N8N, PLAYGROUND, DEFAULT_AUTOMATION, AGENT_PREVIEW, AGENT_LIVE, AUTOPILOT, STUDIO Response
Merged PDF returned.
Temporary download URL for the merged PDF.