The file operations you would otherwise self-host
The File Convert API handles PDF and document operations as clean JSON.
31 active endpoints, on 0, 1, 2, 3 and 4 credit tiers.
- POST/file-convert/v1/pdf_extract_text
- POST/file-convert/v1/pdf_metadata
- POST/file-convert/v1/pdf_merge
- POST/file-convert/v1/pdf_split
- POST/file-convert/v1/pdf_rotate
- POST/file-convert/v1/pdf_to_images
- POST/file-convert/v1/images_to_pdf
- +24 more
What File Conversion endpoints does ReefAPI ship?
31 live read endpoints. Read-only data API: no writes, no account actions, no dashboard access on the target site.
File Conversion API
3 of 31 endpoints, ready to run
Text per page, with a character count, a count of empty pages, and a flag telling you the document is probably a scan rather than text.
{ "ok": true, "meta": { "api": "file-convert", "endpoint": "pdf_extract_text", "mode": "live", "latency_ms": 1276.1, "record_count": 1, "cache_hit": false }, "data": { "pages": [ { "page": 1, "text": " \n \n \n \n \n \n Sample PDF \n \n \n This is a simple PDF file. Fun fun fun. \n \n \n Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Phasellus facilisis odio sed mi.\n Curabitur suscipit. Nullam vel nisi. Etiam semper ipsum ut lectus. Proin aliquam, erat eget\n pharetra commodo, eros mi condimentum quam, sed commodo justo quam ut velit.\n Integer a erat. Cras laoreet ligula cursus enim. Aenean scelerisque velit et tellus.\n Vestibulum dictum aliquet sem. Nulla facilisi. Vestibulum accumsan ante vitae elit. Nulla\n \n erat dolor, blandit in, rutrum quis, semper pulvinar, enim. Nullam varius congue risus.\n Vivamus sollicitudin, metus ut interdum eleifend, nisi tellus pellentesque elit, tristique\n accumsan eros quam et risus. Suspendisse libero odio, mattis sit amet, aliquet eget,\n hendrerit vel, nulla. Sed vitae augue. Aliquam erat volutpat. Aliquam feugiat vulputate nisl.\n Suspendisse quis nulla pretium ante pretium mollis. Proin velit ligula, sagittis at, egestas a,\n pulvinar quis, nisl. \n \n \n Pellentesque sit amet lectus. Praesent pulvinar, nunc quis iaculis sagittis, justo quam\n lobortis tortor, sed vestibulum dui metus venenatis est. Nunc cursus ligula. Nulla facilisi.\n Phasellus ullamcorper consectetuer ante. Duis tincidunt, urna id condimentum luctus, nibh\n ante vulputate sapien, id sagittis massa orci ut enim. Pellentesque vestibulum convallis\n sem. Nulla consequat quam ut nisl. Nullam est. Curabitur tincidunt dapibus lorem. Proin\n velit turpis, scelerisque sit amet, iaculis nec, rhoncus ac, ipsum. Phasellus lorem arcu,\n \n feugiat eu, gravida eu, consequat molestie, ipsum. Nullam vel est ut ipsum volutpat\n feugiat. Aenean pellentesque. \n \n In mauris. Pellentesque dui nisi, iaculis eu, rhoncus in, venenatis ac, ante. Ut odio justo,\n scelerisque vel, facilisis non, commodo a, pede. Cras nec massa sit amet tortor volutpat\n varius. Donec lacinia, neque a luctus aliquet, pede massa imperdiet ante, at varius lorem\n \n pede sed sapien. Fusce erat nibh, aliquet in, eleifend eget, commodo eget, erat. Fusce\n consectetuer. Cras risus tortor, porttitor nec, tristique sed, convallis semper, eros. Fusce\n vulputate ipsum a mauris. Phasellus mollis. Curabitur sed urna. Aliquam nec sapien non\n nibh pulvinar convallis. Vivamus facilisis augue quis quam. Proin cursus aliquet metus.\n Suspendisse lacinia. Nulla at tellus ac turpis eleifend scelerisque. Maecenas a pede vitae\n enim commodo interdum. Donec odio. Sed sollicitudin dui vitae justo. \n \n \n Morbi elit nunc, facilisis a, mollis a, molestie at, lectus. Suspendisse eget mauris eu tellus\n molestie cursus. Duis ut magna at justo dignissim condimentum. Cum sociis natoque\n penatibus et magnis dis parturient montes, nascetur ridiculus mus. Vivamus varius. Ut sit\n amet diam suscipit mauris ornare aliquam. Sed varius. Duis arcu. Etiam tristique massa\n eget dui. Phasellus congue. Aenean est erat, tincidunt eget, venenatis quis, commodo at,\n quam. \n \n \n \n \n \n " } ], "page_count": 1, "pages_extracted": 1, "characters": 5521, "empty_pages": 0, "likely_scanned": false, "stop_reason": "complete" } }
How the File Conversion API works
File Conversion is a normal ReefAPI surface — the same four rules that hold for every other engine on the key.
No OAuth app, no request signing, no per-site account. One key covers all 184 engines.
Every route is a POST with a JSON body. Parameters are validated against the published schema before anything is charged.
Credits, not seats. Failed and blocked calls are never charged, and cache hits cost nothing.
One envelope everywhere. meta carries latency_ms, record_count and the endpoint that answered.
Getting a folder of PDFs into a RAG index without running a converter
Ingesting documents means three things nobody wants to host: a PDF text layer, an OCR fallback for the scans, and something that turns tables into text a model can read.
{"file_url": "https://example.com/report.pdf"}Returns the markdown plus the table count, the page count and a likely_scanned flag — which is how you know whether it needs the OCR path instead.
{"file_url": "https://example.com/scan.pdf", "language": "eng"}Only for the documents the flag caught. Returns per-page text with a confidence score, or a searchable PDF with an invisible text layer.
The branch is decided by a field in the first response rather than by you guessing which files are scans, and neither step needs a converter running on your side.
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": { … },
"meta": {
"api": "file-convert",
"endpoint": "pdf_extract_text",
"mode": "live",
"latency_ms": …,
"record_count": …
},
"error": null
}The format matrix: what each action accepts and what it can emit
Every action declares its own accepted inputs and targets, and a pair that is not in this table fails before any work happens. The formats action returns this same matrix live, including the per-action caps, so you can check a pair programmatically instead of guessing.
| Action(s) | Accepts | Targets and caps |
|---|---|---|
| the 12 pdf_* actions | pdf, plus text or json where the action is a reader. Caps: extract 300 pages, redact 50 pages, merge 20 files, split 100 parts. | |
| pdf_to_images | png, jpg, webp. Max 20 pages per call, dpi 36 to 300. | |
| images_to_pdf | png, jpg, webp, gif, tiff, bmp | pdf. Max 20 images, page_size auto, a4 or letter. |
| the 7 image_* actions | png, jpg, webp, gif, tiff, bmp, avif, heif | jpg, png, webp, tiff, bmp, gif, avif (optimize: auto, jpg, png, webp, avif; thumbnail: webp, jpg, png). Caps: 64 megapixels, 20000 px per side, thumbnail box 2048. |
| office_convert | docx, doc, odt, rtf, pptx, ppt, odp, xlsx, xls, ods, html, text, csv, md | pdf, html, txt, csv, docx |
| doc_to_markdown | pdf, docx, pptx, xlsx, html | md. Max 150 pages. |
| extract_tables | pdf, xlsx, docx, html | json, csv. Max 50 tables. |
| ocr_image and ocr_pdf | images / pdf | text, and searchable_pdf from ocr_pdf. Languages eng, deu, fra, spa, tur. ocr_pdf caps at 10 pages. |
| audio_extract | mp4, webm, mkv, avi | mp3, m4a, wav, flac, ogg, opus. Max 7200 seconds. |
| audio_convert | mp3, wav, flac, ogg, m4a | mp3, m4a, wav, flac, ogg, opus. Max 7200 seconds. |
| data_convert | csv, json, xml, yaml, xlsx, text | csv, json, xml, yaml, xlsx. Max 200,000 rows. |
| media_probe | mp4, webm, mkv, avi, mp3, wav, flac, ogg, m4a | json only: container, duration, bitrate, per-stream codec, sample rate and resolution. |
Deliberately out of scope: video transcoding, CAD (dwg, dxf), fonts, ebooks (epub, mobi), archives (zip, rar), iWork documents, email (eml, msg), and reconstructing a PDF back into docx or pptx. Asking for one of those is a miss rather than a bug.
What comes back, how big it can be, and how long we keep it
Measured across PDF, document and image operations. The output and retention rows are the ones that shape how you integrate it.
One call returns every operation with the formats it accepts, the targets it can produce and its hard caps — three hundred pages for text extraction, twenty files for a merge, a hundred parts for a split. You can validate a job against the machine-readable matrix before spending a call on it, and it cannot drift from the docs because it is not a doc.
Either send a URL and we fetch it, or send base64 in the request. Output follows the size: small results come back inline as base64 in the response, larger ones as a download token with a stated lifetime. Both policies — the inline ceiling, the token lifetime, the retention period — are returned by the capability endpoint rather than being something you discover by exceeding them.
A text extraction reports the character count, how many pages came back empty, and a likely_scanned flag. A scanned PDF with no text layer would otherwise return a successful response containing nothing — the flag is the difference between an empty result and a silent one, and it is what routes the file to OCR.
Headings are inferred from font sizes, tables come out as real pipe tables and reading order is preserved, with the table count reported so you can spot the documents worth checking by hand. The target is an index a model will read, which is a different job from rendering a document to look at.
Results are held briefly and then discarded — the retention window is short and stated up front. That is deliberate: keeping customers' documents is a liability, not a feature. It does mean the download token has to be used promptly, and that re-running a job is a new call rather than a fetch from a cache.
What people build with File Conversion
The jobs this data is most often used for.
endpoints
credits per call
Data pipelines call pdf_extract_text to turn PDFs into searchable or RAG-ready text.
Document tools use pdf_merge and pdf_split to assemble files.
OCR triage uses the scanned flag to route image-only PDFs correctly.
What File Conversion data costs
The cheapest call here is 0 credits, so $15/mo (Pro) buys 10,000 of them — $1.50 per 1,000 credits. Credits roll over and never expire, and failed or blocked calls are not charged.
Full pricing →- 1,000 free credits on signup, no card
- One key, all 184 APIs, one credit pool
- Failed and blocked calls are never charged
- Credits roll over and never expire
Call it in two lines
Sign up, get 1,000 credits and one key that works on every engine. Then this is the whole protocol.
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=="}'import requests
r = requests.post(
"https://api.reefapi.com/file-convert/v1/pdf_extract_text",
headers={"x-api-key": REEF_KEY},
json={
"file_b64": "JVBERi0xLjQKMSAwIG9iajw8L1R5cGUvQ2F0YWxvZy9QYWdlcyAyIDAgUj4+ZW5kb2JqCjIgMCBvYmo8PC9UeXBlL1BhZ2VzL0tpZHNbMyAwIFJdL0NvdW50IDE+PmVuZG9iagozIDAgb2JqPDwvVHlwZS9QYWdlL1BhcmVudCAyIDAgUi9NZWRpYUJveFswIDAgNjEyIDc5Ml0vQ29udGVudHMgNCAwIFIvUmVzb3VyY2VzPDwvRm9udDw8L0YxIDUgMCBSPj4+Pj4+ZW5kb2JqCjQgMCBvYmo8PC9MZW5ndGggNTQ+PnN0cmVhbQpCVCAvRjEgMTggVGYgNzIgNzIwIFRkIChSZWVmQVBJIGdvbGRlbiB0ZXN0IFBERikgVGogRVQKZW5kc3RyZWFtZW5kb2JqCjUgMCBvYmo8PC9UeXBlL0ZvbnQvU3VidHlwZS9UeXBlMS9CYXNlRm9udC9IZWx2ZXRpY2E+PmVuZG9iagp4cmVmCjAgNgowMDAwMDAwMDAwIDY1NTM1IGYgCjAwMDAwMDAwMDkgMDAwMDAgbiAKMDAwMDAwMDA1MiAwMDAwMCBuIAowMDAwMDAwMTAxIDAwMDAwIG4gCjAwMDAwMDAyMTEgMDAwMDAgbiAKMDAwMDAwMDMxMCAwMDAwMCBuIAp0cmFpbGVyPDwvU2l6ZSA2L1Jvb3QgMSAwIFI+PgpzdGFydHhyZWYKMzcxCiUlRU9GCg=="
},
)
print(r.json()["data"])Have a question? We got answers.
The questions people actually ask before wiring up File Conversion.
Get a free key →How do I send a file in, and how does the result come back?▾
Three ways in: file_b64 in the JSON body (a data-URI prefix is tolerated), file_url over https which is fetched server-side, or a multipart form field named 'file'. The input cap is 25 MB, exactly 26,214,400 bytes. On the way out, every produced file is an entry in files[] with filename, format, content_type, bytes and delivery. A measured pdf_to_images call returned page_001.webp at 2,716 bytes with delivery 'inline' and the bytes in file_b64. Anything above 10 MB switches to a one-time download_path with a 30-minute TTL, and a total above 50 MB is rejected outright.
What happens if the file is not the format the action expects?▾
It fails immediately and tells you exactly what it saw. Sending CSV bytes to audio_convert returned ok false, INVALID_PARAM, and the message "input sniffed as 'text' - this action accepts: mp3, wav, flac, ogg, m4a", with detail.sniffed and detail.accepted as separate fields so you can branch on them. The format is always determined from magic bytes; the extension and the filename are never trusted for that decision.
So is the filename ignored completely?▾
Not quite. It is a hint for the cases magic bytes cannot separate, and markdown is the one that matters, because a .md file is just text on the wire. Measured: markdown bytes sent with filename 'a.md' were sniffed as 'text', and office_convert still reported from 'md' and produced a 28 KB PDF. Send the filename when you have it, but do not rely on it to override the sniffed type.
pdf_extract_text returned empty pages and likely_scanned true. Is that a failure?▾
No, that is the diagnosis. It means the PDF has no extractable text layer, which is what a scan or an image-only export looks like, and the response says it precisely: characters 0, empty_pages 1, likely_scanned true, stop_reason 'complete'. The same call against a PDF with a real text layer returned characters 2876, empty_pages 0 and likely_scanned false. When likely_scanned comes back true, send the file to ocr_pdf instead of retrying.
Does data_convert infer types?▾
No, and that is deliberate. Every cell arrives as a string: a two-row CSV of name,age converted to JSON came back as [{"name":"ann","age":"30"},{"name":"bob","age":"41"}]. Casting is yours to do. The response reports what it read and wrote, from 'csv', to 'json', rows 2, so you can assert the row count before decoding anything.
What is in the response besides the converted file?▾
Each action returns its own facts alongside files[], and several let you verify the result without decoding base64. pdf_to_images returned page_count, rendered, dpi and stop_reason plus width and height per file. doc_to_markdown returned page_count, pages_converted, tables, empty_pages, characters and a markdown_preview of the opening text next to the full document.md. pdf_extract_text returns per-page text and no file at all.
Can it open a password-protected PDF?▾
Only with the password. Every PDF action takes a password parameter that unlocks the input for that call, and pdf_unlock writes out a copy with the encryption removed when you supply the correct one. Without it, an encrypted input fails cleanly with INVALID_PARAM rather than half-processing. Nothing here cracks or bypasses a password, and there is no recovery mode.
What is the File Conversion API?▾
File Conversion API is a ReefAPI endpoint group for file conversion It returns live JSON through POST requests under /file-convert/v1.
Is the File Conversion API free to try?▾
Yes. ReefAPI starts with 1,000 free credits, no card required. File Conversion calls use the same shared credit balance as every other ReefAPI engine.
Do I need a File Conversion login or account?▾
No login to File Conversion is needed for the API response. You call ReefAPI with your x-api-key header, and the playground can run live examples before you create a production key.
How fresh is the File Conversion data?▾
The page example is captured from a live pdf_extract_text call, and production requests fetch live data through ReefAPI rather than a static sample.
How many credits does the File Conversion API use?▾
File Conversion actions currently cost 1-4 credits per successful call. Failed or blocked calls are free, and all APIs draw from one credit pool.
Can I call File Conversion from an AI assistant or MCP client?▾
Yes. Connect ReefAPI once through MCP and your assistant can call file-convert actions with the same key, credit pool and JSON envelope used by normal REST requests.
Is the File Conversion API a File Conversion scraper?▾
It is the managed alternative to a DIY File Conversion scraper. Instead of building and maintaining your own scraper — proxies, headless browsers, captcha and constant breakage — you call one ReefAPI endpoint and get the same file conversion back as clean JSON.
19 Utilities & AI APIs on the same key
One key, one credit pool, one response envelope. If you are pulling File Conversion, you are one call away from the rest of the category — no second contract, no second integration.
Need something this API does not do?
Name the endpoint, the field, or a source we do not carry yet. We ship new APIs every week and you would be first to get the key. Real people read every message and reply the same day.
Try it on your own data before you pay anything
The call above is the real endpoint, not a recording. A free key gives you 1,000 credits, the other 183 APIs, and the same envelope everywhere.
Endpoints, parameters and credit costs on this page are read from the live catalog and cannot drift from what the API accepts. Field notes were captured on 2026-08-30.