# Keryn relay

Describes Keryn 0.5.2 and keryn-rules 0.8.0.

> Triage through a relay you deploy on Cloudflare, Vercel, Netlify or Supabase, so provider keys stay server-side.

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

A relay is one small request handler you deploy on your own account. Use it when the page should not hold a provider key, when a provider does not answer browser requests (CORS), or to reach FalkorDB. Keryn then talks to your relay, and the relay talks to the provider.

| Platform | Chat and Messages | FalkorDB |
|---|---|---|
| Cloudflare Workers | yes | no |
| Vercel (Node runtime) | yes | yes, with the `falkordb` package |
| Netlify Functions | yes | yes, with the `falkordb` package |
| Supabase Edge Functions | yes | no |

The relay forwards only the chat, messages and graph routes, only with a valid bearer token of at least 24 random characters, and answers CORS only for the origins you list. Provider keys live in its environment, never in the tab. The *Upstream* field says whether the relay speaks OpenAI-compatible Chat Completions or the Anthropic Messages API. **Test** calls the relay's `/health` route, which says which of chat, messages and graph it can do.

The page reaches a relay on `*.workers.dev`, `*.vercel.app`, `*.netlify.app` or `*.supabase.co`, or on `localhost`.

## Endpoint and protocol

| Fact | Value |
|---|---|
| Endpoint | the address you enter in *Relay address* |
| Protocol | Chat Completions |
| Key | `Authorization: Bearer <key>` |
| Reply format | JSON mode; the instruction asks for the verdict shape and Keryn checks it |
| Page can reach it | only `localhost`, `127.0.0.1` and the relay hosts in [the CSP list](https://keryn.dev/docs/reference/connectors/#csp); a page you host yourself can add your address |

## Fields

| Field | Kind | Default | Notes |
|---|---|---|---|
| Relay address | address |  | for example `https://keryn-relay.example.workers.dev` |
| Relay token | secret |  |  |
| Upstream | choice | `chat` |  |
| 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 the address you entered 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`.*
