Grounded answer over the org's account-level corpus
Scope: ask. Rate tier: pipeline. ask, dashboards:read, dashboards:write, datasets:write, recordings:write, ingest are the available scopes. Lochless workspaces: /ask runs the same search as /context (from, to, metadata, read_limit_usd, mode; every date unless from/to narrow it), then writes a short answer from the results it kept. The response is answer (cites its evidence as [1], [2]), evidence (only the cited results: n, document_id, date, metadata, text, score), tokens_scanned, coverage {mode, documents_read, documents_total, complete} and request_id. read_limit_usd (default 1) caps what the call may cost, answer fee included: the search reads up to read_limit_usd less the fee, best-matching documents first, and a limit at or below the fee is a 400. Billed as the search's tokens scanned plus the answer fee; a call that writes no answer is not billed. A call still running after about 15 s answers 200 at once and keeps the connection open with whitespace until its JSON is ready; an error after that point is the error envelope in that body. dry_run returns documents_matched, tokens_to_scan, price_usd (what the call would cost: the scan within the limit plus the answer fee), read_limit_usd and complete, for free.
Request
- Base URL: https://api.lochless.io/api/v1
- URL: https://api.lochless.io/api/v1/ask
- Auth: HTTP bearer
Request body
Response
answer + references + a formatted text block + scope (the range actually read: { since, until, scanned, total, complete, bounded_by }) + tokens_scanned (your text this answer read, each piece once)
Changes
No recorded changes to this operation across all 1 revision of this API.