Lookio Docs
Lookio websiteOpen Lookio
AssistantsAsk an assistant a question
assistants

Ask an assistant a question

Answers from the assistant's resources, with the passages it relies on. The assistant is one of yours, or a public assistant from GET /v1/public-assistants (paid by your workspace too, its citations without resource_id). Costs Eco 10, Flash 30 credits (the default), Deep 80 per question, depending on mode and whatever the answer's length, even when the resources hold no answer or the message is a greeting; an assistant that reads no resource is refused with the error assistant_has_no_resources (409), before any credit is held. The modes: Eco (10 credits) searches like Flash on a cheaper tier that may wait a few seconds, and computes exact totals, averages, counts and filters over every row of the tables in the resources (CSV, spreadsheets, tables in documents), saying how many values are missing; it also counts a phrase given in quotes across every document. Flash (30 credits, the default) answers quickly from the most relevant passages of the resources; it computes nothing over tables. Deep (80 credits) searches the question first, splits it into sub-questions in the documents' own terms, searches each part, reranks the evidence, computes exact figures over tables like Eco, and answers with a stronger model. The answer is filed in a conversation: the response carries its conversation_id and the answer's message_id, and a follow-up sends only the new question with that conversation_id, Lookio reads the history itself. A person continues their own chats; an API key continues the conversations it started. An API key can also send end_user (its own id for the person asking), which keeps each user's conversations apart and is required again to continue them, and store: false to keep nothing (then bring the previous turns yourself as history). Kept conversations are readable in the workspace's logs for as long as the plan keeps them readable (7 days on Free, 90 on Starter, 1 year on Pro, from the last message), then deleted some time later. By default the full answer comes back as JSON. With stream: true it comes as server-sent events (text/event-stream): status {phase}, delta {text} for each piece of the answer, then done with the same fields as the JSON answer (conversation_id and message_id included), or error with the standard error envelope. A stream that fails before its first event is an ordinary JSON error. Send an Idempotency-Key header so a retried JSON request is not charged twice (it does not apply to a stream: do not retry one blindly).

POST/v1/assistants/{assistant_id}/query

Requires query.

This is the only call that spends credits. The cost depends on mode:

modeCredits
eco10
flash (default)30
deep80

The price is fixed, whatever the length of the answer. An answer that finds nothing, or a greeting, costs the same: every question the model works on is charged. The only refusal that costs nothing is assistant_has_no_resources (409): the assistant reads no resource, so nothing is sent to a model and no credit is held. Connect resources to the assistant, then ask again. See Core concepts.

Lookio holds the price of the mode before it starts. If the balance cannot cover the hold, the call fails with insufficient_credits, and the error carries a link to the pricing page in action_url.

Conversations. Every answer is kept in a conversation, for a person and for an API key. The response carries conversation_id and, for an API key, the answer’s message_id. Send the next question with that conversation_id and Lookio reads the history itself. A conversation stays with its assistant and, for an API key, with the key that started it. Sending conversation_id with history fails with invalid_request: history is for when you keep the conversation yourself (up to 20 turns, the last 6 are used).

End users and storage (API keys). Send end_user, your own id for the person asking, to group that person’s conversations: a conversation can then only be continued, read or deleted with the same end_user. Send store: false to keep nothing: no conversation and no log, and conversation_id and message_id come back null. A kept conversation is readable in the workspace’s logs and deleted 90 days after its last message. A person’s connection that sends end_user or store gets invalid_parameter. See Conversations and end users.

Streaming. Set stream to true to receive server-sent events instead of JSON. See Streaming.

Retries. Send an Idempotency-Key so a retried JSON request is not charged twice. A stream is not replayed: do not retry one blindly. See Idempotency.

The assistant answers only from resources that are ready. When the sources hold no answer, it says so and charges the same price for that question.

Authorizations

Authorizationbearerin headerrequired

Path parameters

assistant_idstringrequiredpattern: ^ast_[abcdefghjkmnpqrstuvwxyz23456789]{12}$

Header parameters

Idempotency-Keystringlength: 1–255 chars

A unique key for this request, such as a UUID, 1 to 255 visible ASCII characters. Send the same key when you retry: the first response is returned (with Idempotent-Replayed: true) instead of running the request again, for 24 hours, per credential. The same key on a different request is a 409 conflict. A streamed answer is not recorded.

Body

application/jsonrequired
questionstringrequiredlength: 1–12000 chars
conversation_idstringpattern: ^(?:res|doc|ver|ast|wdg|cnv|msg|att|acc|aky)_[abcdefghjkmnpqrstuvwxyz23456789]{12}$

Continue a conversation from an earlier answer's conversation_id: Lookio reads its history itself, so send only the new question. A person continues their own chats; an API key continues the conversations it started (and, when you send end_user, only that person's). A conversation stays with the assistant that started it. Not with history and not with store: false.

historyobject[]items: ≤ 20 items

The previous turns, oldest first; the last 6 are used, and they are not stored as such. For a conversation you keep yourself. Without conversation_id, an API key's answer starts a new conversation in Lookio's logs unless store is false.

end_userstringpattern: ^[\w.@:+\-]{1,200}$

API keys only. Your own id for the person asking (a user id of your product): 1 to 200 characters, letters, digits and . _ @ : + -. Prefer an opaque id: it shows in the workspace's logs. It groups that person's conversations, and a conversation can then only be continued with the same end_user.

storeboolean

API keys only. false keeps nothing: no conversation, no log, conversation_id and message_id come back null, and the answer cannot be continued except with history. Default true: the exchange is kept, continues with conversation_id and is readable in the workspace's logs for as long as the plan keeps conversations readable (7 days on Free, 90 on Starter, 1 year on Pro). Not with conversation_id.

modeenum<string>default: flashone of: eco, flash, deep

Eco 10, Flash 30 credits (the default), Deep 80. flash is the default; eco may take longer to start, deep splits the question and answers with a stronger model. One price per answer, whatever its length. Every question the assistant works on is charged, even when its resources hold no answer or the message is a greeting; an assistant that reads no resource is refused with the error assistant_has_no_resources, before any credit is held.

streambooleandefault: false

true returns server-sent events (text/event-stream): status (searching, reading, answering), delta with each piece of the answer, then done with the full answer, or error with the standard error envelope. Comment lines (: keep-alive) arrive every 15 seconds while waiting. Idempotency-Key does not apply to a stream.

Response

application/json

Ask an assistant a question

dataobjectrequired
request_idstringrequired

Use these docs with your AI tools

An AI agent can read this documentation directly. You do not need an account or an API key. Everything here is public and read-only.

Query these docs via MCP

Recommended

Add this server to Claude, Claude Code, Cursor, Mistral, or any tool that supports MCP. Your agent can then search Lookio Docs documentation and read it in full, instead of answering from memory.

https://lookio.app/docs/mcp
  • searchFind the passages that answer a question.
  • fetchRead one page in full, as Markdown.
  • list_pagesSee every page in this documentation.

Query these docs over HTTP

The same tools also work as plain web requests. Use this for scripts, or for any tool that does not support MCP. There is one endpoint per tool. Arguments go in the query string, and the answer comes back as JSON.

https://lookio.app/docs/api/docs/search?query=custom+domain

Read the OpenAPI description. It is built from the same definitions as the tools, so it always matches what the endpoints do.

Read these docs as Markdown

Add .md to any page URL to get its Markdown source. You can also send the headerAccept: text/markdown to the page URL itself.

To read the whole documentation in one file, open llms-full.txt. For a short index of every page, open llms.txt.