API & MCP
API overview
Everything eli.ai does in the browser is available over HTTP. One authenticated surface — /api/v1 for REST and /api/mcp for Model Context Protocol — reads and writes the knowledge base, drives agents, runs governed live-data queries, and produces client-ready reports, all under the same per-workspace row-level security as the UI.
Start here
Three references, three jobs. The guides below walk each capability end to end with runnable curl; the OpenAPI reference is the exhaustive, machine-readable schema; the playground lets you fire real requests from the browser.
Task guides
Copy-paste recipes for the things integrators do most. Each ends with the leverage angle — what the capability unlocks beyond the raw call.
The shape of every request
One base URL, one bearer token, one workspace. A workspace key (eli_sk_) resolves to exactly one workspace; a user key (eli_uk_) spans the workspaces you belong to and picks one with an X-Workspace-Id header. Every key carries a set of scopes, and each endpoint requires one. Full details in Getting started with the API.
- Base URL —
https://your-host/api/v1(REST) ·https://your-host/api/mcp(MCP). - Auth —
Authorization: Bearer $ELI_KEYon every request. - Scopes —
kb:read·kb:write·data:read·data:run·reports:read·reports:write·agents:run·runs:read. - Errors — a small JSON envelope keyed by status. See Errors & rate limits.
Prefer tools over endpoints?