API overview
The Lookio REST API at api.lookio.app/v1 lets you add resources, manage assistants and ask questions from your own code, with JSON, scopes and safe retries.
The REST API does everything the app does: add resources, build assistants, ask questions and manage the workspace. It applies the same rules as the app.
Base URL
https://api.lookio.app/v1Responses are JSON, except a streamed answer, which is a server-sent event stream.
Start with GET /v1/account
GET /v1/account returns the workspace of a credential and its scopes. Call it first to check the credential.
curl https://api.lookio.app/v1/account \
-H "Authorization: Bearer $LOOKIO_API_KEY"What the API covers
flowchart LR
R["/v1/resources<br/>texts, files, pages, sites"] --> A["/v1/assistants<br/>.../query to ask"]
T["/v1/tags"] -.-> R
A --> W["/v1/widgets"]
A --> AC["/v1/accesses"]
A --> C["/v1/conversations"]
C --> LG["/v1/logs"]
U["/v1/account, /v1/credits, /v1/usage"]
| Area | What you do | Reference |
|---|---|---|
| Account and usage | Read the workspace, the credit balance and the usage over time. | Get account |
| Resources | Add texts, files, web pages and sites, read their status, re-index and delete them. | List resources |
| Sites | Preview a site and tune the rules of an imported one. | Preview a site |
| Tags | List, rename and delete tags. | List tags |
| Assistants | Create, change and delete assistants, and ask them questions. | Ask an assistant |
| Conversations | List, read, rename and delete your conversations, and send your users’ thumbs. | List conversations |
| Logs | Read the four logs: conversations, answers, indexing and activity. | List the workspace’s conversation logs |
| Widgets | Put an assistant on a website, and read what visitors asked. | List widgets |
| Members | List members and change their permissions. | List members |
| Feedback | Tell Lookio what did not work as expected. | Submit feedback |
The rules in short
- JSON in, JSON out, with
snake_casefield names. See Conventions. - Bearer authentication with an API key or an OAuth token. See Authentication.
- Only questions and passage searches spend credits. They need the
queryscope. - Every POST accepts an
Idempotency-Key, so a retry does not run twice. - One error format with stable codes. See Errors.
- Rate limits per credential. See Rate limits.
The OpenAPI document
An OpenAPI 3.1 document describes every request and response.
- On this site:
/docs/openapi.json. - From the API:
https://api.lookio.app/openapi.json. - For AI agents:
https://api.lookio.app/llms.txtand/docs/llms.txt.