Skip to content
Readsmith

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
querystringrequiredminLen 1maxLen 2000

The search query or question.

versionstring

Docs version to scope to. Defaults to current.

localestring

Locale 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
curl 'https://readsmith.dev/docs/_readsmith/api/ask' \
  -X POST \
  -H 'Content-Type: application/json' \
  -d '{}'
POST/_readsmith/api/ask
Request
Authorization
curl 'https://readsmith.dev/docs/_readsmith/api/ask' \
  -X POST \
  -H 'Content-Type: application/json' \
  -d '{"query":"string"}'
Response
Send a request to see the response.
Response
200 OK
No response body.
Was this page helpful?