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.
Executable surface / REST
One governed engine, exposed through REST
92 documented operations expose the same capabilities the workspace uses — the same key, the same scopes, and the same row-level security behind every one of them.
Start here
Three references, three jobs. The guides below walk each capability end to end with runnable curl; the API console is the exhaustive schema and a live runner in one place — read an operation, then fire it; the OpenAPI document is the machine-readable source both are generated from.
/api/v1/openapi.json — feed it to codegen, Postman, or your own client. Public and cacheable.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://eli.ai/api/v1(REST) ·https://eli.ai/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?