Skip to content

Embed regulatory answers

The Answers API takes a question and returns an answer with its sources. It needs no conversation, tenant or MCP Gateway, which makes it a good fit for help panels and public pages.

In the dashboard, open API keys, create a key and select the Regulatory answers scope (answers:regulations). Keep the key on your server.

Terminal window
curl -X POST https://api.uavcrew.ai/v1/answers \
-H "X-API-Key: $UAV_ANSWERS_KEY" \
-H "Content-Type: application/json" \
-d '{
"question": "Can I fly over people at night under Part 107?",
"context": { "page": "night-operations" }
}'
  • question — 3 to 2,000 characters.
  • context.page — optional, up to 60 characters. A short label for where the question was asked, used for reporting.
{
"answer": "Yes, with conditions. ...",
"sources": [
{
"type": "regulation",
"citation": "14 CFR 107.29",
"reference": "Operation at night",
"status": "current",
"url": "https://www.ecfr.gov/current/title-14/section-107.29"
}
]
}

Show the sources with the answer. status tells you whether a source is current rule text or a proposal that is not yet in force.

A 502 means the answer could not be produced. Show a short fallback message and let the user try again.