Skip to content

Rotate pages

Rotate selected pages by 90, 180, or 270 degrees. MCP tool rotate_pages / HTTP POST /v1/pages/rotate.

Rotate some or all pages clockwise — useful for fixing sideways scans.

MCP tool rotate_pages
HTTP endpoint POST /v1/pages/rotate
Price $0.05
Input One PDF + rotation (+ optional page range)
Output A PDF with the selected pages rotated
Parameter Type Required Description
file file yes Source PDF.
degrees 90 | 180 | 270 yes Clockwise rotation to apply.
pages page range no Pages to rotate. Omit to rotate all pages.

Rotate pages 1 to 3 of https://example.com/scan.pdf by 90 degrees.

{
"file": "https://example.com/scan.pdf",
"pages": "1-3",
"degrees": 90
}
Terminal window
curl -i -X POST https://api.pdfasyougo.com/v1/pages/rotate \
-H "Content-Type: application/json" \
-H "X-PAYMENT: <base64-encoded-payment-payload>" \
-d '{"file":"https://example.com/scan.pdf","pages":"1-3","degrees":90}'
{
"output": {
"url": "https://files.pdfasyougo.com/o/2a8f…?token=…",
"expires_at": "2026-06-29T12:00:00Z",
"pages": 12,
"bytes": 98304
},
"operation": "pages.rotate",
"cost": "0.05 USDC"
}
  • degrees is clockwise and must be 90, 180, or 270. Other values return a validation_error.
  • Rotation is relative to a page’s current rotation (e.g. 90 on an already-90° page yields 180°).
  • Omit pages to rotate the whole document; otherwise see the page-range syntax.