Create Answer
POST
/v1/answers
const url = 'https://api.uavcrew.ai/v1/answers';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 \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "question": "example", "context": { "page": "example" }, "history": [ { "question": "example", "answer": "example" } ] }'Answer one question from the FAA regulatory corpus.
context.page is an untrusted framing hint (e.g. which explainer
page the user is on); it filters nothing. The response’s sources
list is assembled from the corpus lookups actually performed.
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
AnswerResponse
object
answer
required
Answer
string
sources
required
Example generated
{ "answer": "example", "sources": [ { "type": "example", "citation": "example", "reference": "example", "status": "example", "url": "example" } ], "thinking": "example"}Validation 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": {} } ]}