# iLovePDF — how to use (mcp.ai)

Connect your iLovePDF account and use 9 tools for documents straight from your AI agent. Connect with your own API key. iLovePDF provides APIs for processing, converting, optimizing, and signing PDF and image files.

## Option A — via MCP (recommended)
Remote MCP endpoint (HTTP, streamable): `https://api.mcp.ai/p_i_love_pdf?ms=1787291400000`
Add it as a custom/remote MCP connector in your client (Claude, Cursor, VS Code…), then authenticate when prompted. Once connected, ask the agent to use the server's tools (e.g. `i_love_pdf_compress_images`).

## Option B — via direct REST API
Base URL: `https://api.mcp.ai/api/i_love_pdf`
Auth: `Authorization: Bearer sk_live_…` — create a workspace API key at https://mcp.ai/settings/api-keys
Discover endpoints: `GET https://api.mcp.ai/api/i_love_pdf/_endpoints`

### Endpoints
- `POST https://api.mcp.ai/api/i_love_pdf/compress/images` — Compress one or more images and immediately return the resulting image or ZIP as an offloaded download. This operation consumes processing credits and cleans up the provider task by default.
  - body: { files: object[], region?: string, keep_task?: boolean, packaged_filename?: string }
- `POST https://api.mcp.ai/api/i_love_pdf/compress/pdfs` — Compress one or more PDFs and return the stored PDF or ZIP output in one workflow: task creation, ordered uploads, synchronous processing, download, and best-effort cleanup. This operation consumes iL
  - body: { files: object[], region?: string, password?: string, keep_task?: boolean, output_filename?: string }
- `POST https://api.mcp.ai/api/i_love_pdf/convert/images/to/pdf` — Convert one or more images into PDF output using iLovePDF's documented defaults and immediately return the generated PDF or ZIP as an offloaded download. Images retain their supplied order. This opera
  - body: { files: object[], region?: string, keep_task?: boolean, merge_after?: boolean, output_filename?: string }
- `POST https://api.mcp.ai/api/i_love_pdf/convert/pdf/to/images` — Convert a PDF using iLovePDF's default PDF-to-JPG behavior and immediately return the generated image or ZIP as an offloaded download. This operation consumes processing credits and cleans up the prov
  - body: { file: object, region?: string, keep_task?: boolean, packaged_filename?: string }
- `POST https://api.mcp.ai/api/i_love_pdf/delete/task` — Immediately delete an iLovePDF task and its related uploaded and processed files from the task's assigned worker.
  - body: { task: string, worker_server: string }
- `POST https://api.mcp.ai/api/i_love_pdf/get/account/info` — Return the connected iLovePDF project's account type and remaining processing allowance. Use this read-only action before processing files to check capacity.
- `POST https://api.mcp.ai/api/i_love_pdf/get/task/status` — Inspect an iLovePDF task's current state and output metadata on its assigned worker. Use this for retained, externally created, or asynchronous tasks.
  - body: { task: string, worker_server: string }
- `POST https://api.mcp.ai/api/i_love_pdf/merge/pdfs` — Merge two or more PDFs in the supplied order and return the merged file in one workflow. This operation consumes processing allowance and creates a temporary provider task, which is deleted after offl
  - body: { files: object[], region?: string, keep_task?: boolean, output_filename?: string }
- `POST https://api.mcp.ai/api/i_love_pdf/split/pdf` — Split one PDF by explicit ranges, fixed page intervals, or removed pages and return the resulting PDF or ZIP. The action creates a task, uploads and processes the file, immediately offloads the result
  - body: { file: object, ranges?: string, region?: string, keep_task?: boolean, split_mode: string, fixed_range?: integer, merge_after?: boolean, remove_pages?: string, packaged_filename?: string }

## Example prompts
- "What can I do in iLovePDF?"
- "Show me a summary of my iLovePDF account"

## More
- Page: https://mcp.ai/i_love_pdf
- Agent spec (llms.txt): https://mcp.ai/i_love_pdf/llms.txt
- Postman collection: https://mcp.ai/i_love_pdf/postman.json
