MostlyPDF API reference

38 PDF operations behind one endpoint. Send base64 files, name a tool, get base64 files back. One billable operation per call — no per-operation credit weighting, no separate URL to learn per tool.

EndpointPOST /v1/process
AuthBearer sk_ key
Operations38
PricingFlat metered, 1 op per call

Authentication

Every request carries your secret key as a bearer token. Keys start with sk_ and are created in your dashboard. The x-api-key header is accepted as an alternative for clients that cannot set Authorization.

Authorization: Bearer sk_live_your_key

The request

One POST to https://mostly-pdf.web.app/v1/process with a JSON body of three fields:

FieldTypeRequiredWhat it is
toolstringyesWhich operation to run — any slug from the table below.
filesstring[]yesInput file(s), base64-encoded. Multi-file operations take several.
optionsobjectnoOperation-specific settings, e.g. {"degrees":90} or {"ranges":["1-3","5"]}.

The response returns outputs: an array of base64 result files, in the same order the operation produces them.

curl

curl -X POST https://mostly-pdf.web.app/v1/process \
  -H "Authorization: Bearer sk_live_your_key" \
  -H "Content-Type: application/json" \
  -d '{
    "tool": "merge-pdf",
    "files": ["<base64 of first.pdf>", "<base64 of second.pdf>"]
  }'

JavaScript (Node)

const res = await fetch("https://mostly-pdf.web.app/v1/process", {
  method: "POST",
  headers: {
    "Authorization": `Bearer ${process.env.MOSTLYPDF_KEY}`,
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
    tool: "rotate-pdf",
    options: { degrees: 90 },
    files: [Buffer.from(await fs.readFile("in.pdf")).toString("base64")],
  }),
});
const { outputs } = await res.json();
await fs.writeFile("out.pdf", Buffer.from(outputs[0], "base64"));

Python

import base64, os, requests

with open("in.pdf", "rb") as f:
    payload = base64.b64encode(f.read()).decode()

r = requests.post(
    "https://mostly-pdf.web.app/v1/process",
    headers={"Authorization": f"Bearer {os.environ['MOSTLYPDF_KEY']}"},
    json={"tool": "compress-pdf", "files": [payload]},
    timeout=120,
)
r.raise_for_status()
with open("out.pdf", "wb") as f:
    f.write(base64.b64decode(r.json()["outputs"][0]))

All 38 operations

Pass any slug below as the tool field. Free operations run without a paid plan; where a daily free allowance applies it is listed. Operations marked conversion service run server-side and are the ones that return 501 if that service is not enabled on your account.

slugOperationInput filesTierFree allowanceRuns on
chat-with-pdf Chat with PDF one file Pro unlimited ai
compare-pdf Compare PDF two or more Free unlimited conversion service
compress-pdf Compress PDF one file Free unlimited conversion service
crop-pdf Crop PDF one file Free unlimited in-browser engine
email-to-pdf Email to PDF render Free unlimited render
excel-to-pdf Excel to PDF one file Free unlimited conversion service
extract-pages Extract Pages one file Free unlimited in-browser engine
fill-pdf-form Fill PDF Form one file Free unlimited in-browser engine
html-to-pdf HTML to PDF render Free unlimited render
jpg-to-pdf JPG to PDF two or more Free unlimited in-browser engine
markdown-to-pdf Markdown to PDF render Free unlimited render
merge-pdf Merge PDF two or more Free unlimited in-browser engine
ocr-pdf OCR PDF one file Pro unlimited conversion service
odt-to-pdf ODT to PDF one file Free unlimited conversion service
organize-pdf Organize PDF one file Free unlimited in-browser engine
page-numbers Add Page Numbers one file Free unlimited in-browser engine
pdf-to-excel PDF to Excel one file Pro unlimited conversion service
pdf-to-jpg PDF to JPG one file Free unlimited conversion service
pdf-to-pdfa PDF to PDF/A one file Free unlimited conversion service
pdf-to-powerpoint PDF to PowerPoint one file Pro unlimited conversion service
pdf-to-word PDF to Word one file Pro unlimited conversion service
powerpoint-to-pdf PowerPoint to PDF one file Free unlimited conversion service
protect-pdf Protect PDF one file Free unlimited conversion service
redact-pdf Redact PDF one file Pro unlimited conversion service
remove-pages Remove Pages one file Free unlimited in-browser engine
repair-pdf Repair PDF one file Free unlimited conversion service
request-signature Request Signature one file Pro one free envelope every month with a Mostly Tiny account/day workflow
rotate-pdf Rotate PDF one file Free unlimited in-browser engine
rtf-to-pdf RTF to PDF one file Free unlimited conversion service
sign-pdf Sign PDF one file Pro unlimited in-browser engine
sign-pdf-certified Certify PDF (digital signature) one file Pro unlimited in-browser engine
split-pdf Split PDF one file Free unlimited in-browser engine
summarize-pdf Summarize PDF one file Pro unlimited ai
txt-to-pdf TXT to PDF one file Free unlimited conversion service
unlock-pdf Unlock PDF one file Free unlimited conversion service
url-to-pdf Webpage to PDF render Free unlimited render
watermark-pdf Watermark PDF one file Free unlimited in-browser engine
word-to-pdf Word to PDF one file Free unlimited conversion service

Errors

Errors return a JSON body with a machine-readable error field and an HTTP status:

StatusMeaning
200Processed
400Invalid argument
401Missing/invalid API key
403Key lacks scope
501Tool needs the conversion service (not enabled)

Try it

The interactive explorer below is generated from the same OpenAPI document that powers this page — you can also point your own client or an MCP server straight at it.

A Mostly Tiny product · all PDF tools