> ## Documentation Index
> Fetch the complete documentation index at: https://docs.alforse.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Integrations

> The AI gateway policy inspector and Google Calendar sync.

## AI gateway

`POST /ai-gateway/inspect` · requires `contract_view` (view)

<ParamField body="provider" type="string" required />

<ParamField body="model" type="string" required />

<ParamField body="purpose" type="string" required />

<ParamField body="input" type="string" required>Max 8000 characters.</ParamField>

<ParamField body="toolName" type="string" />

Runs a proposed AI request against the tenant's AI gateway policy (allowed providers/models,
redaction mode) **before** it's sent anywhere — see `AI_GATEWAY_MODE`,
`AI_GATEWAY_ALLOWED_PROVIDERS`, and `AI_GATEWAY_ALLOWED_MODELS` in
[Configuration](/configuration#data-handling-ai-gateway). This is a policy/compliance control
available on the `business` plan and above, not a general-purpose AI completion endpoint.

## Google Calendar

All endpoints require `admin` (edit) except the OAuth callback, which is public (the provider
redirects here directly and cannot attach a bearer token).

| Endpoint                                   | Notes                                                              |
| ------------------------------------------ | ------------------------------------------------------------------ |
| `GET /google-calendar/status`              | Whether this tenant has an active Google Calendar connection.      |
| `GET /google-calendar/start?next=`         | Redirects into Google's OAuth consent flow.                        |
| `GET /google-calendar/callback`            | **Public.** Google redirects back here to complete the connection. |
| `POST /google-calendar/sync-open-payments` | Pushes open/upcoming payments into the connected calendar.         |
