Bytefusedocs

Pages

Rotate PDF

Rotate every page — or just the ones you name — by 90, 180 or 270 degrees. The edited PDF is streamed straight back in the response, ready to save.

Free to try — no key required 10 credits / callSynchronous

Overview

On the free-try path — callable with no key. Page numbers are 1-based.

POSThttps://api.bytefuse.in/api/v1/pdf/rotate

Request

Content type multipart/form-data:

filefilerequired
The PDF to rotate.
rotationintrequired
Degrees to rotate — 90, 180 or 270 (negatives are accepted).
pagesstringoptional
Comma-separated 1-based page numbers, e.g. "1,3,5". Omit to rotate every page. A bad token returns 400.Default: all pages

Response

The file is returned directly

Unlike the URL-returning tools, page operations stream the edited PDF back as the response body — application/pdf with Content-Disposition: attachment. Read the raw bytes and save them; there’s no JSON envelope. The X-Credits-Charged header reports the credits billed (0 anonymous).

Examples

curl -X POST https://api.bytefuse.in/api/v1/pdf/rotate \
  -F "file=@scan.pdf" \
  -F "rotation=90" \
  -F "pages=1,3" \
  -o rotated.pdf
# Add -H "X-API-Key: dt_live_your_key" to run authenticated (10 credits).

Errors

400Missing/invalid rotation, or a malformed pages list.
402 / 429 / 503Insufficient credits, rate limited, or capacity/config error.
500Rotation failed unexpectedly.