Skip to content

Remove pages

Delete selected pages from a PDF. MCP tool remove_pages / HTTP POST /v1/pages/remove.

Produce a new PDF with the selected pages deleted and the rest kept in order.

MCP tool remove_pages
HTTP endpoint POST /v1/pages/remove
Price $0.05
Input One PDF + a page range
Output A PDF without the selected pages
Parameter Type Required Description
file file yes Source PDF.
pages page range yes Pages to delete, e.g. 2,4-6. 1-indexed.

Remove pages 2 and 4 through 6 from https://example.com/report.pdf.

{
"file": "https://example.com/report.pdf",
"pages": "2,4-6"
}
Terminal window
curl -i -X POST https://api.pdfasyougo.com/v1/pages/remove \
-H "Content-Type: application/json" \
-H "X-PAYMENT: <base64-encoded-payment-payload>" \
-d '{"file":"https://example.com/report.pdf","pages":"2,4-6"}'
{
"output": {
"url": "https://files.pdfasyougo.com/o/9d4e…?token=…",
"expires_at": "2026-06-29T12:00:00Z",
"pages": 6,
"bytes": 61440
},
"operation": "pages.remove",
"cost": "0.05 USDC"
}
  • Pages are 1-indexed; see the page-range syntax.
  • Remaining pages keep their original relative order.
  • Removing every page is rejected as a processing_error (the result would be empty) and isn’t charged.