# Cloudflare AI Gateway

Describes Keryn 0.5.2 and keryn-rules 0.8.0.

> Triage through your Cloudflare AI Gateway to any provider: endpoint, key header, and what is sent.

Source: https://keryn.dev/docs/reference/connectors/cloudflare/

The gateway is a second party between you and the provider. Findings and your key go to Cloudflare, which forwards them to the provider named in the model (`provider/model`). The key you enter is the upstream provider's, and the gateway's own logging and caching settings, which you control in your Cloudflare account, decide what Cloudflare keeps.

## Endpoint and protocol

| Fact | Value |
|---|---|
| Endpoint | `https://gateway.ai.cloudflare.com/v1/{account}/{gateway}/compat`, with `{account}` taken from *Account ID* and `{gateway}` taken from *Gateway* |
| Protocol | Chat Completions |
| Key | `Authorization: Bearer <key>` |
| Reply format | JSON mode; the instruction asks for the verdict shape and Keryn checks it |
| Suggested models | `anthropic/claude-opus-5-5`, `openai/gpt-5` (the first is the default; any model your account can use works) |
| Page can reach it | yes, `https://gateway.ai.cloudflare.com` is in Keryn Web's content security policy |

## Fields

| Field | Kind | Default | Notes |
|---|---|---|---|
| Account ID | text |  |  |
| Gateway | text | `default` |  |
| Provider key | secret |  | The upstream provider's key; the model is provider/model, e.g. anthropic/claude-opus-5-5 |
| Model | text |  |  |

How keys and values are stored is on the [connectors overview](https://keryn.dev/docs/reference/connectors/#storage).

## What leaves your machine

> **Leaves your machine, only when you press Triage and confirm the panel, which names the model and the host:** Each request is pinned to the one origin you configured: no cookies, no referrer, and a redirect to another origin is refused.
>
> - For up to 60 findings, in batches of 15: rule, title, severity, file, line, engine, proof, confidence, taxonomy, untrusted.
> - Unless you untick it, a window of code around each finding: at most 2,400 characters, with credential-like text replaced by [REDACTED] first.
> - Your key, sent to gateway.ai.cloudflare.com/v1/…/…/compat and to nowhere else.

**Test** sends no finding. It asks the endpoint for its model list with your key, which checks the address and key without spending tokens.

*Generated from the product's connector catalog (monorepo 27434c1bb57f) by `tools/extract-product-facts.mjs`.*
