{"openapi":"3.1.0","info":{"title":"Document Ingest API","description":"Multi-engine document parsing API with confidence-based routing between anydoc, markitdown, and docling.","contact":{"name":"Document Ingest","url":"https://github.com/user/doc-ingest-api"},"license":{"name":"MIT","url":"https://opensource.org/licenses/MIT"},"version":"0.2.0"},"paths":{"/healthz":{"get":{"tags":["health"],"summary":"Healthz","description":"Return a lightweight liveness response.","operationId":"healthz_healthz_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":{"type":"string"},"type":"object","title":"Response Healthz Healthz Get"}}}}}}},"/v1/parse":{"post":{"tags":["parse"],"summary":"Parse Document","description":"Parse one uploaded document synchronously.","operationId":"parse_document_v1_parse_post","parameters":[{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_parse_document_v1_parse_post"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Parse Document V1 Parse Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/parse/async":{"post":{"tags":["parse"],"summary":"Queue Parse Document","description":"Queue one uploaded document and return a job identifier.","operationId":"queue_parse_document_v1_parse_async_post","parameters":[{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_queue_parse_document_v1_parse_async_post"}}}},"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Queue Parse Document V1 Parse Async Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/jobs/{job_id}":{"get":{"tags":["jobs"],"summary":"Get Parse Job","description":"Return the current status and result for one parse job.","operationId":"get_parse_job_v1_jobs__job_id__get","parameters":[{"name":"job_id","in":"path","required":true,"schema":{"type":"integer","title":"Job Id"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Get Parse Job V1 Jobs  Job Id  Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/billing/checkout":{"post":{"tags":["billing"],"summary":"Create Checkout","description":"Create a checkout session for the configured billing provider.","operationId":"create_checkout_v1_billing_checkout_post","parameters":[{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"requestBody":{"content":{"application/json":{"schema":{"anyOf":[{"type":"object","additionalProperties":true},{"type":"null"}],"title":"Body"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Create Checkout V1 Billing Checkout Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/billing/webhook":{"post":{"tags":["billing"],"summary":"Billing Webhook","description":"Verify webhook signature and update subscription state.\n\nPaddle mode: verifies HMAC-SHA256 signature, processes subscription\nevents, and syncs plan/quota to the local API key. Mock mode keeps\nthe existing permissive behaviour.","operationId":"billing_webhook_v1_billing_webhook_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Billing Webhook V1 Billing Webhook Post"}}}}}}},"/v1/billing/subscription":{"get":{"tags":["billing"],"summary":"Get Subscription","description":"Return mock subscription status and plan details.","operationId":"get_subscription_v1_billing_subscription_get","parameters":[{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Get Subscription V1 Billing Subscription Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/billing/config":{"get":{"tags":["billing"],"summary":"Billing Config","description":"Return public billing configuration for Paddle.js checkout.","operationId":"billing_config_v1_billing_config_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Billing Config V1 Billing Config Get"}}}}}}},"/v1/demo-keys":{"post":{"tags":["demo"],"summary":"Create Demo Key","description":"Create a no-signup demo API key (20 pages, 24-hour expiry).","operationId":"create_demo_key_v1_demo_keys_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Create Demo Key V1 Demo Keys Post"}}}}}}}},"components":{"schemas":{"Body_parse_document_v1_parse_post":{"properties":{"file":{"type":"string","contentMediaType":"application/octet-stream","title":"File"},"category":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Category"}},"type":"object","required":["file"],"title":"Body_parse_document_v1_parse_post"},"Body_queue_parse_document_v1_parse_async_post":{"properties":{"file":{"type":"string","contentMediaType":"application/octet-stream","title":"File"},"category":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Category"},"webhook_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Webhook Url"}},"type":"object","required":["file"],"title":"Body_queue_parse_document_v1_parse_async_post"},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"},"input":{"title":"Input"},"ctx":{"type":"object","title":"Context"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"}}}}