/v1/merge-pdf
Merge multiple PDF files into a single document.
Tool Usage Notes
Accepts one or multiple PDF URLs.
Output is always a single merged PDF file (not ZIP).
Use profile to tune output quality: standard, web, or print.
Output is always a single merged PDF file (not ZIP).
Use profile to tune output quality: standard, web, or print.
Estimate Before Processing
Use the estimate endpoint to preview token cost and validate your input URLs before starting conversion.
curl -X POST https://filemazing.com/v1/merge-pdf/estimate \
-H "Authorization: Bearer fm_live_your_api_key" \
-H "Content-Type: application/json" \
-d '{
"inputs": ["https://example.com/file"],
"response_type": "json"
}'
{
"ok": true,
"tool": "merge-pdf",
"mode": "estimate",
"estimated_tokens": 1,
"available_tokens": 10,
"enough_tokens": true,
"shortfall_tokens": 0
}
Example Request
Send two or more PDF files and merge profile.
curl -X POST https://filemazing.com/api/v1/merge-pdf \
-H "Authorization: Bearer fm_live_your_api_key" \
-H "Content-Type: application/json" \
-d '{
"inputs": ["https://example.com/a.pdf", "https://example.com/b.pdf"],
"profile": "standard",
"response_type": "json"
}'
Request Parameters Breakdown
| Parameter | Required | Type | Options | Default | Example |
|---|---|---|---|---|---|
| inputs | Yes | array<string> | HTTP/HTTPS URL(s) to PDF files |
none (required)
|
["https://example.com/a.pdf","https://example.com/b.pdf"]
|
| Provide one or more PDF URLs. | |||||
| profile | Yes | string |
standard, web, print
|
none (required)
|
standard
|
| Controls merge output quality profile. | |||||
| response_type | No | string |
json, xml, text
|
json
|
json
|
| Controls API response payload format. | |||||
| promo_code | No | string | Any active promo code |
empty
|
SPRING25
|
| Optional; applies discount rules when valid. | |||||
Example Response
Merged document is returned through a download URL.
{
"ok": true,
"tool": "merge-pdf",
"mode": "sync",
"status": "completed",
"download_url": "https://filemazing.com/tool/merge-pdf/jobs/.../download",
"estimated_tokens": 2,
"final_tokens": 2
}
Response Fields Breakdown
| Field | Type | Always Returned | Example |
|---|---|---|---|
| ok | boolean | Yes |
true
|
| Indicates success/failure. | |||
| tool | string | Yes |
merge-pdf
|
| Tool identifier. | |||
| mode | string | Yes |
sync
|
| Current execution mode. | |||
| status | string | Yes |
completed
|
| Processing state. | |||
| download_url | string | Yes |
https://filemazing.com/tool/merge-pdf/jobs/.../download
|
| Direct merged PDF download URL. | |||
| estimated_tokens | integer | Yes |
2
|
| Estimated reserved tokens. | |||
| final_tokens | integer | Yes |
2
|
| Final charged tokens. | |||