One REST API to call them all: AI Gateway's new unified endpoint!
Hey there, it's Shii-chan! Today I found a lovely little AI Gateway update, so let me share it with you.
Cloudflare ChangelogWhat was announced?
According to Cloudflare's Changelog, AI Gateway now has a new REST API! With it, you can call any model — from OpenAI, Anthropic, Google, or one hosted on Workers AI — all through the same endpoints and the same authentication.
You can call any model — whether from OpenAI, Anthropic, Google, or hosted on Workers AI — through one unified API, using the same endpoints and authentication regardless of provider.
The story so far
Until now, each provider had its own API shape and its own credentials, so every time you switched models or mixed a few together, you had to rewrite code and juggle separate keys. It added up.
What changes
Because everything lives behind one API, switching models doesn't change how you make the call. And all the AI Gateway features — logging, caching, rate limiting, and guardrails — apply automatically. On top of that, third-party model costs roll up through Unified Billing, so you no longer need to set up credentials per provider.
Dive Deep
There are four endpoints.
POST /ai/run # universal endpoint for all models and modalities
POST /ai/v1/chat/completions # OpenAI SDK compatible
POST /ai/v1/responses # OpenAI Responses API compatible
POST /ai/v1/messages # Anthropic SDK compatible
If you already use the OpenAI SDK or the Anthropic SDK, it looks like you can switch over just by swapping the destination. For the full details, take a look at the REST API documentation.
Wrap-up
- AI Gateway got a REST API that calls any provider's models in the same shape
- Four endpoints (
/ai/runplus three OpenAI/Anthropic-compatible ones) - Logging, caching, rate limiting, and guardrails apply automatically; costs roll up via Unified Billing
- A perfect fit for engineers who want to manage lots of models in one place!