New: AI Cover Letter Generator & LinkedIn to Resume Try Cover Letter|Try LinkedIn to Resume
PannaPDF API Docs

Authentication

All API requests must include a valid API key in the Authorization header using the Bearer scheme. You can generate API keys from your PannaPDF dashboard.

  • Production keys start with pk_live_
  • Test keys start with pk_test_ — they work identically but are rate-limited and watermark output files.

Example Header

Authorization: Bearer pk_live_xxxxx

Rate Limits

Rate limits vary by plan. When you exceed your limit the API responds with HTTP 429 Too Many Requests and includes a Retry-After header indicating how many seconds to wait before retrying.

PlanCalls / MonthCalls / Minute
Free10010
Starter5,00060
Growth50,000200
Scale500,0001,000

Error Handling

All errors follow a consistent JSON structure so you can handle them programmatically.

Error Response Format

{
  "error": {
    "code": "string",
    "message": "string"
  }
}

Error Codes

CodeDescription
invalid_api_keyThe API key provided is missing or invalid.
rate_limit_exceededYou have exceeded your plan's rate limit.
file_too_largeThe uploaded file exceeds the maximum allowed size.
invalid_file_typeThe uploaded file type is not supported for this operation.
processing_errorAn internal error occurred while processing the file.
invalid_parametersOne or more request parameters are invalid or missing.
quota_exceededYour monthly API call quota has been reached.

Webhooks

For long-running operations (large merges, AI tools) you can provide a webhook_url query parameter. When the job finishes, PannaPDF will send a POST request to your URL with the result.

Webhook Payload

{
  "event": "job.completed",
  "job_id": "job_abc123",
  "status": "success",
  "result_url": "https://api.pannapdf.com/v1/download/job_abc123",
  "expires_at": "2026-05-02T00:00:00Z"
}

PDF Tools

Endpoints for manipulating PDF files.

POST/v1/merge

Combine two or more PDF files into a single document. Upload up to 50 files in one request. Optionally specify a custom page order.

Headers

HeaderValue
AuthorizationBearer pk_live_xxxxx
Content-Typemultipart/form-data

Parameters

NameTypeRequiredDescription
filesFile[]YesPDF files to merge (2-50 files)
orderstringNoComma-separated file indices to control merge order (e.g., "2,0,1")

Responses

StatusDescription
200Success — returns the processed file or JSON result
400Bad Request — missing or invalid parameters
401Unauthorized — invalid or missing API key
429Too Many Requests — rate limit exceeded

Example Request

curl -X POST https://api.pannapdf.com/v1/merge \
  -H "Authorization: Bearer pk_live_xxxxx" \
  -F "[email protected]" \
  -F "[email protected]" \
  -F "order=1,0" \
  -o merged.pdf
POST/v1/compress

Reduce the file size of a PDF while maintaining acceptable quality. Choose from low, medium, or high compression levels.

Headers

HeaderValue
AuthorizationBearer pk_live_xxxxx
Content-Typemultipart/form-data

Parameters

NameTypeRequiredDescription
fileFileYesThe PDF file to compress
qualitystringNoCompression level: low, medium (default), or high

Responses

StatusDescription
200Success — returns the processed file or JSON result
400Bad Request — missing or invalid parameters
401Unauthorized — invalid or missing API key
429Too Many Requests — rate limit exceeded

Example Request

curl -X POST https://api.pannapdf.com/v1/compress \
  -H "Authorization: Bearer pk_live_xxxxx" \
  -F "[email protected]" \
  -F "quality=high" \
  -o compressed.pdf

Example Response

// Response headers include compression stats:
// X-Original-Size: 12582912
// X-Compressed-Size: 3145728
// X-Compression-Ratio: 75%
POST/v1/split

Split a PDF into multiple files by specifying page ranges. Returns a ZIP archive containing the resulting PDFs.

Headers

HeaderValue
AuthorizationBearer pk_live_xxxxx
Content-Typemultipart/form-data

Parameters

NameTypeRequiredDescription
fileFileYesThe PDF file to split
pagesstringYesPage ranges to extract (e.g., "1-3,5,7-10")

Responses

StatusDescription
200Success — returns the processed file or JSON result
400Bad Request — missing or invalid parameters
401Unauthorized — invalid or missing API key
429Too Many Requests — rate limit exceeded

Example Request

curl -X POST https://api.pannapdf.com/v1/split \
  -H "Authorization: Bearer pk_live_xxxxx" \
  -F "[email protected]" \
  -F "pages=1-3,5,7-10" \
  -o split-pages.zip
POST/v1/convert/pdf-to-image

Convert each page of a PDF to a raster image. Supports PNG and JPG output formats with configurable DPI. Returns a ZIP archive of images.

Headers

HeaderValue
AuthorizationBearer pk_live_xxxxx
Content-Typemultipart/form-data

Parameters

NameTypeRequiredDescription
fileFileYesThe PDF file to convert
formatstringYesOutput image format: png or jpg
dpinumberNoResolution in dots per inch (72-300, default 150)

Responses

StatusDescription
200Success — returns the processed file or JSON result
400Bad Request — missing or invalid parameters
401Unauthorized — invalid or missing API key
429Too Many Requests — rate limit exceeded

Example Request

curl -X POST https://api.pannapdf.com/v1/convert/pdf-to-image \
  -H "Authorization: Bearer pk_live_xxxxx" \
  -F "[email protected]" \
  -F "format=png" \
  -F "dpi=200" \
  -o images.zip
POST/v1/convert/image-to-pdf

Convert one or more images (PNG, JPG, WEBP) into a single PDF document. Each image becomes one page.

Headers

HeaderValue
AuthorizationBearer pk_live_xxxxx
Content-Typemultipart/form-data

Parameters

NameTypeRequiredDescription
filesFile[]YesImage files to convert (PNG, JPG, WEBP)
pageSizestringNoPage size: a4, letter, or original (default a4)

Responses

StatusDescription
200Success — returns the processed file or JSON result
400Bad Request — missing or invalid parameters
401Unauthorized — invalid or missing API key
429Too Many Requests — rate limit exceeded

Example Request

curl -X POST https://api.pannapdf.com/v1/convert/image-to-pdf \
  -H "Authorization: Bearer pk_live_xxxxx" \
  -F "[email protected]" \
  -F "[email protected]" \
  -F "pageSize=letter" \
  -o images.pdf
POST/v1/watermark

Add a text watermark to every page of a PDF. Customize position, opacity, and font size.

Headers

HeaderValue
AuthorizationBearer pk_live_xxxxx
Content-Typemultipart/form-data

Parameters

NameTypeRequiredDescription
fileFileYesThe PDF file to watermark
textstringYesWatermark text
positionstringNoPlacement: center or diagonal (default center)
opacitynumberNoTransparency from 0 (invisible) to 1 (opaque), default 0.3
fontSizenumberNoFont size in points (default 48)

Responses

StatusDescription
200Success — returns the processed file or JSON result
400Bad Request — missing or invalid parameters
401Unauthorized — invalid or missing API key
429Too Many Requests — rate limit exceeded

Example Request

curl -X POST https://api.pannapdf.com/v1/watermark \
  -H "Authorization: Bearer pk_live_xxxxx" \
  -F "[email protected]" \
  -F "text=CONFIDENTIAL" \
  -F "position=diagonal" \
  -F "opacity=0.2" \
  -F "fontSize=60" \
  -o watermarked.pdf
POST/v1/protect

Encrypt a PDF with a password and optionally restrict permissions such as printing, copying, or editing.

Headers

HeaderValue
AuthorizationBearer pk_live_xxxxx
Content-Typemultipart/form-data

Parameters

NameTypeRequiredDescription
fileFileYesThe PDF file to protect
passwordstringYesPassword to set on the PDF
permissionsstringNoComma-separated allowed permissions: print, copy, edit

Responses

StatusDescription
200Success — returns the processed file or JSON result
400Bad Request — missing or invalid parameters
401Unauthorized — invalid or missing API key
429Too Many Requests — rate limit exceeded

Example Request

curl -X POST https://api.pannapdf.com/v1/protect \
  -H "Authorization: Bearer pk_live_xxxxx" \
  -F "[email protected]" \
  -F "password=s3cur3P@ss" \
  -F "permissions=print,copy" \
  -o protected.pdf
POST/v1/flatten

Flatten all form fields, annotations, and layers in a PDF into a single flat document. Useful for archiving or preventing further edits.

Headers

HeaderValue
AuthorizationBearer pk_live_xxxxx
Content-Typemultipart/form-data

Parameters

NameTypeRequiredDescription
fileFileYesThe PDF file to flatten

Responses

StatusDescription
200Success — returns the processed file or JSON result
400Bad Request — missing or invalid parameters
401Unauthorized — invalid or missing API key
429Too Many Requests — rate limit exceeded

Example Request

curl -X POST https://api.pannapdf.com/v1/flatten \
  -H "Authorization: Bearer pk_live_xxxxx" \
  -F "[email protected]" \
  -o flattened.pdf
POST/v1/metadata

Read or update the metadata (title, author, subject) of a PDF document. Send the file along with the fields you want to change.

Headers

HeaderValue
AuthorizationBearer pk_live_xxxxx
Content-Typemultipart/form-data

Parameters

NameTypeRequiredDescription
fileFileYesThe PDF file to update
titlestringNoNew document title
authorstringNoNew author name
subjectstringNoNew subject / description

Responses

StatusDescription
200Success — returns the processed file or JSON result
400Bad Request — missing or invalid parameters
401Unauthorized — invalid or missing API key
429Too Many Requests — rate limit exceeded

Example Request

curl -X POST https://api.pannapdf.com/v1/metadata \
  -H "Authorization: Bearer pk_live_xxxxx" \
  -F "[email protected]" \
  -F "title=Annual Report 2026" \
  -F "author=Jane Doe" \
  -o updated.pdf

Example Response

{
  "title": "Annual Report 2026",
  "author": "Jane Doe",
  "subject": null,
  "creator": "PannaPDF API v1",
  "pages": 24,
  "size_bytes": 1048576
}
POST/v1/rotate

Rotate one or more pages of a PDF by 90, 180, or 270 degrees clockwise.

Headers

HeaderValue
AuthorizationBearer pk_live_xxxxx
Content-Typemultipart/form-data

Parameters

NameTypeRequiredDescription
fileFileYesThe PDF file
anglenumberYesRotation angle: 90, 180, or 270
pagesstringNoPages to rotate (e.g., "1,3,5-7"). Defaults to "all"

Responses

StatusDescription
200Success — returns the processed file or JSON result
400Bad Request — missing or invalid parameters
401Unauthorized — invalid or missing API key
429Too Many Requests — rate limit exceeded

Example Request

curl -X POST https://api.pannapdf.com/v1/rotate \
  -H "Authorization: Bearer pk_live_xxxxx" \
  -F "[email protected]" \
  -F "angle=90" \
  -F "pages=1,3" \
  -o rotated.pdf
POST/v1/reorder

Rearrange the pages of a PDF by specifying a new page order.

Headers

HeaderValue
AuthorizationBearer pk_live_xxxxx
Content-Typemultipart/form-data

Parameters

NameTypeRequiredDescription
fileFileYesThe PDF file
orderstringYesNew page order as comma-separated page numbers (e.g., "3,1,2,5,4")

Responses

StatusDescription
200Success — returns the processed file or JSON result
400Bad Request — missing or invalid parameters
401Unauthorized — invalid or missing API key
429Too Many Requests — rate limit exceeded

Example Request

curl -X POST https://api.pannapdf.com/v1/reorder \
  -H "Authorization: Bearer pk_live_xxxxx" \
  -F "[email protected]" \
  -F "order=3,1,2,5,4" \
  -o reordered.pdf

AI Tools

AI-powered endpoints for document intelligence and generation.

POST/v1/ai/summarize

Generate a concise summary of a PDF document using AI. Choose between short, medium, or long summary lengths.

Headers

HeaderValue
AuthorizationBearer pk_live_xxxxx
Content-Typemultipart/form-data

Parameters

NameTypeRequiredDescription
fileFileYesThe PDF file to summarize
lengthstringYesSummary length: short, medium, or long

Responses

StatusDescription
200Success — returns the processed file or JSON result
400Bad Request — missing or invalid parameters
401Unauthorized — invalid or missing API key
429Too Many Requests — rate limit exceeded

Example Request

curl -X POST https://api.pannapdf.com/v1/ai/summarize \
  -H "Authorization: Bearer pk_live_xxxxx" \
  -F "[email protected]" \
  -F "length=medium" 

Example Response

{
  "summary": "The annual report highlights a 23% increase in revenue...",
  "word_count": 250,
  "pages_analyzed": 24
}
POST/v1/ai/extract

Extract structured information from a PDF. Specify the fields you want to extract and the AI will locate and return them.

Headers

HeaderValue
AuthorizationBearer pk_live_xxxxx
Content-Typemultipart/form-data

Parameters

NameTypeRequiredDescription
fileFileYesThe PDF file to extract from
fieldsstring[]YesArray of field names to extract (e.g., ["name","email","phone"])

Responses

StatusDescription
200Success — returns the processed file or JSON result
400Bad Request — missing or invalid parameters
401Unauthorized — invalid or missing API key
429Too Many Requests — rate limit exceeded

Example Request

curl -X POST https://api.pannapdf.com/v1/ai/extract \
  -H "Authorization: Bearer pk_live_xxxxx" \
  -H "Content-Type: multipart/form-data" \
  -F "[email protected]" \
  -F 'fields=["name","email","phone","total"]'

Example Response

{
  "data": {
    "name": "Acme Corp",
    "email": "[email protected]",
    "phone": "+1-555-0123",
    "total": "$4,250.00"
  },
  "confidence": 0.96
}
POST/v1/ai/translate

Translate the content of a PDF into another language. The layout and formatting are preserved as closely as possible.

Headers

HeaderValue
AuthorizationBearer pk_live_xxxxx
Content-Typemultipart/form-data

Parameters

NameTypeRequiredDescription
fileFileYesThe PDF file to translate
targetLanguagestringYesISO 639-1 language code (e.g., "es", "fr", "de", "ja")

Responses

StatusDescription
200Success — returns the processed file or JSON result
400Bad Request — missing or invalid parameters
401Unauthorized — invalid or missing API key
429Too Many Requests — rate limit exceeded

Example Request

curl -X POST https://api.pannapdf.com/v1/ai/translate \
  -H "Authorization: Bearer pk_live_xxxxx" \
  -F "[email protected]" \
  -F "targetLanguage=es" \
  -o translated.pdf
POST/v1/ai/resume

Generate a professional resume PDF from a text description. Provide your experience, skills, and education in natural language and receive a formatted PDF.

Headers

HeaderValue
AuthorizationBearer pk_live_xxxxx
Content-Typemultipart/form-data

Parameters

NameTypeRequiredDescription
promptstringYesText description of your experience, skills, and education
templatestringNoResume template: modern, classic, or minimal (default modern)

Responses

StatusDescription
200Success — returns the processed file or JSON result
400Bad Request — missing or invalid parameters
401Unauthorized — invalid or missing API key
429Too Many Requests — rate limit exceeded

Example Request

curl -X POST https://api.pannapdf.com/v1/ai/resume \
  -H "Authorization: Bearer pk_live_xxxxx" \
  -H "Content-Type: application/json" \
  -d '{
    "prompt": "Software engineer with 5 years of experience in React and Node.js. Worked at Google and a YC startup. MS in Computer Science from Stanford.",
    "template": "modern"
  }' \
  -o resume.pdf
POST/v1/ai/create

Generate a PDF document from a text prompt. Describe what you need and the AI will create a professionally formatted document.

Headers

HeaderValue
AuthorizationBearer pk_live_xxxxx
Content-Typemultipart/form-data

Parameters

NameTypeRequiredDescription
promptstringYesDescription of the document to generate
pageCountnumberNoNumber of pages (1-10, default auto)

Responses

StatusDescription
200Success — returns the processed file or JSON result
400Bad Request — missing or invalid parameters
401Unauthorized — invalid or missing API key
429Too Many Requests — rate limit exceeded

Example Request

curl -X POST https://api.pannapdf.com/v1/ai/create \
  -H "Authorization: Bearer pk_live_xxxxx" \
  -H "Content-Type: application/json" \
  -d '{
    "prompt": "A project proposal for building a mobile app for restaurant reservations",
    "pageCount": 3
  }' \
  -o proposal.pdf
POST/v1/ai/cover-letter

Generate a tailored cover letter for a job application. Optionally upload your resume so the AI can reference your experience.

Headers

HeaderValue
AuthorizationBearer pk_live_xxxxx
Content-Typemultipart/form-data

Parameters

NameTypeRequiredDescription
resumeFileNoYour resume PDF (used to personalize the letter)
jobDescriptionstringYesThe job description or posting text
tonestringNoWriting tone: formal or friendly (default formal)

Responses

StatusDescription
200Success — returns the processed file or JSON result
400Bad Request — missing or invalid parameters
401Unauthorized — invalid or missing API key
429Too Many Requests — rate limit exceeded

Example Request

curl -X POST https://api.pannapdf.com/v1/ai/cover-letter \
  -H "Authorization: Bearer pk_live_xxxxx" \
  -F "[email protected]" \
  -F "jobDescription=Senior Frontend Engineer at Stripe. 5+ years React..." \
  -F "tone=formal" \
  -o cover-letter.pdf

SDKs

Official client libraries for faster integration.

JavaScript / Node.js

Install the official Node.js SDK from npm:

npm install @pannapdf/sdk

Quick Example

import PannaPDF from '@pannapdf/sdk';

const client = new PannaPDF('pk_live_xxxxx');

// Merge two PDFs
const merged = await client.merge({
  files: ['./doc1.pdf', './doc2.pdf'],
});
await merged.saveTo('./merged.pdf');

// Compress a PDF
const compressed = await client.compress({
  file: './large.pdf',
  quality: 'high',
});
await compressed.saveTo('./compressed.pdf');

// AI Summarize
const summary = await client.ai.summarize({
  file: './report.pdf',
  length: 'short',
});
console.log(summary.text);

Python

Install the official Python SDK from PyPI:

pip install pannapdf

Quick Example

from pannapdf import PannaPDF

client = PannaPDF("pk_live_xxxxx")

# Merge two PDFs
merged = client.merge(files=["doc1.pdf", "doc2.pdf"])
merged.save_to("merged.pdf")

# Compress a PDF
compressed = client.compress(file="large.pdf", quality="high")
compressed.save_to("compressed.pdf")

# AI Summarize
summary = client.ai.summarize(file="report.pdf", length="short")
print(summary["text"])

Changelog

v1.4.0 — April 2026

  • Added AI Cover Letter generation endpoint
  • Added webhook support for all long-running operations
  • Increased maximum merge file count from 20 to 50

v1.3.0 — February 2026

  • Added AI Resume and AI Create endpoints
  • Added Python SDK
  • Improved compression quality at all levels

v1.2.0 — December 2025

  • Added AI Summarize, Extract, and Translate endpoints
  • Added JavaScript / Node.js SDK
  • Added Flatten and Metadata endpoints

v1.1.0 — October 2025

  • Added Watermark, Protect, Rotate, and Reorder endpoints
  • Added Image to PDF conversion
  • Increased rate limits for Growth and Scale plans

v1.0.0 — August 2025

  • Initial release with Merge, Compress, Split, and PDF to Image
  • Authentication and rate limiting
  • Free tier with 100 calls/month