POST
/api/v1/ai/pages/{slug}/askAsk about a page
Answers a question about a page you can read, from its content and the embedded items you can open. Send earlier turns in history to follow up. Streams the answer as server-sent events: delta events, then done.
API token requiredOr edit secret30 per minute per IP
Guide: AI in pages
Code samples and Try itPath parameters
#slugstringRequiredThe document's address: the part after
markdrop.in/.
Headers
#X-Read-PasswordstringThe password of a password-protected document.
X-Edit-SecretstringThe document's edit secret (
sk_…), for a document published without an account. See Edit key.X-Markdrop-WorkspacestringA workspace's id: answer only if the document is in that workspace, else
404. Workspace domains send it; you rarely need it.
Request body
#application/json, required
questionstringRequiredYour question. Up to 4,000 characters.
historyarray of anyEarlier questions and answers in this conversation, as
{q, a}, oldest first. Up to 40 items.
Responses
#200OK.401No token, or the token is revoked or mistyped.422The request didn't validate.detaillists each problem, with where it is (loc) and why (msg).429Too many requests from your IP address. Wait the seconds inRetry-After.