Filezaro

API documentation

Overview

The Filezaro API is a REST API with JSON answers. Base address: https://filezaro.com/api/v1. Working with a file takes three calls: announce the file and upload its bytes, start a job, then read the result. Jobs run in the background, so there are no timeouts, even for large files.

The API is part of the Pro plan. A machine-readable description is available as OpenAPI 3.0.

Authentication

Create a key in Dashboard → API keys and send it with every request:

Header
Authorization: Bearer fz_live_...

X-API-Key: fz_live_... is accepted as well. Keys are never read from the URL. A key is shown once when it is created; we store only a fingerprint. Revoking a key stops it immediately. The key acts as your account: its files, jobs and limits are yours. If your Pro plan ends, the API stops working until Pro is active again.

Try it: curl https://filezaro.com/api/v1/me -H "Authorization: Bearer $FILEZARO_API_KEY"

Quick start

The same five steps in three languages. Replace the key with yours.

curl
export FILEZARO_API_KEY="fz_live_..."          # your key (Dashboard → API keys)
BASE="https://filezaro.com/api/v1"

# 1) Announce the file and get an upload address
curl -s -X POST "$BASE/files" \
  -H "Authorization: Bearer $FILEZARO_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"filename":"report.pdf","contentType":"application/pdf","sizeBytes":482113}'
# -> {"id":"clx...","upload":{"url":"https://...","headers":{"Content-Type":"application/pdf"}}, ...}

# 2) Upload the bytes (same Content-Type as announced)
curl -X PUT "<upload.url from step 1>" \
  -H "Content-Type: application/pdf" \
  --data-binary @report.pdf

# 3) Start the job (the Idempotency-Key makes a retry safe)
curl -s -X POST "$BASE/jobs" \
  -H "Authorization: Bearer $FILEZARO_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: $(uuidgen)" \
  -d '{"tool":"compress-pdf","fileId":"<id from step 1>","options":{"mode":"level","level":"recommended"}}'
# -> 202 {"id":"clj...","status":"queued", ...}

# 4) Ask for the status until it says "completed" (or "failed")
curl -s "$BASE/jobs/<job id>" -H "Authorization: Bearer $FILEZARO_API_KEY"

# 5) Download the result (-L follows the redirect)
curl -L -o report-compressed.pdf "$BASE/jobs/<job id>/download" \
  -H "Authorization: Bearer $FILEZARO_API_KEY"
Node.js
// Node.js 18+ (built-in fetch). Run on your SERVER, never in a browser.
import { readFile, writeFile } from "node:fs/promises"
import { randomUUID } from "node:crypto"

const BASE = "https://filezaro.com/api/v1"
const KEY = process.env.FILEZARO_API_KEY

async function api(path, init = {}) {
  const res = await fetch(BASE + path, {
    ...init,
    headers: { Authorization: `Bearer ${KEY}`, "Content-Type": "application/json", ...init.headers },
  })
  if (res.status === 429) {
    const wait = Number(res.headers.get("Retry-After") ?? 1)
    await new Promise((r) => setTimeout(r, wait * 1000))
    return api(path, init) // wait and retry
  }
  const body = res.status === 204 ? null : await res.json()
  if (!res.ok) throw new Error(`${body.error.code}: ${body.error.message} (${body.error.requestId})`)
  return body
}

const bytes = await readFile("report.pdf")

// 1) announce + 2) upload
const file = await api("/files", {
  method: "POST",
  body: JSON.stringify({ filename: "report.pdf", contentType: "application/pdf", sizeBytes: bytes.length }),
})
const put = await fetch(file.upload.url, { method: "PUT", headers: file.upload.headers, body: bytes })
if (!put.ok) throw new Error("Upload failed: " + put.status)

// 3) start the job
let job = await api("/jobs", {
  method: "POST",
  headers: { "Idempotency-Key": randomUUID() },
  body: JSON.stringify({ tool: "compress-pdf", fileId: file.id, options: { mode: "level", level: "recommended" } }),
})

// 4) wait
while (job.status === "queued" || job.status === "processing") {
  await new Promise((r) => setTimeout(r, 2000))
  job = await api(`/jobs/${job.id}`)
}
if (job.status !== "completed") throw new Error(job.error?.message ?? job.status)

// 5) download
const result = await fetch(job.result.file.download.url)
await writeFile(job.result.file.name, Buffer.from(await result.arrayBuffer()))
console.log("Saved", job.result.file.name)
Python
# Python 3.9+  (pip install requests)
import os, time, uuid, requests

BASE = "https://filezaro.com/api/v1"
HEADERS = {"Authorization": f"Bearer {os.environ['FILEZARO_API_KEY']}"}

def api(method, path, **kwargs):
    while True:
        r = requests.request(method, BASE + path, headers={**HEADERS, **kwargs.pop("headers", {})}, **kwargs)
        if r.status_code == 429:                       # rate limited: wait, then retry
            time.sleep(int(r.headers.get("Retry-After", 1)))
            continue
        body = r.json()
        if not r.ok:
            e = body["error"]
            raise RuntimeError(f"{e['code']}: {e['message']} ({e['requestId']})")
        return body

data = open("report.pdf", "rb").read()

# 1) announce + 2) upload
f = api("POST", "/files", json={"filename": "report.pdf", "contentType": "application/pdf", "sizeBytes": len(data)})
requests.put(f["upload"]["url"], data=data, headers=f["upload"]["headers"]).raise_for_status()

# 3) start the job
job = api("POST", "/jobs", headers={"Idempotency-Key": str(uuid.uuid4())},
          json={"tool": "compress-pdf", "fileId": f["id"], "options": {"mode": "level", "level": "recommended"}})

# 4) wait
while job["status"] in ("queued", "processing"):
    time.sleep(2)
    job = api("GET", f"/jobs/{job['id']}")
if job["status"] != "completed":
    raise RuntimeError(job.get("error", {}).get("message", job["status"]))

# 5) download
out = requests.get(job["result"]["file"]["download"]["url"])
open(job["result"]["file"]["name"], "wb").write(out.content)

A finished job looks like this:

GET /api/v1/jobs/{id}
{
  "id": "clx9k2m4a0001abcd",
  "object": "job",
  "tool": "compress-pdf",
  "status": "completed",
  "createdAt": "2026-11-17T09:30:12.000Z",
  "updatedAt": "2026-11-17T09:30:19.000Z",
  "fileIds": ["clx9k2l9z0000abcd"],
  "options": { "mode": "level", "level": "recommended" },
  "error": null,
  "result": {
    "file": {
      "name": "report-compressed.pdf",
      "size": 190342,
      "contentType": "application/pdf",
      "download": { "url": "https://…", "expiresInSeconds": 600 }
    },
    "text": null,
    "hasText": false,
    "info": { "achievedBytes": 190342, "originalBytes": 482113 }
  }
}

Job status: queued → processing → completed, or failed (see error.message), cancelled, expired (the result was deleted after its retention period). Poll every 1–3 seconds; most jobs finish in seconds.

Conventions

  • Uploads: POST /files returns upload.url, valid 15 minutes. Send the bytes with PUT and exactly the Content-Type you announced.
  • Downloads: result.file.download.url is valid 10 minutes; ask the job again for a fresh one. GET /jobs/{id}/download redirects to it.
  • Idempotency: send Idempotency-Key: <unique text> on POST /jobs. The same key returns the same job (status 200, header Idempotent-Replayed: true) instead of creating another. Reusing a key for a different request is an error.
  • Pagination: list endpoints return data, hasMore and nextCursor. Pass nextCursor as cursor to get the next page.
  • Request id: every answer has an X-Request-Id header (also in error bodies). Quote it when you contact support.
  • CORS: enabled, because the API uses keys, not cookies. That does not mean you should call it from a browser: a key in web page code is a leaked key.
  • Languages: text is UTF-8 everywhere. File names keep their letters; every tool handles Bengali, Hindi, Arabic, Hebrew, Chinese, Japanese, Korean, Thai and more.
  • Retention: uploads and results are deleted automatically after your plan's history period (Pro: 30 days). Delete earlier with DELETE /jobs/{id}.
  • Scope: /jobs shows jobs created through the API. Jobs you started on the website are in your dashboard history.

Limits

LimitProWhat happens when reached
Requests per minute120429 rate_limited with Retry-After
Jobs per 24 hours (rolling)1,000429 quota_exceeded with Retry-After
Jobs running at the same time10429 too_many_active_jobs
File size, pages, storageSame as Pro on the websiteSee GET /me → limits

Limits count for the whole account, not per key. Every answer carries X-RateLimit-Limit, X-RateLimit-Remaining and X-RateLimit-Reset (Unix seconds). Failed jobs do not use up the daily limit. Too many requests with a wrong key from one address are also answered with 429.

Endpoints

GET/api/v1/me

Account, limits and usage

Returns the plan behind the key, the limits that apply to you (file size, pages, rate limit, daily jobs) and what you have used so far. A good first call to test a new key.

Success: 200 — The account object.

GET/api/v1/toolsno key needed

List tools

Every tool with its accepted file types, options (names, types, allowed values, defaults) and an example request. No API key needed.

Success: 200 — A list of tool objects.

GET/api/v1/tools/{id}no key needed

Get one tool

One tool, e.g. `compress-pdf`. No API key needed.

Success: 200 — A tool object. Typical errors: not_found

POST/api/v1/files

Create a file and get an upload address

Step 1 of every job. Tell us the file name, type and size; you get back a file id and a one-time `upload.url`. Send the file bytes there with `PUT` and the same `Content-Type` header. The bytes go straight to storage, not through our servers.

Body fieldTypeDescription
filename*stringFile name, up to 255 characters (any language).
contentType*stringimage/png, image/jpeg, image/webp, application/pdf, text/plain, text/markdown, text/html or the .docx type.
sizeBytes*integerExact size of the file in bytes (at most your plan's limit).

Success: 201 — A file object with `upload` (method, url, headers). Typical errors: payload_too_large, storage_full, unsupported_media_type

GET/api/v1/files/{id}

Check an uploaded file

Returns the file and `uploaded: true` once the bytes have arrived in storage.

Success: 200 — A file object. Typical errors: not_found, file_expired

POST/api/v1/jobs

Start a job

Step 2. Runs one tool on files you uploaded. Single-file tools take `fileId`; Merge PDF and Images to PDF take `fileIds` (in the order you want). The job runs in the background: you get `202 Accepted` and poll `GET /jobs/{id}`. Send an `Idempotency-Key` header to make retries safe.

Body fieldTypeDescription
tool*stringA tool id from GET /tools, e.g. compress-pdf.
fileIdstringInput file (single-file tools).
fileIdsstring[]Input files in order (Merge PDF, Images to PDF).
optionsobjectTool options. Unknown option names are rejected.

Success: 202 — A job object with status `queued` (200 when an Idempotency-Key replays an earlier job). Typical errors: invalid_request, not_found, file_not_uploaded, file_expired, unsupported_media_type, too_many_active_jobs, quota_exceeded, idempotency_key_reused

GET/api/v1/jobs

List jobs

Your API jobs, newest first, in pages. Pass `nextCursor` from one answer as `cursor` of the next request.

Query parameterTypeDescription
limitinteger1–100, default 20.
cursorstring`nextCursor` of the previous page.
statusstringqueued, processing, completed, failed, cancelled or expired.
toolstringOnly jobs of this tool.

Success: 200 — A list: `data`, `hasMore`, `nextCursor`.

GET/api/v1/jobs/{id}

Get a job

Status and result. When `status` is `completed`, `result.file.download.url` is a fresh address valid for 10 minutes; text results (OCR, AI summary) are in `result.text`.

Success: 200 — A job object. Typical errors: not_found

GET/api/v1/jobs/{id}/download

Download the result

Redirects (302) to a 10-minute download address — use `curl -L`. Text-only results (OCR) are returned as a UTF-8 .txt file.

Success: 302 — Redirect to the file (or 200 with the text). Typical errors: not_found, conflict, file_expired

DELETE/api/v1/jobs/{id}

Delete a job and its files

Removes the result and, when nothing else uses it, the uploaded original. Frees cloud storage. A running job cannot be deleted.

Success: 200 — `{ id, object: "job", deleted: true }`. Typical errors: not_found, conflict

GET/api/v1/openapi.jsonno key needed

OpenAPI description

The whole API as an OpenAPI 3.0 file. Import it into Postman or Insomnia, or generate a client library from it. No API key needed.

Success: 200 — An OpenAPI 3.0 document.

Tools & options

Use the tool id as "tool" in POST /jobs. Options not listed here are rejected; options you leave out use their default. The live version of this list is GET /tools.

JPG to PNG

jpg-to-png

Convert an image to PNG.

Input: one file in "fileId" — image/png, image/jpeg, image/webp

Result: A PNG image.

OptionTypeAllowed / defaultDescription
backgroundColorstringFill colour for transparent areas, as "#RRGGBB" (matters when the result cannot be transparent, e.g. JPG).

Fixed by this tool: {"targetFormat":"png"}

POST /api/v1/jobs
{
  "tool": "jpg-to-png",
  "fileId": "<file id>",
  "options": {}
}

PNG to JPG

png-to-jpg

Convert an image to JPG.

Input: one file in "fileId" — image/png, image/jpeg, image/webp

Result: A JPG image.

OptionTypeAllowed / defaultDescription
backgroundColorstringFill colour for transparent areas, as "#RRGGBB" (matters when the result cannot be transparent, e.g. JPG).

Fixed by this tool: {"targetFormat":"jpg"}

POST /api/v1/jobs
{
  "tool": "png-to-jpg",
  "fileId": "<file id>",
  "options": {
    "backgroundColor": "#ffffff"
  }
}

WebP Converter

webp-converter

Convert an image to or from WebP.

Input: one file in "fileId" — image/png, image/jpeg, image/webp

Result: An image in the chosen format.

OptionTypeAllowed / defaultDescription
targetFormat*stringone of png, jpg, webpThe format of the result.
backgroundColorstringFill colour for transparent areas, as "#RRGGBB" (matters when the result cannot be transparent, e.g. JPG).
POST /api/v1/jobs
{
  "tool": "webp-converter",
  "fileId": "<file id>",
  "options": {
    "targetFormat": "webp"
  }
}

Compress Image

compress-image

Make an image smaller, by quality or down to a target file size.

Input: one file in "fileId" — image/png, image/jpeg, image/webp

Result: The compressed image (same format family).

OptionTypeAllowed / defaultDescription
mode*stringone of quality, target-size"quality" uses `quality`; "target-size" shrinks the image to about `targetBytes`.
qualityinteger1–100 (required when mode is "quality")Quality, 1 (smallest) to 100 (best).
targetBytesinteger1024–209715200 (required when mode is "target-size")Wanted size in bytes (e.g. 102400 = 100 KB).
POST /api/v1/jobs
{
  "tool": "compress-image",
  "fileId": "<file id>",
  "options": {
    "mode": "quality",
    "quality": 75
  }
}

Resize Image

resize-image

Resize an image to exact dimensions or by percentage.

Input: one file in "fileId" — image/png, image/jpeg, image/webp

Result: The resized image. At least one of width, height or percentage is required.

OptionTypeAllowed / defaultDescription
widthinteger1–10000New width in pixels.
heightinteger1–10000New height in pixels.
percentagenumber1–100Scale to this percent of the original size.
maintainAspectRatiobooleandefault trueKeep the proportions when only one of width/height is used.
formatstringone of png, jpg, webpAlso convert to this format (default: keep the format).
POST /api/v1/jobs
{
  "tool": "resize-image",
  "fileId": "<file id>",
  "options": {
    "width": 800,
    "maintainAspectRatio": true
  }
}

Image to Text (OCR)

image-to-text

Read the text in a picture (OCR).

Input: one file in "fileId" — image/png, image/jpeg, image/webp

Result: The text, in `result.text`. GET /jobs/{id}/download returns it as a .txt file.

OptionTypeAllowed / defaultDescription
languagestringdefault autoReading language. Leave it out (or "auto") and the language is detected from the picture — Bengali, Hindi, Arabic, Chinese, Russian and many more, even several scripts on one page. To force it, send Tesseract codes joined with "+", e.g. "ben" or "ben+eng" (up to 4).
POST /api/v1/jobs
{
  "tool": "image-to-text",
  "fileId": "<file id>",
  "options": {}
}

Remove Background

remove-background

Remove the background of an image.

Input: one file in "fileId" — image/png, image/jpeg, image/webp

Result: A PNG with a transparent background.

No options.

POST /api/v1/jobs
{
  "tool": "remove-background",
  "fileId": "<file id>",
  "options": {}
}

Remove Metadata

remove-metadata

Strip EXIF / GPS and other metadata from an image.

Input: one file in "fileId" — image/png, image/jpeg, image/webp

Result: The image without metadata.

No options.

POST /api/v1/jobs
{
  "tool": "remove-metadata",
  "fileId": "<file id>",
  "options": {}
}

PDF to Text

pdf-to-text

Extract the text of a PDF (scanned or damaged pages are read with OCR).

Input: one file in "fileId" — application/pdf

Result: A UTF-8 .txt file.

OptionTypeAllowed / defaultDescription
preserveLayoutbooleandefault falseTry to keep the columns/spacing of the page.
POST /api/v1/jobs
{
  "tool": "pdf-to-text",
  "fileId": "<file id>",
  "options": {
    "preserveLayout": false
  }
}

PDF to Images

pdf-to-images

Render PDF pages as images.

Input: one file in "fileId" — application/pdf

Result: One image, or a .zip when there are several pages.

OptionTypeAllowed / defaultDescription
formatstringone of png, jpg; default pngImage format.
dpiintegerone of 72, 100, 150, 200, 300; default 150Resolution in pixels per inch.
pagesstringdefault allPages to render: "all" or a list such as "1-3,5,8-".
POST /api/v1/jobs
{
  "tool": "pdf-to-images",
  "fileId": "<file id>",
  "options": {
    "format": "png",
    "dpi": 150,
    "pages": "1-3"
  }
}

Images to PDF

images-to-pdf

Combine several images into one PDF (in the order of `fileIds`).

Input: several files in "fileIds" (at least 1, in the order you want) — image/png, image/jpeg, image/webp

Result: One PDF.

OptionTypeAllowed / defaultDescription
pageSizestringone of fit, a4, letter; default a4"fit" makes every page as big as its image.
orientationstringone of auto, portrait, landscape; default autoPage orientation.
marginstringone of none, small, medium; default smallPage margin.
POST /api/v1/jobs
{
  "tool": "images-to-pdf",
  "fileIds": [
    "<file id>",
    "<file id>"
  ],
  "options": {
    "pageSize": "a4",
    "orientation": "auto",
    "margin": "small"
  }
}

PDF to Word

pdf-to-word

Convert a PDF to an editable Word (.docx) document.

Input: one file in "fileId" — application/pdf

Result: A .docx file. Fidelity is never perfect for complex layouts.

No options.

POST /api/v1/jobs
{
  "tool": "pdf-to-word",
  "fileId": "<file id>",
  "options": {}
}

Merge PDF

merge-pdf

Combine several PDFs into one (in the order of `fileIds`).

Input: several files in "fileIds" (at least 2, in the order you want) — application/pdf

Result: One PDF.

No options.

POST /api/v1/jobs
{
  "tool": "merge-pdf",
  "fileIds": [
    "<file id>",
    "<file id>"
  ],
  "options": {}
}

Split PDF

split-pdf

Split a PDF by page ranges, every N pages, or one file per page.

Input: one file in "fileId" — application/pdf

Result: One PDF, or a .zip when there are several parts.

OptionTypeAllowed / defaultDescription
mode*stringone of ranges, extract, every, each"ranges": every range becomes its own PDF. "extract": all chosen pages go into ONE new PDF. "every": a new PDF every N pages. "each": one PDF per page.
rangesstring (required when mode is "ranges" or "extract")Page ranges such as "1-3,5,8-".
everyinteger1–1000 (required when mode is "every")Pages per part.
POST /api/v1/jobs
{
  "tool": "split-pdf",
  "fileId": "<file id>",
  "options": {
    "mode": "ranges",
    "ranges": "1-3,5"
  }
}

Compress PDF

compress-pdf

Make a PDF smaller, by level or down to a target size.

Input: one file in "fileId" — application/pdf

Result: The smaller PDF (or the original with a note when compression would damage its text).

OptionTypeAllowed / defaultDescription
mode*stringone of level, target-size"level" uses `level`; "target-size" uses `targetBytes`.
levelstringone of low, recommended, strong (required when mode is "level")How hard to compress.
targetBytesinteger10240–209715200 (required when mode is "target-size")Wanted size in bytes.
POST /api/v1/jobs
{
  "tool": "compress-pdf",
  "fileId": "<file id>",
  "options": {
    "mode": "level",
    "level": "recommended"
  }
}

TXT to PDF

txt-to-pdf

Turn a plain-text file into a PDF (every language, right-to-left included).

Input: one file in "fileId" — text/plain

Result: A PDF.

OptionTypeAllowed / defaultDescription
pageSizestringone of a4, letter, legal; default a4Paper size.
orientationstringone of portrait, landscape; default portraitPage orientation.
marginstringone of none, small, medium, large; default mediumPage margin.
pageNumbersbooleandefault falsePrint “1 / 5” page numbers at the bottom of every page.
fontFamilystringone of sans, serif, monospace; default sansFont style.
fontSizeinteger8–24; default 11Font size in points.
POST /api/v1/jobs
{
  "tool": "txt-to-pdf",
  "fileId": "<file id>",
  "options": {
    "pageSize": "a4",
    "fontFamily": "serif",
    "fontSize": 12
  }
}

DOCX to PDF

docx-to-pdf

Convert a Word .docx file to PDF. Every layout value defaults to "original" (the document as its author made it).

Input: one file in "fileId" — application/vnd.openxmlformats-officedocument.wordprocessingml.document

Result: A PDF.

OptionTypeAllowed / defaultDescription
pageSizestringone of original, a4, letter, legal; default originalPaper size.
orientationstringone of original, portrait, landscape; default originalPage orientation.
marginstringone of original, none, small, medium, large; default originalPage margin.
fontFamilystringone of original, sans, serif, monospace; default originalBody font style.
fontSizeinteger or "original"6–36; default originalBody text size in points, or "original".
pageNumbersbooleandefault falsePrint “1 / 5” page numbers at the bottom of every page.
POST /api/v1/jobs
{
  "tool": "docx-to-pdf",
  "fileId": "<file id>",
  "options": {}
}

Markdown to PDF

markdown-to-pdf

Turn a Markdown (.md) or text file into a styled PDF.

Input: one file in "fileId" — text/markdown, text/plain

Result: A PDF.

OptionTypeAllowed / defaultDescription
pageSizestringone of a4, letter, legal; default a4Paper size.
orientationstringone of portrait, landscape; default portraitPage orientation.
marginstringone of none, small, medium, large; default mediumPage margin.
pageNumbersbooleandefault falsePrint “1 / 5” page numbers at the bottom of every page.
themestringone of clean, serif; default cleanLook of the document.
POST /api/v1/jobs
{
  "tool": "markdown-to-pdf",
  "fileId": "<file id>",
  "options": {
    "theme": "clean"
  }
}

HTML to PDF

html-to-pdf

Print an HTML file to PDF. Scripts and external resources (images, CSS from the internet) are intentionally not loaded.

Input: one file in "fileId" — text/html

Result: A PDF.

OptionTypeAllowed / defaultDescription
pageSizestringone of a4, letter, legal; default a4Paper size.
orientationstringone of portrait, landscape; default portraitPage orientation.
marginstringone of none, small, medium, large; default mediumPage margin.
pageNumbersbooleandefault falsePrint “1 / 5” page numbers at the bottom of every page.
printBackgroundbooleandefault truePrint background colours and images.
POST /api/v1/jobs
{
  "tool": "html-to-pdf",
  "fileId": "<file id>",
  "options": {
    "printBackground": true
  }
}

Text to DOCX

text-to-docx

Turn a plain-text file into a Word document (every script gets a font that contains its letters).

Input: one file in "fileId" — text/plain

Result: A .docx file.

OptionTypeAllowed / defaultDescription
fontFamilystringone of Calibri, Arial, Times New Roman, Courier New; default CalibriFont for Latin, Cyrillic and Greek text.
fontSizeinteger8–32; default 11Font size in points.
lineSpacingnumberone of 1, 1.15, 1.5, 2; default 1.15Line spacing.
pageSizestringone of a4, letter; default a4Paper size.
marginstringone of narrow, normal, wide; default normalPage margin.
paragraphsstringone of blank-line, every-line; default blank-line"blank-line": an empty line starts a new paragraph. "every-line": every line is a paragraph.
firstLineIsTitlebooleandefault falseFormat the first line as a title.
POST /api/v1/jobs
{
  "tool": "text-to-docx",
  "fileId": "<file id>",
  "options": {
    "fontFamily": "Calibri",
    "fontSize": 12,
    "firstLineIsTitle": true
  }
}

OCR (images & scanned PDFs)

ocr

Read the text of an image or of a PDF (text pages are copied, scanned pages are read with OCR).

Input: one file in "fileId" — image/png, image/jpeg, image/webp, application/pdf

Result: The text, in `result.text`. GET /jobs/{id}/download returns it as a .txt file.

OptionTypeAllowed / defaultDescription
languagestringdefault autoReading language. Leave it out (or "auto") and the language is detected from the picture — Bengali, Hindi, Arabic, Chinese, Russian and many more, even several scripts on one page. To force it, send Tesseract codes joined with "+", e.g. "ben" or "ben+eng" (up to 4).
modestringone of auto, force; default autoPDF only. "auto" uses the text layer where a page has one; "force" runs OCR on every page.
pageMarkersbooleandefault falsePut a "--- Page 3 ---" line before the text of each PDF page.
POST /api/v1/jobs
{
  "tool": "ocr",
  "fileId": "<file id>",
  "options": {
    "mode": "auto",
    "pageMarkers": true
  }
}

AI PDF Summary

pdf-summary

Summarise a PDF with AI. The PDF text is sent to the AI service configured on the server.

Input: one file in "fileId" — application/pdf

Result: The summary as Markdown in `result.text` and as a UTF-8 .txt file.

OptionTypeAllowed / defaultDescription
lengthstringone of short, medium, detailed; default mediumAbout 100 / 250 / 600 words.
formatstringone of standard, bullets, executive; default standardLayout of the summary.
languagestringdefault auto"auto" = the language of the document, or one of: en, bn, hi, ur, ar, fa, he, tr, id, ms, vi, th, zh-Hans, zh-Hant, ja, ko, es, fr, de, it, pt, ru, uk, pl, nl, el, sv, da, fi, cs, ro, hu, ta, te, mr, gu, pa, ne, si, km, my, sw, fil.
focusstring–300Optional wish about emphasis, e.g. "focus on costs" (up to 300 characters).
POST /api/v1/jobs
{
  "tool": "pdf-summary",
  "fileId": "<file id>",
  "options": {
    "length": "short",
    "format": "bullets",
    "language": "auto"
  }
}

Errors

Failed requests use a normal HTTP status and a JSON body with a stable code:

400 Bad Request
{
  "error": {
    "code": "invalid_request",
    "message": "Choose a compression level or a target size",
    "details": [{ "path": "options", "message": "Choose a compression level or a target size" }],
    "requestId": "req_3f9a1c0d7be2415a90"
  }
}
CodeStatusMeaning
invalid_request400The request is malformed or an option is wrong. `error.details` lists the fields.
unauthorized401No API key was sent.
invalid_api_key401The key does not exist.
api_key_revoked401The key was revoked in the dashboard.
api_key_expired401The key passed its expiry date.
plan_required403The account is not on Pro (anymore), or the plan does not allow this many files.
not_found404The file, job or tool does not exist (or belongs to somebody else).
conflict409The job is not in the right state (still running / not completed).
file_not_uploaded409The file was created but its bytes were not uploaded yet.
idempotency_key_reused409The Idempotency-Key belongs to a different request.
file_expired410The file or result passed its retention period and was deleted.
payload_too_large413The file is bigger than your plan allows.
storage_full413Your cloud storage is full.
unsupported_media_type415The file type does not fit the tool, or the body is not JSON.
rate_limited429Too many requests per minute. Wait `Retry-After` seconds.
too_many_active_jobs429Too many jobs are running at once. Wait for some to finish.
quota_exceeded429The daily API job limit is used up. Wait `Retry-After` seconds.
internal_error500A bug on our side. Quote `error.requestId` to support.
service_unavailable503Processing could not be started. Retry shortly.

Retry on 429, 500 and 503 after waiting (use Retry-After when present), and always together with the same Idempotency-Key for POST /jobs. Do not retry other 4xx answers: the request itself must change.

Security tips

  • Keep keys on your server (environment variables). Never ship one in a web page, mobile app or public repository.
  • Use one key per application, so you can revoke one without breaking the others. Set an expiry for temporary work.
  • If a key may have leaked, revoke it in the dashboard at once — it stops working immediately — and create a new one.
  • Uploaded files are private: only your keys and your account can read them. See Privacy Policy and Acceptable Use Policy; the AI summary tool sends PDF text to an AI service.