The GovernAI API is a drop-in replacement for calling model providers directly — point your existing integration at the GovernAI endpoint, and routing, policy enforcement, and audit logging apply automatically with no changes to your request format.
Base URL and authentication
All requests are made over HTTPS to https://api.governai.com/v1 and authenticated with a bearer token issued from Admin → API Keys.
curl https://api.governai.com/v1/chat/completions \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"messages": [{"role": "user", "content": "Summarize this contract clause."}],
"task_type": "drafting"
}'
The optional task_type field lets the routing layer classify the request more precisely than automatic detection alone; omitting it is fine — the Governed AI Workspace will classify the request automatically.
Core endpoints
| Endpoint | Method | Description |
|---|---|---|
/v1/chat/completions | POST | Send a chat request through the gateway. Response format matches standard chat completion structure. |
/v1/usage | GET | Retrieve token and cost usage for a given team or API key, filterable by date range. |
/v1/audit-log | GET | Retrieve audit log entries, filterable by team, user, or connector source. Requires an admin-scoped key. |
/v1/approvals | GET | List pending approval requests queued for the authenticated approver. |
/v1/approvals/{id} | POST | Approve, edit, or reject a specific queued action. |
Rate limits
| Plan | Requests / min | Burst allowance |
|---|---|---|
| Starter | 60 | 90 |
| Professional | 600 | 900 |
| Enterprise | Custom, set per contract | Custom |
Rate limit headers (X-RateLimit-Remaining, X-RateLimit-Reset) are returned on every response so your integration can back off proactively rather than waiting for a 429.
Error responses
Errors follow a consistent shape across every endpoint:
{
"error": {
"code": "policy_blocked",
"message": "Request blocked by policy rule 'no-external-pii'",
"request_id": "req_8f2a1c"
}
}
Always log request_id alongside your own application logs — it's the fastest way to cross-reference an issue with the corresponding audit log entry.