Cloudflare AI Gateway
AI Gateway sits between your apps and any AI model. It inspects, governs, logs, and protects every request — without changing a line of client code. Below: what it does, then a live playground you can break.
← Back to itlinux.ccEvery prompt from any client — a browser, curl, OpenCode, Claude Code, Cursor — flows through the same gateway. That's where policy lives.
Scans prompt content in real time. A prompt containing an SSN, credit card, or secret is blocked at the edge with an HTTP 424 — before it ever reaches the model.
Model-safety layer that flags or blocks unsafe categories (self-harm, hate, weapons, and more) on both the prompt and the response.
Every request/response is logged with status codes and block actions. See exactly what was asked, answered, or blocked — no client opt-in required.
Cache identical responses to cut cost and latency, and apply per-app rate limits — all at the gateway, independent of the upstream provider.
OpenCode, Claude Code, Cursor, curl, or this web page — anything that sends prompts through the gateway gets the same policy. One toggle, everywhere.
Point it at Workers AI, OpenAI, Anthropic, Google, or others. Swap models without touching your governance — the policy stays put.
Any app POSTs a prompt through the gateway URL.
Content is inspected inline against policy.
Clean prompts reach the model; response returns 200.
SSN/PII/unsafe content is stopped before the model. Nothing leaks.
This chat runs on a free Workers AI model behind the gateway. Ask a normal question and you'll get an answer. Paste a fake SSN like 123-45-6789 and watch it get blocked inline.
Real DLP block signature: HTTP 424 · {"code":2030,"message":"Request content blocked due to DLP policy violations"}