Skip to content

Authentication

Send the key in the X-API-Key header:

Terminal window
curl https://api.uavcrew.ai/v1/auth/validate -H "X-API-Key: uav_..."

Keys start with uav_. Keep them on your server; never embed them in a web page or mobile app.

Calling Use
Chat, stream, proposals, documents The tenant chat key for that customer
Tenants The platform key from your MCP connection
Answers An organization key with answers:regulations
Location An organization key with location:read
MCP registration An organization key with mcp:register

Each key has scopes that limit what it can call. A call without the right scope returns 403. See the scope list.

If you prefer not to send the key on every request, exchange it for a short-lived token:

POST /v1/auth/token
{ "api_key": "uav_..." }
{
"access_token": "eyJ...",
"refresh_token": "eyJ...",
"token_type": "bearer",
"expires_in": 3600
}

Send it as Authorization: Bearer <access_token>. Before it expires, call POST /v1/auth/refresh with { "refresh_token": "..." } for a new one. If a request carries both a key and a token, the key is used.

  • GET /v1/auth/validate — whether the key is valid, and its scopes.
  • GET /v1/auth/me — who the current key or token belongs to.