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

EndpointMethodDescription
/v1/chat/completionsPOSTSend a chat request through the gateway. Response format matches standard chat completion structure.
/v1/usageGETRetrieve token and cost usage for a given team or API key, filterable by date range.
/v1/audit-logGETRetrieve audit log entries, filterable by team, user, or connector source. Requires an admin-scoped key.
/v1/approvalsGETList pending approval requests queued for the authenticated approver.
/v1/approvals/{id}POSTApprove, edit, or reject a specific queued action.

Rate limits

PlanRequests / minBurst allowance
Starter6090
Professional600900
EnterpriseCustom, set per contractCustom

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.