

One API.
Every PDF workflow.
Quickstart
Get started with the CLI tool in under 2 minutes.
CLI Tool
One command to access all PDF tools from any AI agent or terminal.
MCP Server
IDE-native integration for Claude, Cursor, and Windsurf.
REST API
Simple RESTful endpoints for every PDF operation. Coming soon.
Pricing
Transparent credit-based pricing. Free tier included.
Overview
LittlePDF exposes 30 of its 36 tools programmatically through three interfaces: a CLI tool for any AI agent or terminal, an MCP Server for IDE-native integrations, and a REST API for traditional applications. The CLI and REST paths hold your file in memory for the request and keep no copy. MCP is the exception: it stores each output so your client can download it, and removes it automatically after 24 hours.
Secure & Private
Every request uses HTTPS. CLI and REST calls hold your file in memory and keep no copy. MCP results are stored so your client can fetch them, behind a link that expires after an hour, and are removed automatically after 24 hours.
Built for Scripts
One command per tool, JSON in and a file out, so a shell loop or an agent can drive it without a browser.
MCP Ready
First-class Model Context Protocol support for Claude, Cursor, and Windsurf.
Developer First
Simple design, predictable responses, and minimal configuration needed.
Authentication
All API and MCP requests require authentication. Generate an API key from your LittlePDF Dashboard. Use the Authorization header with a Bearer token.
curl -X POST https://api.littlepdf.com/v1/merge \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: multipart/form-data" \
-F "files[]=@doc1.pdf" \
-F "files[]=@doc2.pdf"Quickstart
Both plans include CLI and MCP access. Free gives you 500 credits a day, Pro gives you 5,000.
Get your API key
Sign up at littlepdf.com and generate an API key from your dashboard.
Authenticate the CLI
npx @littlepdf/cli auth --key YOUR_API_KEYDiscover available tools
littlepdf list
littlepdf merge-pdf --helpRun your first tool
littlepdf merge-pdf --files doc1.pdf doc2.pdf -o merged.pdflittlepdf list to see all available tools.CLI Tool
The @littlepdf/cli package gives any AI agent or terminal access to all LittlePDF tools via simple shell commands. Unlike MCP (which injects all tool schemas into context every turn), CLI-based access uses lazy discovery: --list and --help load only what's needed.
Installation
Run directly with npx (no install needed) or install globally:
npx @littlepdf/cli listAuthentication
The CLI resolves your API key in this order (highest priority first):
--key lpdf_xxxinline flagLITTLEPDF_API_KEYenvironment variable~/.littlepdf/config.jsonconfig file
Save your key once with:
littlepdf auth --key YOUR_API_KEYTool Discovery
Use list and --help to discover tools without reading docs:
# List all tools with credit costs
littlepdf list
# See parameters for a specific tool
littlepdf compress-pdf --help
# Check your credit balance
littlepdf balanceUsage Examples
littlepdf merge-pdf --files doc1.pdf doc2.pdf -o merged.pdfAI Agent Setup
The CLI ships with a SKILL.md file that AI agents can read for tool discovery. Point your agent to node_modules/@littlepdf/cli/SKILL.md or include the key commands in your system prompt:
littlepdf list # See all tools
littlepdf <tool> --help # See parameters
littlepdf balance # Check creditsMCP Server
For IDE-native integrations, LittlePDF provides a Streamable HTTP MCP server that enables Claude Desktop, Cursor, Windsurf, and Claude Code to directly access all PDF tools without leaving the editor.
Configuration
Add LittlePDF to your AI assistant's MCP configuration:
{
"mcpServers": {
"littlepdf": {
"url": "https://littlepdf.com/api/mcp",
"headers": {
"Authorization": "Bearer YOUR_API_KEY"
}
}
}
}Available Tools
The MCP server registers 33 tools: 30 that do work on a file, plus 3 for checking credits, listing tools and reading your history. They are grouped below by credit cost.
A tool that produces a file answers with a download link rather than the bytes, because an MCP client is usually a model and a multi-megabyte base64 blob would eat its context. That means the output is written to a private bucket under your account id. The link expires an hour after it is issued. The object behind it is not on a deletion schedule today, so treat MCP output as held by us until you ask us to remove it.
AI Tools (5 Credits)
Extract text with Gemini OCR, translate, summarize, and chat with PDFs using Claude AI.
Server Conversions (3 Credits)
High-fidelity conversions between PDF and Office formats (Word, Excel, PowerPoint, HTML).
Standard Operations (1 Credit)
Merge, split, rotate, watermark, protect, compress, and manipulate PDF pages.
REST API
For traditional integrations, LittlePDF provides simple RESTful endpoints for every tool. All endpoints accept multipart/form-data and return the processed file.
Make a Request
curl -X POST https://api.littlepdf.com/v1/merge \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: multipart/form-data" \
-F "files[]=@doc1.pdf" \
-F "files[]=@doc2.pdf" \
-o merged.pdfEndpoints
Every tool is available as a POST endpoint at /v1/{tool-slug}:
/v1/merge-pdfCombine multiple PDFs into a single document
/v1/split-pdfSeparate a PDF into individual pages or sections
/v1/compress-pdfReduce PDF file size with adjustable image compression
/v1/rotate-pdfRotate PDF pages to the correct orientation
/v1/organize-pdfReorder, add, or remove pages from your PDF
/v1/delete-pagesRemove unwanted pages from your PDF
/v1/pdf-to-wordConvert PDF documents to editable Word files
/v1/pdf-to-excelExtract tables from PDF into Excel spreadsheets
/v1/pdf-to-pptConvert PDF presentations to PowerPoint format
/v1/pdf-to-jpgConvert each PDF page into a high-quality image
/v1/word-to-pdfConvert Word documents to PDF format
/v1/excel-to-pdfConvert Excel spreadsheets to PDF format
/v1/ppt-to-pdfConvert PowerPoint presentations to PDF
/v1/jpg-to-pdfConvert images to a PDF document
/v1/html-to-pdfConvert web pages and HTML files to PDF
/v1/edit-pdfAdd text, images, shapes, and annotations to your PDF
/v1/sign-pdfAdd your signature to any PDF document
/v1/watermark-pdfAdd text or image watermarks to your PDF
/v1/page-numbersAdd page numbers to your PDF document
/v1/pdf-form-fillerFill out PDF forms digitally
/v1/ocr-pdfExtract text from scanned PDFs using AI
/v1/image-to-textExtract text from images using AI recognition
/v1/handwriting-to-textConvert handwritten notes to digital text
/v1/translate-pdfTranslate your PDF into one of 16 languages using AI
/v1/ai-summarizeGet an AI-powered summary of your PDF document
/v1/chat-with-pdfAsk questions about your PDF and get instant answers
/v1/extract-tablesExtract all tables from a PDF as structured JSON data
/v1/extract-key-infoExtract key information from a PDF by focus area (financial, legal, technical)
/v1/extract-action-itemsExtract action items, deadlines, and responsibilities from a PDF
/v1/compare-documentsCompare two PDFs and identify key differences
/v1/document-qaAsk questions about a PDF and get structured AI answers
/v1/unlock-pdfRemove password protection from your PDF
/v1/protect-pdfAdd password protection to your PDF
/v1/redact-pdfPermanently remove sensitive information from your PDF
/v1/repair-pdfFix corrupted or damaged PDF files
/v1/flatten-pdfFlatten form fields and annotations in your PDF
Error Handling
All API errors return a consistent JSON response with an error code and message:
{
"error": {
"code": "rate_limit_exceeded",
"message": "Daily credit limit reached. Resets at midnight UTC.",
"status": 429
}
}| Status | Code | Description |
|---|---|---|
| 401 | unauthorized | Missing or invalid API key |
| 413 | file_too_large | File exceeds plan size limit (25MB free / 500MB pro) |
| 422 | invalid_file | Unsupported file type or corrupted file |
| 429 | rate_limit_exceeded | Daily credit limit reached |
| 500 | processing_error | Internal error during file processing |
Credits System
API and MCP usage consumes credits based on the operation type. Credits reset daily at midnight UTC. There are no overage charges: once the pool is empty, calls stop until the next reset.
Operation Costs
| Category | Examples | Cost |
|---|---|---|
| Standard Operations | Merge, Split, Compress, Rotate, Watermark | 1 Credit |
| Server Conversions | PDF to Word, PDF to Excel, Word to PDF | 3 Credits |
| AI Features | OCR, Summarize, Translate, Chat with PDF | 5 Credits |
Plans
LittlePDF offers a simple two-tier pricing model. Both plans include full CLI, MCP, and API access.
Free Plan
- 500 Credits / day
- Max 25MB file size
- CLI Access
- REST API Access
- MCP Server Access
Pro Plan
- 5,000 credits a day
- Max 500MB file size
- CLI Access
- REST API Access
- MCP Server Access
Get started in minutes
Install, configure, run.
# One-time setup
npx @littlepdf/cli auth --key YOUR_API_KEY
# Merge two PDFs
littlepdf merge-pdf --files doc1.pdf doc2.pdf -o merged.pdf
# OCR a scanned document
littlepdf ocr-pdf --file scan.pdf --model pro