{"openapi":"3.1.0","info":{"title":"FileDigest API","version":"1.0.0","description":"Turn any document into AI-ready context (Markdown, HTML, Docling DocTags, JSON). One async endpoint to submit, one to poll."},"servers":[{"url":"https://filedigest.dev"}],"security":[{"bearerAuth":[]}],"paths":{"/v1/parse":{"post":{"operationId":"parseDocument","summary":"Submit a document for parsing","description":"Accepts a multipart file or a JSON source_url. Returns 202 with a job id. Send an Idempotency-Key header to make retries safe.","parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"},"description":"Replaying the same key returns the original job instead of creating a duplicate."}],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"type":"object","properties":{"file":{"type":"string","format":"binary"},"mode":{"type":"string","enum":["fast_text","accurate_tables"]},"ocr":{"type":"string","enum":["true","false"]}},"required":["file"]}},"application/json":{"schema":{"type":"object","properties":{"source_url":{"type":"string","format":"uri"},"mode":{"type":"string","enum":["fast_text","accurate_tables"]},"ocr":{"type":"boolean"},"quality":{"type":"string","enum":["standard","high"],"description":"high uses the VLM pipeline for hard layouts (slower)."},"enrich_formulas":{"type":"boolean","description":"Convert math to LaTeX (slower)."},"enrich_code":{"type":"boolean","description":"Detect code blocks + language (slower)."},"describe_pictures":{"type":"boolean","description":"Generate image captions (slower, VLM)."}},"required":["source_url"]}}}},"responses":{"202":{"description":"Accepted","content":{"application/json":{"schema":{"type":"object","properties":{"job_id":{"type":"string"},"status":{"type":"string","enum":["accepted"]},"poll":{"type":"string","format":"uri-reference","description":"Relative URL to poll job status, e.g. /v1/jobs/{job_id}"}}}}}},"401":{"$ref":"#/components/responses/Problem"},"402":{"$ref":"#/components/responses/Problem"},"413":{"$ref":"#/components/responses/Problem"},"502":{"$ref":"#/components/responses/Problem"}}}},"/v1/jobs/{id}":{"get":{"operationId":"getJob","summary":"Poll a parse job","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Job status","content":{"application/json":{"schema":{"type":"object","properties":{"job_id":{"type":"string"},"status":{"type":"string","enum":["pending","processing","completed","failed"]},"result":{"type":"object","properties":{"tokens":{"type":"integer"},"parsed_files":{"type":"integer"},"failed_files":{"type":"integer"},"digest":{"type":"string","description":"AI-ready Markdown"},"manifest":{"type":"object","description":"Per-source representations (markdown, html, doctags, docling_json)"}}},"error":{"type":"string"}}}}}},"401":{"$ref":"#/components/responses/Problem"},"404":{"$ref":"#/components/responses/Problem"}}}}},"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"fd_live_*"}},"responses":{"Problem":{"description":"RFC 9457 problem detail","content":{"application/problem+json":{"schema":{"type":"object","properties":{"type":{"type":"string"},"title":{"type":"string"},"status":{"type":"integer"},"code":{"type":"string"},"detail":{"type":"string"}}}}}}}}}