API Reference

Super4PDF API

A simple REST API for PDF operations. Authenticate with your API key, send files, and receive processed results.

Authentication

All API requests require an API key. Include it in the Authorization header as a Bearer token.

Header
Authorization: Bearer spdf_live_xxxxxxxxxxxxxxxxxxxxx

You can generate API keys from the admin panel after upgrading to a Starter or Pro plan.

Base URL

https://superpdf.vercel.app/api/v1

Endpoints

POST/api/v1/merge

Merge PDFs

Combine multiple PDF files into a single document.

Parameters

filesFile[]RequiredTwo or more PDF files to merge

Example Request

curl -X POST https://superpdf.vercel.app/api/v1/merge \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -F "files=@doc1.pdf" \
  -F "files=@doc2.pdf" \
  -o merged.pdf

Response

Binary PDF file (application/pdf)

POST/api/v1/split

Split PDF

Extract specific pages from a PDF file.

Parameters

fileFileRequiredThe PDF file to split
pagesstringRequiredPage range, e.g. "1-3,5,8-10"

Example Request

curl -X POST https://superpdf.vercel.app/api/v1/split \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -F "file=@document.pdf" \
  -F "pages=1-3,5,8-10" \
  -o split.pdf

Response

Binary PDF file (application/pdf)

POST/api/v1/compress

Compress PDF

Reduce the file size of a PDF while preserving quality.

Parameters

fileFileRequiredThe PDF file to compress
qualitystring"low", "medium" (default), or "high"

Example Request

curl -X POST https://superpdf.vercel.app/api/v1/compress \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -F "file=@large.pdf" \
  -F "quality=medium" \
  -o compressed.pdf

Response

Binary PDF file (application/pdf)

POST/api/v1/jpg-to-pdf

JPG to PDF

Convert one or more JPG images into a PDF document.

Parameters

filesFile[]RequiredOne or more JPG/JPEG images
pageSizestring"a4" (default), "letter", or "fit"

Example Request

curl -X POST https://superpdf.vercel.app/api/v1/jpg-to-pdf \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -F "files=@photo1.jpg" \
  -F "files=@photo2.jpg" \
  -o output.pdf

Response

Binary PDF file (application/pdf)

POST/api/v1/pdf-to-jpg

PDF to JPG

Convert PDF pages into JPG images. Returns a ZIP archive.

Parameters

fileFileRequiredThe PDF file to convert
dpinumberResolution in DPI (default: 150)
pagesstringSpecific pages, e.g. "1-3". Default: all

Example Request

curl -X POST https://superpdf.vercel.app/api/v1/pdf-to-jpg \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -F "file=@document.pdf" \
  -F "dpi=150" \
  -o pages.zip

Response

ZIP archive containing JPG images (application/zip)

Rate Limits

API rate limits depend on your plan. Requests beyond the limit receive a 429 response.

PlanAPI RequestsNote
FreeNo API access
Starter1,000 / month~33 requests/day
Pro10,000 / month~333 requests/day
UnlimitedUnlimitedContact sales

Error Codes

CodeMeaning
200OK — Request processed successfully
400Bad Request — Missing or invalid parameters
401Unauthorized — Missing or invalid API key
413Payload Too Large — File exceeds plan limit
429Too Many Requests — Rate limit exceeded
500Internal Server Error — Something went wrong

Error Response Format

When an error occurs, the API returns a JSON object:

{
  "error": {
    "code": 429,
    "message": "Rate limit exceeded. Upgrade your plan for more requests.",
    "retryAfter": 3600
  }
}

Ready to integrate?

Get your API key and start processing PDFs in minutes.