Ask a question
POST/docs/_readsmith/api/ask
Answers a question from the site's own content, streaming the reply as a server-sent-events message stream. Answers cite the pages they came from; retrieval grounds the model on full chunks, never previews.
Request bodyapplication/jsonrequired
ScopedQuery
querystringrequiredThe search query or question.
versionstringDocs version to scope to. Defaults to current.
localestringLocale to scope to. Defaults to en.
Responses
200 OKThe answer as a streamed UI message stream.
string
400 Bad request
429 Too many requests
503 Unavailable
Request
▍POST/docs/_readsmith/api/ask
curl 'https://readsmith.dev/docs/_readsmith/api/ask' \
-X POST \
-H 'Content-Type: application/json' \
-d '{}'const response = await fetch("https://readsmith.dev/docs/_readsmith/api/ask", {
method: "POST",
headers: {
"Content-Type": "application/json",
},
body: "{}",
});
const data = await response.json();import requests
response = requests.post(
"https://readsmith.dev/docs/_readsmith/api/ask",
headers={
"Content-Type": "application/json",
},
data="{}",
)
data = response.json()Response
200 OK
No response body.