Use it
HTTP API
Every endpoint of aa serve, generated from the server's OpenAPI spec.
Start it with aa serve (default http://127.0.0.1:8080). The spec below is generated from the same Zod schemas that validate requests; fetch it live at /openapi.json.
| Method | Path | Does | Responses |
|---|---|---|---|
POST | /v1/jobs | Start a job on uploaded files | 202, 400, 404, 409 |
GET | /v1/jobs | List jobs | 200 |
GET | /v1/jobs/{id} | Job status, current stage, progress, timings and errors | 200, 400, 404, 409 |
DELETE | /v1/jobs/{id} | Delete a job and its data | 204, 400, 404, 409 |
GET | /v1/jobs/{id}/events | Server-Sent Events: stage_started, stage_completed, progress, awaiting_confirmation, warning, done, failed | 200, 400, 404, 409 |
GET | /v1/jobs/{id}/metrics | Drafted metric definitions as YAML, and each in plain words | 200, 400, 404, 409 |
POST | /v1/jobs/{id}/metrics | Confirm or edit the metric definitions (YAML body); the job resumes | 202, 400, 404, 409 |
GET | /v1/jobs/{id}/report | report.json (Accept: application/json) or report.html (Accept: text/html, or ?format=html) | 200, 400, 404, 409 |
POST | /v1/jobs/{id}/ask | Ask a follow-up question; the answer is verified claims with facts and citations | 200, 400, 404, 409 |
GET | /v1/jobs/{id}/facts/{factId} | Explain a number: SQL, parameters, definition and input rows | 200, 400, 404, 409 |
POST | /v1/jobs/{id}/resume | Continue a failed or interrupted job from its last completed stage | 202, 400, 404, 409 |
GET | /v1/health | Engine, DuckDB, model, search and Docling availability | 200 |
Example
Section titled “Example”curl -F 'files[]=@examples/coffee-roaster/sales-2026.xlsx' -F 'files[]=@examples/coffee-roaster/email-0412.eml' \ -F 'options={"currency":"USD"}' http://127.0.0.1:8080/v1/jobscurl -N http://127.0.0.1:8080/v1/jobs/<job_id>/events # live progress (SSE)curl http://127.0.0.1:8080/v1/jobs/<job_id>/report?format=html > report.htmlSecurity
Section titled “Security”- The API listens on 127.0.0.1 and answers only localhost host names (plus
--hostandAA_ALLOWED_HOSTS): a request whoseHostorOriginnames another host gets 403, so a web page can’t reach it through DNS rebinding. API_TOKENturns on bearer auth for/v1/jobs*and/mcp; without the token,/v1/healthreports only the engine and DuckDB.aa serverefuses a non-loopback address withoutAPI_TOKEN(opt out with--allow-no-auth/AA_ALLOW_NO_AUTH=1behind a proxy or a localhost-only port mapping). CORS is off.- An unexpected error is a 500 with a generic message; the details go to the server log.
The full OpenAPI document, regenerated on every docs build: openapi.json.