{"source":"openapi","openapiUrl":"/api/v1/openapi.json","serverName":"kaia","serverVersion":"2026-07","auth":{"type":"bearer","description":"Every tool call maps to an HTTPS request carrying Authorization: Bearer kaia_live_… . The key’s scopes gate the tools it may call (see binding.scope)."},"tools":[{"name":"confirmDocument","description":"Confirm the S3 upload; processing chains automatically (D1). Call after the PUT to uploadUrl succeeds. The server chains classification processing itself (SQS when configured, sync fallback) — external clients never orchestrate engine internals. Idempotent: re-confirming a document already in processing returns 202.","inputSchema":{"type":"object","properties":{"documentId":{"type":"string"}},"required":["documentId"],"additionalProperties":false},"binding":{"method":"POST","path":"/api/v1/documents/{documentId}/confirm","scope":"intake:write"}},{"name":"createBatch","description":"Create an ingestion batch (resolves the matter once). PDO's overnight pattern: the batch resolves its matter at creation (matterId XOR newMatter, required); member documents carry batchId and inherit the batch's single case/matter target — there is no per-member override. Counters increment on process/fail. What a batch means per vertical: for legal-ediscovery, a batch groups documents under one matter and never changes how each document is processed; for finance-claims, a batch is adjudicated as one governed run with per-claim results; for accounts-payable, a batch is an invoice load worked as one payment cycle; for oil-gas-ecr, a batch submits many items under one filing target, each processed as its own case.","inputSchema":{"type":"object","properties":{"verticalId":{"type":"string","enum":["legal-ediscovery","accounts-payable","finance-claims","oil-gas-ecr"],"description":"Verticals available on the public API today. Any other value is refused with code unsupported_vertical. For accounts-payable, submissions are invoices only — purchase orders and goods receipts arrive through your ERP connector setup, never through this endpoint."},"name":{"type":"string","maxLength":200},"totalDocuments":{"type":"integer","minimum":1},"matterId":{"type":"string"},"newMatter":{"$ref":"#/components/schemas/NewMatter"}},"required":["verticalId","name","totalDocuments"],"additionalProperties":false},"binding":{"method":"POST","path":"/api/v1/batches","scope":"intake:write"}},{"name":"getBatchStatus","description":"Batch progress.","inputSchema":{"type":"object","properties":{"batchId":{"type":"string"}},"required":["batchId"],"additionalProperties":false},"binding":{"method":"GET","path":"/api/v1/batches/{batchId}","scope":"intake:read"}},{"name":"getDocumentStatus","description":"Document processing status (the polling contract).","inputSchema":{"type":"object","properties":{"documentId":{"type":"string"}},"required":["documentId"],"additionalProperties":false},"binding":{"method":"GET","path":"/api/v1/documents/{documentId}","scope":"intake:read"}},{"name":"getRun","description":"Run state (the cheap poll). State, stage, role, mode, awaiting-human and the regulated-floor force-stop, plus the matter binding and any pending question. Scope `runs:read`. A run belonging to another organization returns 404, never 403 — no existence oracle.","inputSchema":{"type":"object","properties":{"runId":{"type":"string"}},"required":["runId"],"additionalProperties":false},"binding":{"method":"GET","path":"/api/v1/runs/{runId}","scope":"runs:read"}},{"name":"getRunResult","description":"Run RESULT — what the engine decided. The decision-packet summary (the 12-element acceptance packet, projected), the grounded document’s classification + axes, the regulated floors (the force-stop and the signature floor: held vs released), the per-figure numeric receipts, and the transition trace. Scope `runs:read`.","inputSchema":{"type":"object","properties":{"runId":{"type":"string"}},"required":["runId"],"additionalProperties":false},"binding":{"method":"GET","path":"/api/v1/runs/{runId}/result","scope":"runs:read"}},{"name":"listDocuments","description":"List documents in a matter (cursor-paged).","inputSchema":{"type":"object","properties":{"matterId":{"type":"string","description":"The matter whose documents to list. Documents are never listed across matters."},"verticalId":{"type":"string"},"batchId":{"type":"string"},"status":{"type":"string","enum":["DISCOVERED","PRESERVED","COLLECTED","PROCESSED","AI_REVIEWED","HUMAN_VERIFIED","ANALYZED","PRODUCED","PRESENTED"]},"classification":{"type":"string"},"limit":{"type":"integer","minimum":1,"maximum":100},"cursor":{"type":"string"}},"required":["matterId"],"additionalProperties":false},"binding":{"method":"GET","path":"/api/v1/documents","scope":"intake:read"}},{"name":"listMatters","description":"List targetable matters for a vertical. Explicit matter selection support for D3: org-scoped, non-CLOSED, newest-first. Choosing a COMPLETED matter re-opens it on next intake.","inputSchema":{"type":"object","properties":{"verticalId":{"type":"string"}},"required":["verticalId"],"additionalProperties":false},"binding":{"method":"GET","path":"/api/v1/matters","scope":"intake:read"}},{"name":"listRuns","description":"List runs (cursor-paged). A run is the unit of orchestration — owned by a matter, one per role. Scope `runs:read`. Filter by vertical, matter, an exact state, or `live=true` (RUNNING | AWAITING_HUMAN | ADVANCED). Newest transition first.","inputSchema":{"type":"object","properties":{"verticalId":{"type":"string"},"matterId":{"type":"string"},"state":{"type":"string","enum":["PENDING","RUNNING","AWAITING_HUMAN","ADVANCED","COMPLETED","CANCELED","FAILED"]},"live":{"type":"boolean","description":"Mutually exclusive with `state` (400 if both are given)."},"limit":{"type":"integer","minimum":1,"maximum":100},"cursor":{"type":"string"}},"additionalProperties":false},"binding":{"method":"GET","path":"/api/v1/runs","scope":"runs:read"}},{"name":"submitDocument","description":"Create a document and obtain a presigned S3 upload URL. Presign flow (D2 — presign-only in v1): create the document, PUT the bytes to `uploadUrl` (expires in 15 minutes), then POST /confirm. Targeting: matterId XOR newMatter; when batchId is present the document INHERITS the batch matter and any member-level matter field is a 400. Limits: 50MB per file; the accepted `mimeType` values are exactly the enum on this request body.","inputSchema":{"type":"object","properties":{"verticalId":{"type":"string","enum":["legal-ediscovery","accounts-payable","finance-claims","oil-gas-ecr"],"description":"Verticals available on the public API today. Any other value is refused with code unsupported_vertical. For accounts-payable, submissions are invoices only — purchase orders and goods receipts arrive through your ERP connector setup, never through this endpoint."},"filename":{"type":"string"},"mimeType":{"type":"string","enum":["application/pdf","application/vnd.openxmlformats-officedocument.wordprocessingml.document","text/plain","application/json","text/csv","application/vnd.openxmlformats-officedocument.spreadsheetml.sheet","message/rfc822","application/vnd.ms-outlook","application/x-pst","application/zip","application/x-zip-compressed","application/octet-stream","image/jpeg","image/jpg","image/png","image/gif","image/webp","image/tiff","image/bmp"]},"sizeBytes":{"type":"integer","minimum":1,"maximum":52428800},"title":{"type":"string","maxLength":300},"batchId":{"type":"string"},"matterId":{"type":"string"},"newMatter":{"$ref":"#/components/schemas/NewMatter"}},"required":["verticalId","filename","mimeType","sizeBytes"],"additionalProperties":false},"binding":{"method":"POST","path":"/api/v1/documents","scope":"intake:write"}}],"notImplemented":["MCP transport (JSON-RPC over stdio/SSE) — this document is a tool manifest, not a running MCP server. Roadmap: intake-api.yaml #mcp_server.","A2A agent card (/.well-known/agent.json) — not published. Roadmap: intake-api.yaml #a2a_agent_card."]}