API Reference

Base URL: https://api.files2llm.com

Authentication

Job endpoints use the X-API-Key header with a key from your dashboard. Account endpoints (/me, /me/keys) use a Bearer JWT from Kinde — these are intended for the dashboard, not for API clients.

POST /jobs

Upload a file for parsing as multipart/form-data. Returns a job ID immediately.

Form fields

  • file (file, required) — PDF, DOCX, XLSX, PPTX or image. Max 50 MB.
  • callback_url (string, optional) — webhook target for async delivery.

Response (202)

{"job_id":"abc-123","status":"queued","filename":"report.pdf",
 "content_type":"application/pdf","sha256":"...","size_bytes":48211,
 "callback_url":null}

GET /jobs/{id}

Status poll for a job.

# queued / parsing
{"status":"queued"}
{"status":"parsing"}

# parsed
{"status":"parsed","detected_language":"en","error":null,"callback_status":null}

# failed
{"status":"failed","error":"..."}

GET /jobs/{id}/result

The full ParsedDocument JSON — plain text and markdown per page. Returns 404 until the job's status is parsed.

{"pages":[{"index":0,"text":"...","markdown":"# Report\n..."}],
 "detected_language":"en"}

GET /me

(Bearer JWT) Current user + list of active (non-revoked) API keys.

POST /me/keys

(Bearer JWT) Create a new API key.

# Request
{"label":"Production"}

# Response (201) — raw key shown ONCE
{"id":"...","label":"Production","key_prefix":"f2l_a1b2c3d4","key":"f2l_a1b2c3d4...","created_at":"..."}

DELETE /me/keys/{id}

(Bearer JWT) Soft-delete a key. Subsequent requests with that key return 401.

Errors

  • 400 — empty upload, or invalid callback_url.
  • 401 — missing/invalid/revoked key, or bad JWT.
  • 404 — unknown job ID, or result requested before parsing completed.
  • 413 — file exceeds the 50 MB limit.
  • 415 — unsupported file type, or declared type doesn't match the bytes.
  • 5xx — parsing failure. The job is marked failed with an error message.