Ask AI chat (SSE)
Searches the site's docs and streams an answer with numbered citations. The response is text/event-stream, with these events in order:
| Event | Data |
|---|---|
sources | [{ n, title, heading?, url }] cited sources |
text | { t } a piece of text (many times) |
done | { model, sig?, notice? } |
error | { message, code? } |
done.sig is the server's signature for this turn; send it back with the matching assistant message in follow-ups. Turns without a valid signature aren't passed to the model as context.
Questions clearly unrelated to the docs get no generated answer: text is a fixed note and done is { model: null, notice: "offtopic" }.
When the site reaches its daily limit, only related docs are returned and done is { model: null, notice: "budget" }.
Requirements on the hosted platform:
- Requests must come from the site's own pages (
Originmatches the site andSec-Fetch-Siteissame-origin); otherwise 403. - Sites built with a recent version must also send a session token in the
X-Biti-AI-Tokenheader. If it's missing or expired you get 401 (code: "ai_token"); fetch a new one and retry.
Rate limits: 12 per minute and 200 per day per IP (per /64 for IPv6); 60 per minute and 1000 per day per network (/24 for IPv4, /48 for IPv6); at most 2 answers at a time per IP. Returns 404 when the site has Ask AI turned off, and 503 when no key is configured or the monthly quota is used up. Because requests must be same-origin, Try it on API reference pages can't call this endpoint.