Skip to documentation

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.

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 URLhttps://your-host/api/v1 (REST) · https://your-host/api/mcp (MCP).
  • AuthAuthorization: Bearer $ELI_KEY on every request.
  • Scopeskb: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?

If the consumer is itself an agent, skip the REST choreography: the MCP server exposes the KB, graph, and data layer as native tools under the same key and RLS.