Skip to documentation

Get started

Examples

Five first steps you can copy, paste, and run against a live eli.ai instance — each one a real request, not pseudocode. Swap https://your-host for your instance, export your key as $ELI_KEY, and every one returns exactly the shape shown. When you want the full story behind a call — every field, every error, every knob — follow its full guide link.

Before you start

Every example authenticates with Authorization: Bearer $ELI_KEY and needs the scope shown on its badge — scope always comes from the key, never a URL or body. A workspace key (eli_sk_…) carries its workspace implicitly; a user key (eli_uk_…) additionally needs an X-Workspace-Id header. No key yet? Getting started with the API mints one in a minute.

1 · Ask your first grounded question

Bearer · agents:run

One POST in, a structured, dual-cited answer out: answer with inline [Sn] markers, the answer decomposed into atomic claims, the sources registry each marker resolves to, and a dataCalls registry (empty here — add includeData: true to ground in live rows as [Dn]).

POST /api/v1/querybash
curl -s -X POST https://your-host/api/v1/query \
  -H "Authorization: Bearer $ELI_KEY" \
  -H "Content-Type: application/json" \
  -d '{"question":"How do we handle stuck orders on the Order Platform?"}'

Full guide: Search & ask

2 · Start an agent run

Bearer · agents:run

Agents are addressed by slug. With stream: false the request blocks and returns the final RunResult as JSON — the simplest integration. Flip to stream: true (the default) for a Server-Sent Events stream of every step ending in a terminal event.

POST /api/v1/agents/{slug}/runsbash
curl -s -X POST https://your-host/api/v1/agents/budget-analyst/runs \
  -H "Authorization: Bearer $ELI_KEY" \
  -H "Content-Type: application/json" \
  -d '{"input":"What changed in the FY26 budget?","stream":false}'

Full guide: Run agents

3 · Generate a report snapshot

Bearer · reports:write

One POST freezes the live state of the knowledge base into an immutable, client-ready snapshot. The call returns immediately with the snapshot id and a generating status; the PDF renders in the background. Fetch it back with GET /api/v1/reports/{id} (structured data is ready at once) or download …/{id}/pdf once pdf.status is ready.

POST /api/v1/reportsbash
curl -s -X POST https://your-host/api/v1/reports \
  -H "Authorization: Bearer $ELI_KEY" \
  -H "Content-Type: application/json" \
  -d '{"title":"Northwind — Q3 engagement report"}'

Full guide: Build reports

4 · Connect a content source

Bearer · kb:write

Register an external source as a connector — Confluence, SharePoint, or Slack. The credential is encrypted at write and never returned (reads show only hasCredential); the source starts active and does nothing until you enqueue its first sync.

POST /api/v1/connectorsbash
curl -s -X POST https://your-host/api/v1/connectors \
  -H "Authorization: Bearer $ELI_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "type": "confluence",
    "config": { "baseUrl": "https://acme.atlassian.net/wiki", "spaceKeys": ["ENG"] },
    "credential": { "email": "svc-eli@acme.com", "apiToken": "<atlassian-api-token>" }
  }'

Full guide: Connect Confluence, SharePoint & Slack

5 · Call eli.ai from an MCP client

Bearer · eli_sk_

eli.ai is itself an MCP server at POST /api/mcp. Point Claude or any MCP client at your workspace with the same eli_sk_ key and it gets the KB, graph, and governed data layer as native, read-only tools — kb_search, kb_entity_lookup, and eli_query (the same pipeline as POST /api/v1/query), among others.

claude mcp addbash
claude mcp add --transport http eli https://your-host/api/mcp \
  --header "Authorization: Bearer eli_sk_..."

Then ask naturally — "Using the eli tools, what do we know about the Order Platform, and is anything stuck right now?" — and the client chains the tools for you. The endpoint-by-endpoint reference is in MCP server.

Full guide: MCP quickstart

Where to next

These are the opening moves. Browse every operation in the OpenAPI reference, fire real requests from the API playground, or start from the API overview for the full map of task guides.