Convert API
One request, converted file out
Upload a PDF, office file, image, or text file to POST /api/v1/convert. JSON includes markdown and exported content. Pass download=true to write the converted file instead. Create an API key on Profile. Workspace access tokens are not accepted here.
This environment
- API host
- https://api.fileworks.ai
- Status
- Checking…
Auth
Send Authorization: Bearer fw_live_…. A raw key in Authorization or X-Api-Key also works — do not omit the key, and do not send a workspace Google token. Keys start with fw_live_ and do not expire. GET catalog works without a key. POST convert bills page credits on your API plan, separate from the workspace role.
Examples
Replace YOUR_API_KEY, then POST a real file. Default JSON embeds Markdown in markdown (and the export in content). Use download=true to save the file, or pipe JSON through jq.
curl -s -H "Authorization: Bearer YOUR_API_KEY" \
-F file=@report.pdf \
-F target=markdown \
-F download=true \
-o report.md \
https://api.fileworks.ai/api/v1/convertcurl -s -H "Authorization: Bearer YOUR_API_KEY" \
-F file=@report.pdf \
-F target=markdown \
https://api.fileworks.ai/api/v1/convert \
| jq -r .markdownimport requests
from pathlib import Path
base = "https://api.fileworks.ai"
headers = {"Authorization": "Bearer YOUR_API_KEY"}
catalog = requests.get(f"{base}/api/v1/convert", headers=headers).json()
print(catalog["inputs"], catalog["capabilities"])
with open("report.pdf", "rb") as fh:
res = requests.post(
f"{base}/api/v1/convert",
headers=headers,
files={"file": ("report.pdf", fh, "application/pdf")},
data={"target": "markdown", "use_ai": "false", "target_lang": "original"},
)
res.raise_for_status()
markdown = res.json()["markdown"]
Path("report.md").write_text(markdown, encoding="utf-8")
print(markdown)const base = "https://api.fileworks.ai";
const headers = { Authorization: "Bearer YOUR_API_KEY" };
const catalog = await fetch(`${base}/api/v1/convert`, { headers }).then((r) => r.json());
console.log(catalog.inputs, catalog.capabilities);
const body = new FormData();
body.append("file", fileInput.files[0]);
body.append("target", "markdown");
body.append("use_ai", "false");
body.append("target_lang", "original");
const res = await fetch(`${base}/api/v1/convert`, { method: "POST", headers, body });
const data = await res.json();
console.log(data.markdown);Endpoints
| Method | Path | What it does |
|---|---|---|
| GET | /api/health | Liveness and engine status |
| GET | /api/v1/convert | Inputs, targets, options, capabilities |
| POST | /api/v1/convert | Multipart file + options. No s3_key |
Useful form fields: target (markdown, txt, html, json, docx, png, jpeg), download=true to get the file, use_ai=true for scans, target_lang=en to translate. Max upload is 50 MB.
Quota
Convert API uses page credits on a separate API plan. Standard convert is 1 credit per page. AI reading or translation is 3 credits per page. API Free includes 100 credits / month. Paid API plans start at $19 / month for 2,000 credits and can be combined with workspace Pro or Premium. Workspace file quotas do not apply here. Pricing. Questions: support@fileworks.ai.