# SDKs and tools

Official FynePDF SDKs for Node.js and Python, the OpenAPI spec, a Postman collection, and a local MCP server.

The SDKs are typed from the API's own spec and do the fiddly parts for you: uploads of any size, retries that never charge twice, waiting for jobs and checking webhooks.

## Node.js

```bash
npm install fynepdf
```

```js
import FynePDF from "fynepdf";

const fyne = new FynePDF(); // reads FYNEPDF_API_KEY

const file = await fyne.files.upload("./report.pdf");
const job = await fyne.pdf.compress({ file_id: file.id, target_size_bytes: 5_000_000 });
await fyne.files.downloadTo(job.outputs[0], "./report-small.pdf");
```

Node 18 or newer, no dependencies. [On npm](https://www.npmjs.com/package/fynepdf)

## Python

```bash
pip install fynepdf
```

```python
from fynepdf import FynePDF

fyne = FynePDF()  # reads FYNEPDF_API_KEY

file = fyne.files.upload("report.pdf")
job = fyne.pdf.compress(file_id=file["id"], target_size_bytes=5_000_000)
fyne.files.download_to(job["outputs"][0], "report-small.pdf")
```

Python 3.9 or newer. [On PyPI](https://pypi.org/project/fynepdf/)

## What both do

- **Every action is a method:** `fyne.pdf.ocr`, `fyne.pdf.pdf_to_excel` (Node: `pdfToExcel`) and the rest, with their parameters typed. Each waits up to 30 seconds; `jobs.wait(job)` waits longer.
- **Uploads of any size:** in the request up to 25 MB, through an upload link above that. Downloads go straight to storage, so your key never leaves the API.
- **Safe retries:** rate limits, timeouts and server errors are retried, honouring `Retry-After`, and every POST carries an `Idempotency-Key`, so a retry never runs or charges twice.
- **Errors you can branch on:** `FynePDFError` with `status`, `code`, `detail` and `request_id`. See [Errors](https://fynepdf.com/developers/docs/errors).
- **Webhooks:** `verifyWebhook` / `verify_webhook` check the signature and return the event. See [Webhooks](https://fynepdf.com/developers/docs/webhooks).

## Any other language

- [OpenAPI 3.1 spec](https://fynepdf.com/developers/openapi.json), with examples, for code generators.
- [Interactive reference](https://fynepdf.com/developers/reference) to read every endpoint in one place.
- [Postman collection](https://github.com/fynepdf/fynepdf-mcp/tree/main/postman): set `apiKey`, run **Upload a file**, and every other request uses that file.

## For assistants

The [MCP server](https://fynepdf.com/developers/docs/mcp) gives Claude, ChatGPT, Cursor and others the same tools. For files on your own computer, `npx @fynepdf/mcp` runs it locally with your API key and adds `upload_local_file` and `download_file`.


---

Open this page in a browser: https://fynepdf.com/developers/docs/sdks

More: [All tools](https://fynepdf.com/tools) · [AI agents](https://fynepdf.com/ai/agents) · [llms.txt](https://fynepdf.com/llms.txt) · [Sitemap](https://fynepdf.com/sitemap.xml)
