SwiftPDF
API v1·REST · JSON · multipart/form-data

API Reference

Integrate SynthPDF into your workflows. All endpoints accept multipart form data and return files or JSON.

API Key — Ultra Max only

Programmatic API access requires an Ultra Max plan. Generate a key to authenticate requests via the X-API-Key header.

Upgrade to Ultra Max

Base URL

text
https://synthpdf.app/api/v1

Authentication

Use X-API-Key for machine-to-machine requests (Ultra Max). Browser sessions use Authorization: Bearer automatically.

bash
# Bearer token (from /auth/signin)
curl -H "Authorization: Bearer <access_token>" ...

# API key (Ultra Max plans)
curl -H "X-API-Key: spdf_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" ...

PDF Tools

POST
/compress

Compress a PDF. Form fields: file (PDF), quality (low|medium|high).

POST
/merge

Merge multiple PDFs. Form field: files[] (multiple PDFs).

Bearer
POST
/split

Split a PDF by page ranges. Form fields: file, pages.

Bearer
POST
/pdf-to-word

Convert PDF to .docx.

Bearer
POST
/pdf-to-image

Convert PDF pages to images. Form fields: file, format (png|jpg), dpi.

Bearer
POST
/protect

Password-protect a PDF. Form fields: file, password.

Bearer
POST
/unlock

Remove PDF password. Form fields: file, password.

Bearer
POST
/repair

Repair a corrupted PDF.

Bearer
POST
/grayscale

Convert PDF to greyscale.

Bearer
POST
/redact

Redact text from PDF. Form fields: file, phrases (comma-separated).

Bearer

AI Tools(Pro+ plan)

POST
/ai/summarize

AI-summarize a PDF. Form fields: file, language.

Pro+
POST
/ai/translate

AI-translate a PDF. Form fields: file, target_language.

Pro+
POST
/ai/chat

Chat with a PDF. Form fields: file, message, history (JSON).

Pro+
POST
/ai/resume/check

ATS resume check. Form field: file.

Pro+

Account

POST
/auth/signin

Sign in. Body: { email, password }. Returns access_token + refresh_token.

POST
/auth/signup

Create account. Body: { email, password }.

POST
/auth/refresh

Refresh access token. Body: { refresh_token }.

GET
/auth/me

Get current user profile.

Bearer
GET
/auth/api-key

Retrieve your API key.

Ultra Max
POST
/auth/api-key

Generate a new API key.

Ultra Max
DELETE
/auth/api-key

Revoke your API key.

Ultra Max

Example: Compress a PDF

Response headers include X-Original-Size and X-Compressed-Size (bytes).

bash
curl -X POST https://synthpdf.app/api/v1/compress \
  -H "X-API-Key: YOUR_API_KEY" \
  -F "file=@document.pdf" \
  -F "quality=medium" \
  --output compressed.pdf

Example: AI Summarize

Returns { "summary": "..." }. Consumes 1 AI credit.

bash
curl -X POST https://synthpdf.app/api/v1/ai/summarize \
  -H "X-API-Key: YOUR_API_KEY" \
  -F "file=@document.pdf" \
  -F "language=English"

Python Example

Uses httpx. Works with requests too.

python
import httpx

API_KEY = "spdf_your_key_here"
BASE    = "https://synthpdf.app/api/v1"

with open("document.pdf", "rb") as f:
    r = httpx.post(
        f"{BASE}/compress",
        headers={"X-API-Key": API_KEY},
        files={"file": ("document.pdf", f, "application/pdf")},
        data={"quality": "medium"},
    )
r.raise_for_status()

with open("compressed.pdf", "wb") as out:
    out.write(r.content)

print("Original:", r.headers["X-Original-Size"], "bytes")
print("Compressed:", r.headers["X-Compressed-Size"], "bytes")

Rate Limits

PlanDaily opsMonthly AI creditsMax file size
Free510 MB
Pro757550 MB
Max300300200 MB
Ultra MaxUnlimitedUnlimited500 MB

Rate limit errors return HTTP 429 with a JSON body describing the limit and reset time.

Error codes

HTTPCodeMeaning
400Bad request — invalid file type or missing field
401Missing or expired auth token
403PLAN_REQUIREDFeature requires a higher plan
413File exceeds plan limit
429DAILY_LIMITDaily operation limit reached
429MONTHLY_LIMITMonthly AI credit limit reached
502Backend unavailable