Stream Answer
POST
/v1/answers/stream
const url = 'https://api.uavcrew.ai/v1/answers/stream';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"question":"example","context":{"page":"example"},"history":[{"question":"example","answer":"example"}]}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://api.uavcrew.ai/v1/answers/stream \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "question": "example", "context": { "page": "example" }, "history": [ { "question": "example", "answer": "example" } ] }'Stream one answer as Server-Sent Events.
Events: thinking (model reasoning, live), tool_call (corpus lookup), answer_delta (answer tokens), done ({answer, sources, thinking}), error. Same scope, validation, and statelessness as POST /v1/answers.
Authorizations
Section titled “Authorizations”Request Bodyrequired
Section titled “Request Bodyrequired”Media typeapplication/json
AnswerRequest
object
question
required
Question
string
context
Any of:
AnswerContext
Untrusted rendering hint from the caller’s site.
page biases framing only (“the user is on the Part 107 page”) — it
filters nothing, so a forged hint can only ever yield regulatory
answers from the public corpus.
null
history
Any of:
Array<object>
HistoryTurnOne prior Q&A pair, resent by the caller to give follow-ups context.
The endpoint stays stateless: the caller owns the thread and decides how much history (and therefore prompt cost) to resend.
object
question
required
Question
string
answer
required
Answer
string
null
Example generated
{ "question": "example", "context": { "page": "example" }, "history": [ { "question": "example", "answer": "example" } ]}Responses
Section titled “Responses”Successful Response
Media typeapplication/json
Example generated
exampleValidation Error
Media typeapplication/json
HTTPValidationError
object
detail
Detail
Array<object>
ValidationErrorobject
loc
required
Location
Array
msg
required
Message
string
type
required
Error Type
string
input
Input
ctx
Context
object
Example generated
{ "detail": [ { "loc": [ "example" ], "msg": "example", "type": "example", "input": "example", "ctx": {} } ]}