Quick Start

1. Get your API key

Sign in to the dashboard, click + New key, and copy the value shown. You'll see the raw key once — store it somewhere safe.

2. Upload a file (sync polling)

POST a file as multipart form data, get back a job ID, then poll until its status is parsed.

curl -X POST https://api.files2llm.com/jobs \
  -H "X-API-Key: f2l_..." \
  -F "file=@report.pdf"
# {"job_id":"abc","status":"queued"}

curl https://api.files2llm.com/jobs/abc -H "X-API-Key: f2l_..."
# {"status":"parsed","detected_language":"en","error":null}

3. Fetch the structured result

Once status is parsed, get the full ParsedDocument — plain text and markdown, page by page.

curl https://api.files2llm.com/jobs/abc/result \
  -H "X-API-Key: f2l_..."
# {"pages":[{"text":"...","markdown":"# Report\n..."}], ...}

4. Use a webhook instead of polling

Pass callback_url as a form field — we'll POST the final job state to that URL when parsing finishes.

curl -X POST https://api.files2llm.com/jobs \
  -H "X-API-Key: f2l_..." \
  -F "file=@report.pdf" \
  -F "callback_url=https://you.com/parse-done"

5. Supported formats

PDF, DOCX, XLSX, PPTX, and common image types (PNG/JPEG). Scanned PDFs and images are handled with OCR. Uploads are capped at 50 MB.