File Conversion API
File Conversion API
/file-convert/v1/pdf_extract_text1 creditExtract text from a PDF (per page). mode=layout preserves visual alignment (pdfplumber); mode=plain is fastest. Flags likely-scanned PDFs.
| Parameter | Allowed / range | Description | |
|---|---|---|---|
| file_b64 | optional | — | The input file as base64 (data-URI prefix tolerated). Max 25MB. Provide file_b64 OR file_url. Multipart upload also works: POST the file as the 'file' form field. |
| file_url | optional | — | https URL of the input file — fetched server-side through the proxy pool; private/internal/metadata addresses are SSRF-blocked. Max 25MB. |
| filename | optional | — | Optional original filename — used only as a hint (e.g. .md detection); the real format is always sniffed from magic bytes. |
| password | optional | — | Password for encrypted PDFs. Without it an encrypted input fails cleanly with INVALID_PARAM (we never crack/bypass). |
| pages | optional | — | Page selection, 1-based: '1-3,5,9-' (open ranges OK). Default: all pages. |
| mode = plain | optional | plain · layout | plain = reading-order text; layout = whitespace-aligned text (tables stay readable). |
/file-convert/v1/pdf_metadata1 creditPDF document properties: title/author/dates/producer, page count & size, encryption flag, AcroForm field count.
| Parameter | Allowed / range | Description | |
|---|---|---|---|
| file_b64 | optional | — | The input file as base64 (data-URI prefix tolerated). Max 25MB. Provide file_b64 OR file_url. Multipart upload also works: POST the file as the 'file' form field. |
| file_url | optional | — | https URL of the input file — fetched server-side through the proxy pool; private/internal/metadata addresses are SSRF-blocked. Max 25MB. |
| filename | optional | — | Optional original filename — used only as a hint (e.g. .md detection); the real format is always sniffed from magic bytes. |
| password | optional | — | Password for encrypted PDFs. Without it an encrypted input fails cleanly with INVALID_PARAM (we never crack/bypass). |
/file-convert/v1/pdf_merge1 creditMerge 2-20 PDFs into one (input order preserved). Output delivery: each produced file ≤10MB comes inline as base64 (files[].file_b64); 10-50MB comes as a one-time download token (files[].download_path, 30min TTL); >50MB total is rejected.
| Parameter | Allowed / range | Description | |
|---|---|---|---|
| files_b64 | optional | — | Array of base64 files (max 20 total inputs). Combine freely with file_urls; base64 entries come first in the processing order. |
| file_urls | optional | — | Array of https URLs (each SSRF-guarded and fetched server-side). |
| password | optional | — | Password for encrypted PDFs. Without it an encrypted input fails cleanly with INVALID_PARAM (we never crack/bypass). |
/file-convert/v1/pdf_split1 creditSplit a PDF: pages='2-5,8' extracts those pages into one PDF; chunk_size=N splits the whole document into N-page parts (max 100 parts). Output delivery: each produced file ≤10MB comes inline as base64 (files[].file_b64); 10-50MB comes as a one-time download token (files[].download_path, 30min TTL); >50MB total is rejected.
| Parameter | Allowed / range | Description | |
|---|---|---|---|
| file_b64 | optional | — | The input file as base64 (data-URI prefix tolerated). Max 25MB. Provide file_b64 OR file_url. Multipart upload also works: POST the file as the 'file' form field. |
| file_url | optional | — | https URL of the input file — fetched server-side through the proxy pool; private/internal/metadata addresses are SSRF-blocked. Max 25MB. |
| filename | optional | — | Optional original filename — used only as a hint (e.g. .md detection); the real format is always sniffed from magic bytes. |
| password | optional | — | Password for encrypted PDFs. Without it an encrypted input fails cleanly with INVALID_PARAM (we never crack/bypass). |
| pages | optional | — | Pages to EXTRACT into a single PDF (mutually exclusive with chunk_size). |
| chunk_size | optional | 1–500 | Split into parts of N pages each (1 = one PDF per page). Ignored when 'pages' is given. |
/file-convert/v1/pdf_rotate1 creditRotate pages clockwise by 90/180/270° (all pages or a range). Output delivery: each produced file ≤10MB comes inline as base64 (files[].file_b64); 10-50MB comes as a one-time download token (files[].download_path, 30min TTL); >50MB total is rejected.
| Parameter | Allowed / range | Description | |
|---|---|---|---|
| file_b64 | optional | — | The input file as base64 (data-URI prefix tolerated). Max 25MB. Provide file_b64 OR file_url. Multipart upload also works: POST the file as the 'file' form field. |
| file_url | optional | — | https URL of the input file — fetched server-side through the proxy pool; private/internal/metadata addresses are SSRF-blocked. Max 25MB. |
| filename | optional | — | Optional original filename — used only as a hint (e.g. .md detection); the real format is always sniffed from magic bytes. |
| password | optional | — | Password for encrypted PDFs. Without it an encrypted input fails cleanly with INVALID_PARAM (we never crack/bypass). |
| pages | optional | — | Page selection, 1-based: '1-3,5,9-' (open ranges OK). Default: all pages. |
| angle = 90 | optional | 90 · 180 · 270 | Clockwise rotation angle. |
/file-convert/v1/pdf_to_images1 creditRender PDF pages to PNG/JPG/WebP (pypdfium2). Max 20 pages per call, dpi ≤ 300. Output delivery: each produced file ≤10MB comes inline as base64 (files[].file_b64); 10-50MB comes as a one-time download token (files[].download_path, 30min TTL); >50MB total is rejected.
| Parameter | Allowed / range | Description | |
|---|---|---|---|
| file_b64 | optional | — | The input file as base64 (data-URI prefix tolerated). Max 25MB. Provide file_b64 OR file_url. Multipart upload also works: POST the file as the 'file' form field. |
| file_url | optional | — | https URL of the input file — fetched server-side through the proxy pool; private/internal/metadata addresses are SSRF-blocked. Max 25MB. |
| filename | optional | — | Optional original filename — used only as a hint (e.g. .md detection); the real format is always sniffed from magic bytes. |
| password | optional | — | Password for encrypted PDFs. Without it an encrypted input fails cleanly with INVALID_PARAM (we never crack/bypass). |
| pages | optional | — | Page selection, 1-based: '1-3,5,9-' (open ranges OK). Default: all pages. |
| to = png | optional | png · jpg · webp | Image format for the rendered pages (alias: format). |
| dpi = 150 | optional | 36–300 | Render resolution (36-300). |
/file-convert/v1/images_to_pdf2 creditsCombine 1-20 images into a single PDF (one page per image; page_size=a4/letter centers each image on a standard page). Output delivery: each produced file ≤10MB comes inline as base64 (files[].file_b64); 10-50MB comes as a one-time download token (files[].download_path, 30min TTL); >50MB total is rejected.
| Parameter | Allowed / range | Description | |
|---|---|---|---|
| files_b64 | optional | — | Array of base64 files (max 20 total inputs). Combine freely with file_urls; base64 entries come first in the processing order. |
| file_urls | optional | — | Array of https URLs (each SSRF-guarded and fetched server-side). |
| file_b64 | optional | — | Single image as base64 (or use files_b64). |
| file_url | optional | — | https URL of the input file — fetched server-side through the proxy pool; private/internal/metadata addresses are SSRF-blocked. Max 25MB. |
| page_size = auto | optional | auto · a4 · letter | auto = page matches each image; a4/letter = white page, image fitted+centred. |
/file-convert/v1/pdf_watermark1 creditStamp a text or image watermark over pages (true alpha overlay; diagonal or centred). Output delivery: each produced file ≤10MB comes inline as base64 (files[].file_b64); 10-50MB comes as a one-time download token (files[].download_path, 30min TTL); >50MB total is rejected.
| Parameter | Allowed / range | Description | |
|---|---|---|---|
| file_b64 | optional | — | The input file as base64 (data-URI prefix tolerated). Max 25MB. Provide file_b64 OR file_url. Multipart upload also works: POST the file as the 'file' form field. |
| file_url | optional | — | https URL of the input file — fetched server-side through the proxy pool; private/internal/metadata addresses are SSRF-blocked. Max 25MB. |
| filename | optional | — | Optional original filename — used only as a hint (e.g. .md detection); the real format is always sniffed from magic bytes. |
| password | optional | — | Password for encrypted PDFs. Without it an encrypted input fails cleanly with INVALID_PARAM (we never crack/bypass). |
| pages | optional | — | Page selection, 1-based: '1-3,5,9-' (open ranges OK). Default: all pages. |
| text | optional | — | Watermark text (UTF-8, DejaVu font). Provide text OR image_b64/image_url. |
| image_b64 | optional | — | Watermark image as base64 (PNG with alpha recommended; scaled to ~40% page width). |
| image_url | optional | — | Watermark image URL (SSRF-guarded fetch). |
| opacity = 0.25 | optional | 0.02–1 | Watermark opacity 0.02-1.0. |
| position = diagonal | optional | diagonal · center | Text placement. |
| color = gray | optional | gray · red · black · blue | Text colour. |
| font_size | optional | 8–400 | Text size in pixels at 2× page scale (default: auto ≈ page/10). |
/file-convert/v1/pdf_fill_form1 creditAcroForm filling. Without 'fields' → lists the form fields (discovery). With 'fields' → fills and returns the PDF (NeedAppearances set). Output delivery: each produced file ≤10MB comes inline as base64 (files[].file_b64); 10-50MB comes as a one-time download token (files[].download_path, 30min TTL); >50MB total is rejected.
| Parameter | Allowed / range | Description | |
|---|---|---|---|
| file_b64 | optional | — | The input file as base64 (data-URI prefix tolerated). Max 25MB. Provide file_b64 OR file_url. Multipart upload also works: POST the file as the 'file' form field. |
| file_url | optional | — | https URL of the input file — fetched server-side through the proxy pool; private/internal/metadata addresses are SSRF-blocked. Max 25MB. |
| filename | optional | — | Optional original filename — used only as a hint (e.g. .md detection); the real format is always sniffed from magic bytes. |
| password | optional | — | Password for encrypted PDFs. Without it an encrypted input fails cleanly with INVALID_PARAM (we never crack/bypass). |
| fields | optional | — | {field_name: value} map. Checkbox values are usually /Yes — run discovery mode first. |
/file-convert/v1/pdf_redact1 creditTRUE redaction: target pages are re-rendered with the matches blacked out and REBUILT — original text/fonts/layers destroyed, then verified by re-extraction (output withheld if any remnant). Redacted pages lose selectable text. Find by 'terms' and/or explicit 'areas'. Output delivery: each produced file ≤10MB comes inline as base64 (files[].file_b64); 10-50MB comes as a one-time download token (files[].download_path, 30min TTL); >50MB total is rejected.
| Parameter | Allowed / range | Description | |
|---|---|---|---|
| file_b64 | optional | — | The input file as base64 (data-URI prefix tolerated). Max 25MB. Provide file_b64 OR file_url. Multipart upload also works: POST the file as the 'file' form field. |
| file_url | optional | — | https URL of the input file — fetched server-side through the proxy pool; private/internal/metadata addresses are SSRF-blocked. Max 25MB. |
| filename | optional | — | Optional original filename — used only as a hint (e.g. .md detection); the real format is always sniffed from magic bytes. |
| password | optional | — | Password for encrypted PDFs. Without it an encrypted input fails cleanly with INVALID_PARAM (we never crack/bypass). |
| terms | optional | — | Text terms to find & redact (case-insensitive, matched across words on a line). |
| areas | optional | — | Explicit boxes: {page, x0, y0, x1, y1} in PDF points, origin TOP-left. |
| dpi = 200 | optional | 120–300 | Rebuild resolution for redacted pages. |
/file-convert/v1/pdf_compress1 creditShrink a PDF: stream recompression + embedded-image re-encode (level=low/balanced/strong; strong also caps image resolution). Output delivery: each produced file ≤10MB comes inline as base64 (files[].file_b64); 10-50MB comes as a one-time download token (files[].download_path, 30min TTL); >50MB total is rejected.
| Parameter | Allowed / range | Description | |
|---|---|---|---|
| file_b64 | optional | — | The input file as base64 (data-URI prefix tolerated). Max 25MB. Provide file_b64 OR file_url. Multipart upload also works: POST the file as the 'file' form field. |
| file_url | optional | — | https URL of the input file — fetched server-side through the proxy pool; private/internal/metadata addresses are SSRF-blocked. Max 25MB. |
| filename | optional | — | Optional original filename — used only as a hint (e.g. .md detection); the real format is always sniffed from magic bytes. |
| password | optional | — | Password for encrypted PDFs. Without it an encrypted input fails cleanly with INVALID_PARAM (we never crack/bypass). |
| level = balanced | optional | low · balanced · strong | Compression aggressiveness. |
/file-convert/v1/pdf_protect1 creditEncrypt a PDF with AES-256 (user password to open; optional owner password). Output delivery: each produced file ≤10MB comes inline as base64 (files[].file_b64); 10-50MB comes as a one-time download token (files[].download_path, 30min TTL); >50MB total is rejected.
| Parameter | Allowed / range | Description | |
|---|---|---|---|
| file_b64 | optional | — | The input file as base64 (data-URI prefix tolerated). Max 25MB. Provide file_b64 OR file_url. Multipart upload also works: POST the file as the 'file' form field. |
| file_url | optional | — | https URL of the input file — fetched server-side through the proxy pool; private/internal/metadata addresses are SSRF-blocked. Max 25MB. |
| filename | optional | — | Optional original filename — used only as a hint (e.g. .md detection); the real format is always sniffed from magic bytes. |
| password | optional | — | Password for encrypted PDFs. Without it an encrypted input fails cleanly with INVALID_PARAM (we never crack/bypass). |
| user_password | required | — | Password required to OPEN the PDF (min 4 chars). |
| owner_password | optional | — | Optional owner/permissions password (defaults to the user password. |
/file-convert/v1/pdf_unlock1 creditRemove encryption from a PDF — REQUIRES the correct password (we never crack or bypass protection). Output delivery: each produced file ≤10MB comes inline as base64 (files[].file_b64); 10-50MB comes as a one-time download token (files[].download_path, 30min TTL); >50MB total is rejected.
| Parameter | Allowed / range | Description | |
|---|---|---|---|
| file_b64 | optional | — | The input file as base64 (data-URI prefix tolerated). Max 25MB. Provide file_b64 OR file_url. Multipart upload also works: POST the file as the 'file' form field. |
| file_url | optional | — | https URL of the input file — fetched server-side through the proxy pool; private/internal/metadata addresses are SSRF-blocked. Max 25MB. |
| filename | optional | — | Optional original filename — used only as a hint (e.g. .md detection); the real format is always sniffed from magic bytes. |
| password | required | — | The PDF's legitimate password. |
/file-convert/v1/pdf_repair1 creditBest-effort structural repair (broken xref/trailer/stream lengths) via a tolerant qpdf parse + clean rewrite. Output delivery: each produced file ≤10MB comes inline as base64 (files[].file_b64); 10-50MB comes as a one-time download token (files[].download_path, 30min TTL); >50MB total is rejected.
| Parameter | Allowed / range | Description | |
|---|---|---|---|
| file_b64 | optional | — | The input file as base64 (data-URI prefix tolerated). Max 25MB. Provide file_b64 OR file_url. Multipart upload also works: POST the file as the 'file' form field. |
| file_url | optional | — | https URL of the input file — fetched server-side through the proxy pool; private/internal/metadata addresses are SSRF-blocked. Max 25MB. |
| filename | optional | — | Optional original filename — used only as a hint (e.g. .md detection); the real format is always sniffed from magic bytes. |
| password | optional | — | Password for encrypted PDFs. Without it an encrypted input fails cleanly with INVALID_PARAM (we never crack/bypass). |
/file-convert/v1/image_convert1 creditConvert between raster formats (jpg/png/webp/tiff/bmp/gif/avif; animated gif/webp preserved where the target supports it). Output delivery: each produced file ≤10MB comes inline as base64 (files[].file_b64); 10-50MB comes as a one-time download token (files[].download_path, 30min TTL); >50MB total is rejected.
| Parameter | Allowed / range | Description | |
|---|---|---|---|
| file_b64 | optional | — | The input file as base64 (data-URI prefix tolerated). Max 25MB. Provide file_b64 OR file_url. Multipart upload also works: POST the file as the 'file' form field. |
| file_url | optional | — | https URL of the input file — fetched server-side through the proxy pool; private/internal/metadata addresses are SSRF-blocked. Max 25MB. |
| filename | optional | — | Optional original filename — used only as a hint (e.g. .md detection); the real format is always sniffed from magic bytes. |
| to | required | jpg · png · webp · tiff · bmp · gif · avif | Target format: jpg, png, webp, tiff, bmp, gif, avif. |
| quality = 85 | optional | 1–100 | Encode quality 1-100 (jpg/webp/avif). |
/file-convert/v1/image_resize1 creditResize with fit=contain (aspect kept, fits inside box) / cover (fills+crops) / stretch. No upscaling unless upscale=true. Output delivery: each produced file ≤10MB comes inline as base64 (files[].file_b64); 10-50MB comes as a one-time download token (files[].download_path, 30min TTL); >50MB total is rejected.
| Parameter | Allowed / range | Description | |
|---|---|---|---|
| file_b64 | optional | — | The input file as base64 (data-URI prefix tolerated). Max 25MB. Provide file_b64 OR file_url. Multipart upload also works: POST the file as the 'file' form field. |
| file_url | optional | — | https URL of the input file — fetched server-side through the proxy pool; private/internal/metadata addresses are SSRF-blocked. Max 25MB. |
| filename | optional | — | Optional original filename — used only as a hint (e.g. .md detection); the real format is always sniffed from magic bytes. |
| width | optional | 1–20000 | Target width px (give width and/or height). |
| height | optional | 1–20000 | Target height px. |
| fit = contain | optional | contain · cover · stretch | Resize strategy. |
| upscale = false | optional | — | Allow enlarging beyond the source size. |
| to = | optional | jpg · png · webp · tiff · bmp · gif · avif | Optional output format (default: keep source). |
| quality = 85 | optional | 1–100 | Encode quality 1-100 (jpg/webp/avif). |
/file-convert/v1/image_optimize1 creditSmart perceptual compression (TinyPNG-style): binary-searches the lowest quality whose decoded result stays visually equal to the source, per a per-channel error budget (effort=low/balanced/strong). Optionally convert to webp/avif while optimizing. Never returns a bigger file. Output delivery: each produced file ≤10MB comes inline as base64 (files[].file_b64); 10-50MB comes as a one-time download token (files[].download_path, 30min TTL); >50MB total is rejected.
| Parameter | Allowed / range | Description | |
|---|---|---|---|
| file_b64 | optional | — | The input file as base64 (data-URI prefix tolerated). Max 25MB. Provide file_b64 OR file_url. Multipart upload also works: POST the file as the 'file' form field. |
| file_url | optional | — | https URL of the input file — fetched server-side through the proxy pool; private/internal/metadata addresses are SSRF-blocked. Max 25MB. |
| filename | optional | — | Optional original filename — used only as a hint (e.g. .md detection); the real format is always sniffed from magic bytes. |
| to = auto | optional | auto · jpg · png · webp · avif | auto = keep format (exotic sources → webp). |
| effort = balanced | optional | low · balanced · strong | How much visual error to allow. |
/file-convert/v1/image_thumbnail1 creditFast thumbnail (16-2048px box; square=true centre-crops to a square). Output delivery: each produced file ≤10MB comes inline as base64 (files[].file_b64); 10-50MB comes as a one-time download token (files[].download_path, 30min TTL); >50MB total is rejected.
| Parameter | Allowed / range | Description | |
|---|---|---|---|
| file_b64 | optional | — | The input file as base64 (data-URI prefix tolerated). Max 25MB. Provide file_b64 OR file_url. Multipart upload also works: POST the file as the 'file' form field. |
| file_url | optional | — | https URL of the input file — fetched server-side through the proxy pool; private/internal/metadata addresses are SSRF-blocked. Max 25MB. |
| filename | optional | — | Optional original filename — used only as a hint (e.g. .md detection); the real format is always sniffed from magic bytes. |
| size = 256 | optional | 16–2048 | Bounding-box size in px. |
| square = false | optional | — | Centre-crop to square. |
| to = webp | optional | webp · jpg · png | Thumbnail format. |
/file-convert/v1/image_metadata1 creditRead image facts + EXIF (+GPS) — and with strip=true return a copy with ALL metadata removed (EXIF/GPS/XMP/ICC).
| Parameter | Allowed / range | Description | |
|---|---|---|---|
| file_b64 | optional | — | The input file as base64 (data-URI prefix tolerated). Max 25MB. Provide file_b64 OR file_url. Multipart upload also works: POST the file as the 'file' form field. |
| file_url | optional | — | https URL of the input file — fetched server-side through the proxy pool; private/internal/metadata addresses are SSRF-blocked. Max 25MB. |
| filename | optional | — | Optional original filename — used only as a hint (e.g. .md detection); the real format is always sniffed from magic bytes. |
| strip = false | optional | — | Also return a metadata-stripped copy. |
/file-convert/v1/image_rotate1 creditRotate (90/180/270 clockwise) and/or flip (horizontal/vertical). Output delivery: each produced file ≤10MB comes inline as base64 (files[].file_b64); 10-50MB comes as a one-time download token (files[].download_path, 30min TTL); >50MB total is rejected.
| Parameter | Allowed / range | Description | |
|---|---|---|---|
| file_b64 | optional | — | The input file as base64 (data-URI prefix tolerated). Max 25MB. Provide file_b64 OR file_url. Multipart upload also works: POST the file as the 'file' form field. |
| file_url | optional | — | https URL of the input file — fetched server-side through the proxy pool; private/internal/metadata addresses are SSRF-blocked. Max 25MB. |
| filename | optional | — | Optional original filename — used only as a hint (e.g. .md detection); the real format is always sniffed from magic bytes. |
| angle = 0 | optional | 0 · 90 · 180 · 270 | Clockwise rotation. |
| flip = | optional | horizontal · vertical | Optional mirror. |
/file-convert/v1/image_crop1 creditCrop a pixel box (x, y from top-left + width × height). Output delivery: each produced file ≤10MB comes inline as base64 (files[].file_b64); 10-50MB comes as a one-time download token (files[].download_path, 30min TTL); >50MB total is rejected.
| Parameter | Allowed / range | Description | |
|---|---|---|---|
| file_b64 | optional | — | The input file as base64 (data-URI prefix tolerated). Max 25MB. Provide file_b64 OR file_url. Multipart upload also works: POST the file as the 'file' form field. |
| file_url | optional | — | https URL of the input file — fetched server-side through the proxy pool; private/internal/metadata addresses are SSRF-blocked. Max 25MB. |
| filename | optional | — | Optional original filename — used only as a hint (e.g. .md detection); the real format is always sniffed from magic bytes. |
| x = 0 | optional | 0– | Left edge px. |
| y = 0 | optional | 0– | Top edge px. |
| width | required | 1– | Crop width px. |
| height | required | 1– | Crop height px. |
/file-convert/v1/doc_to_markdown4 creditsDocument → clean markdown for RAG/agents. PDF uses a layout engine (headings from font sizes, real pipe-tables, reading order); docx/pptx/xlsx/html via MarkItDown. mode=fast trades structure for speed. Output delivery: each produced file ≤10MB comes inline as base64 (files[].file_b64); 10-50MB comes as a one-time download token (files[].download_path, 30min TTL); >50MB total is rejected.
| Parameter | Allowed / range | Description | |
|---|---|---|---|
| file_b64 | optional | — | The input file as base64 (data-URI prefix tolerated). Max 25MB. Provide file_b64 OR file_url. Multipart upload also works: POST the file as the 'file' form field. |
| file_url | optional | — | https URL of the input file — fetched server-side through the proxy pool; private/internal/metadata addresses are SSRF-blocked. Max 25MB. |
| filename | optional | — | Optional original filename — used only as a hint (e.g. .md detection); the real format is always sniffed from magic bytes. |
| password | optional | — | Password for encrypted PDFs. Without it an encrypted input fails cleanly with INVALID_PARAM (we never crack/bypass). |
| pages | optional | — | Page selection, 1-based: '1-3,5,9-' (open ranges OK). Default: all pages. |
| mode = layout | optional | layout · fast | PDF only: layout = headings+tables; fast = plain text spine. |
/file-convert/v1/extract_tables3 creditsPull every table out of a PDF / xlsx / docx / html as JSON rows (+optional CSV files). Max 50 tables.
| Parameter | Allowed / range | Description | |
|---|---|---|---|
| file_b64 | optional | — | The input file as base64 (data-URI prefix tolerated). Max 25MB. Provide file_b64 OR file_url. Multipart upload also works: POST the file as the 'file' form field. |
| file_url | optional | — | https URL of the input file — fetched server-side through the proxy pool; private/internal/metadata addresses are SSRF-blocked. Max 25MB. |
| filename | optional | — | Optional original filename — used only as a hint (e.g. .md detection); the real format is always sniffed from magic bytes. |
| password | optional | — | Password for encrypted PDFs. Without it an encrypted input fails cleanly with INVALID_PARAM (we never crack/bypass). |
| pages | optional | — | Page selection, 1-based: '1-3,5,9-' (open ranges OK). Default: all pages. |
| as_csv = false | optional | — | Also return each table as a CSV file. |
/file-convert/v1/ocr_image2 creditsOCR an image → text + word count + confidence (tesseract 5, printed text; languages: eng/deu/fra/spa/tur, combinable).
| Parameter | Allowed / range | Description | |
|---|---|---|---|
| file_b64 | optional | — | The input file as base64 (data-URI prefix tolerated). Max 25MB. Provide file_b64 OR file_url. Multipart upload also works: POST the file as the 'file' form field. |
| file_url | optional | — | https URL of the input file — fetched server-side through the proxy pool; private/internal/metadata addresses are SSRF-blocked. Max 25MB. |
| filename | optional | — | Optional original filename — used only as a hint (e.g. .md detection); the real format is always sniffed from magic bytes. |
| language = eng | optional | — | OCR language(s): eng, deu, fra, spa, tur — array or comma-joined. |
/file-convert/v1/ocr_pdf2 creditsOCR a scanned PDF: output=text → per-page text+confidence; output=searchable_pdf → image+invisible-text-layer PDF. OCR-light: max 10 pages per call (use 'pages' to window). Output delivery: each produced file ≤10MB comes inline as base64 (files[].file_b64); 10-50MB comes as a one-time download token (files[].download_path, 30min TTL); >50MB total is rejected.
| Parameter | Allowed / range | Description | |
|---|---|---|---|
| file_b64 | optional | — | The input file as base64 (data-URI prefix tolerated). Max 25MB. Provide file_b64 OR file_url. Multipart upload also works: POST the file as the 'file' form field. |
| file_url | optional | — | https URL of the input file — fetched server-side through the proxy pool; private/internal/metadata addresses are SSRF-blocked. Max 25MB. |
| filename | optional | — | Optional original filename — used only as a hint (e.g. .md detection); the real format is always sniffed from magic bytes. |
| password | optional | — | Password for encrypted PDFs. Without it an encrypted input fails cleanly with INVALID_PARAM (we never crack/bypass). |
| pages | optional | — | Page selection, 1-based: '1-3,5,9-' (open ranges OK). Default: all pages. |
| language = eng | optional | — | OCR language(s): eng, deu, fra, spa, tur. |
| output = text | optional | text · searchable_pdf | Result kind. |
/file-convert/v1/office_convert3 creditsOffice → PDF (and html/txt; spreadsheets also → csv; text docs also → docx) via LibreOffice headless — docx/doc/odt/rtf/pptx/ppt/odp/xlsx/xls/ods/html/markdown/txt/csv in. Fonts: Noto (CJK/RTL) + Liberation (Arial/Times metrics). Output delivery: each produced file ≤10MB comes inline as base64 (files[].file_b64); 10-50MB comes as a one-time download token (files[].download_path, 30min TTL); >50MB total is rejected.
| Parameter | Allowed / range | Description | |
|---|---|---|---|
| file_b64 | optional | — | The input file as base64 (data-URI prefix tolerated). Max 25MB. Provide file_b64 OR file_url. Multipart upload also works: POST the file as the 'file' form field. |
| file_url | optional | — | https URL of the input file — fetched server-side through the proxy pool; private/internal/metadata addresses are SSRF-blocked. Max 25MB. |
| filename | optional | — | Optional original filename — used only as a hint (e.g. .md detection); the real format is always sniffed from magic bytes. |
| to = pdf | optional | pdf · html · txt · csv · docx | Target: pdf (default) | html | txt | csv (spreadsheets only) | docx (text documents only). |
| from = | optional | md | Set from=md when sending markdown (it has no magic bytes; .md filename also works). |
/file-convert/v1/audio_extract2 creditsExtract the audio track from a video (mp4/webm/mkv/avi) → mp3 (default) / m4a / wav / flac / ogg / opus. Stream-copies losslessly when the codec already matches the target. NOT a video transcoder (phase-2). Output delivery: each produced file ≤10MB comes inline as base64 (files[].file_b64); 10-50MB comes as a one-time download token (files[].download_path, 30min TTL); >50MB total is rejected.
| Parameter | Allowed / range | Description | |
|---|---|---|---|
| file_b64 | optional | — | The input file as base64 (data-URI prefix tolerated). Max 25MB. Provide file_b64 OR file_url. Multipart upload also works: POST the file as the 'file' form field. |
| file_url | optional | — | https URL of the input file — fetched server-side through the proxy pool; private/internal/metadata addresses are SSRF-blocked. Max 25MB. |
| filename | optional | — | Optional original filename — used only as a hint (e.g. .md detection); the real format is always sniffed from magic bytes. |
| to = mp3 | optional | mp3 · m4a · wav · flac · ogg · opus | Audio output format. |
| bitrate = | optional | 64k · 96k · 128k · 160k · 192k · 256k · 320k | Target bitrate (forces transcode; default 192k/encoder default). |
/file-convert/v1/audio_convert2 creditsConvert between audio formats (mp3/wav/flac/ogg/m4a in → mp3/m4a/wav/flac/ogg/opus out; ffmpeg LGPL build). Output delivery: each produced file ≤10MB comes inline as base64 (files[].file_b64); 10-50MB comes as a one-time download token (files[].download_path, 30min TTL); >50MB total is rejected.
| Parameter | Allowed / range | Description | |
|---|---|---|---|
| file_b64 | optional | — | The input file as base64 (data-URI prefix tolerated). Max 25MB. Provide file_b64 OR file_url. Multipart upload also works: POST the file as the 'file' form field. |
| file_url | optional | — | https URL of the input file — fetched server-side through the proxy pool; private/internal/metadata addresses are SSRF-blocked. Max 25MB. |
| filename | optional | — | Optional original filename — used only as a hint (e.g. .md detection); the real format is always sniffed from magic bytes. |
| to | required | mp3 · m4a · wav · flac · ogg · opus | Target format: mp3, m4a, wav, flac, ogg, opus. |
| bitrate = | optional | 64k · 96k · 128k · 160k · 192k · 256k · 320k | Target bitrate. |
/file-convert/v1/media_probe1 creditffprobe metadata for any audio/video file: container, duration, bitrate, per-stream codec/sample-rate/resolution, curated tags.
| Parameter | Allowed / range | Description | |
|---|---|---|---|
| file_b64 | optional | — | The input file as base64 (data-URI prefix tolerated). Max 25MB. Provide file_b64 OR file_url. Multipart upload also works: POST the file as the 'file' form field. |
| file_url | optional | — | https URL of the input file — fetched server-side through the proxy pool; private/internal/metadata addresses are SSRF-blocked. Max 25MB. |
| filename | optional | — | Optional original filename — used only as a hint (e.g. .md detection); the real format is always sniffed from magic bytes. |
/file-convert/v1/data_convert1 creditDeterministic data-format conversion: CSV ↔ JSON ↔ XML ↔ YAML ↔ Excel(xlsx) (any direction; tabular targets need tabular-shaped input — clean error otherwise). 200k-row cap. Output delivery: each produced file ≤10MB comes inline as base64 (files[].file_b64); 10-50MB comes as a one-time download token (files[].download_path, 30min TTL); >50MB total is rejected.
| Parameter | Allowed / range | Description | |
|---|---|---|---|
| file_b64 | optional | — | The input file as base64 (data-URI prefix tolerated). Max 25MB. Provide file_b64 OR file_url. Multipart upload also works: POST the file as the 'file' form field. |
| file_url | optional | — | https URL of the input file — fetched server-side through the proxy pool; private/internal/metadata addresses are SSRF-blocked. Max 25MB. |
| filename | optional | — | Optional original filename — used only as a hint (e.g. .md detection); the real format is always sniffed from magic bytes. |
| to | required | csv · json · xml · yaml · xlsx | Target format: csv, json, xml, yaml, xlsx. |
| from = | optional | csv · json · xml · yaml · xlsx | Optional source override for ambiguous text (e.g. YAML without a leading ---); binary formats are always sniffed. |
| delimiter | optional | — | CSV delimiter override (default: sniffed). |
| sheet | optional | — | Excel source: sheet name (default: first). |
/file-convert/v1/formatsfreeCapability matrix: every action with its accepted input formats, targets and caps — machine-readable (the Zamzar /formats equivalent).
Try in playground →curl -X POST https://api.reefapi.com/file-convert/v1/pdf_extract_text \
-H "x-api-key: $REEF_KEY" \
-H "content-type: application/json" \
-d '{"file_b64":"JVBERi0xLjQKMSAwIG9iajw8L1R5cGUvQ2F0YWxvZy9QYWdlcyAyIDAgUj4+ZW5kb2JqCjIgMCBvYmo8PC9UeXBlL1BhZ2VzL0tpZHNbMyAwIFJdL0NvdW50IDE+PmVuZG9iagozIDAgb2JqPDwvVHlwZS9QYWdlL1BhcmVudCAyIDAgUi9NZWRpYUJveFswIDAgNjEyIDc5Ml0vQ29udGVudHMgNCAwIFIvUmVzb3VyY2VzPDwvRm9udDw8L0YxIDUgMCBSPj4+Pj4+ZW5kb2JqCjQgMCBvYmo8PC9MZW5ndGggNTQ+PnN0cmVhbQpCVCAvRjEgMTggVGYgNzIgNzIwIFRkIChSZWVmQVBJIGdvbGRlbiB0ZXN0IFBERikgVGogRVQKZW5kc3RyZWFtZW5kb2JqCjUgMCBvYmo8PC9UeXBlL0ZvbnQvU3VidHlwZS9UeXBlMS9CYXNlRm9udC9IZWx2ZXRpY2E+PmVuZG9iagp4cmVmCjAgNgowMDAwMDAwMDAwIDY1NTM1IGYgCjAwMDAwMDAwMDkgMDAwMDAgbiAKMDAwMDAwMDA1MiAwMDAwMCBuIAowMDAwMDAwMTAxIDAwMDAwIG4gCjAwMDAwMDAyMTEgMDAwMDAgbiAKMDAwMDAwMDMxMCAwMDAwMCBuIAp0cmFpbGVyPDwvU2l6ZSA2L1Jvb3QgMSAwIFI+PgpzdGFydHhyZWYKMzcxCiUlRU9GCg=="}'{
"ok": true,
"data": { /* the result */ },
"meta": {
"latency_ms": 240,
"record_count": 12,
"completeness_pct": 100
},
"error": null
}