Cloudflare and xAI have announced a strategic partnership that adds the full suite of Grok models — including text, image, audio, and video generation — to Cloudflare AI Gateway. Confirmed on June 4, 2026, the integration was met with immediate developer enthusiasm, with Cloudflare Dev's announcement receiving nearly 500,000 views within hours.
Key Highlights
- All Grok LLM, image, audio, and video models are now accessible via Cloudflare AI Gateway
- Billing is handled directly through Cloudflare — no separate xAI account or API key required
- Developers gain unified logging, caching, rate limiting, and observability across all AI providers in one control plane
- Drop-in compatible with OpenAI and Anthropic SDKs via a single endpoint swap
Available Models
The integration covers the entire current Grok model lineup:
- Grok 4.3 — Primary text model with a 1-million-token context window, supporting text and image inputs, function calling, and structured outputs. Priced at $1.25 per million input tokens and $2.50 per million output tokens.
- Grok 4.20 Multi-Agent — Features a 2-million-token context designed for parallel research workflows, at $2.00 per million input and $6.00 per million output tokens.
- Grok 4.20 Reasoning / Non-Reasoning — Chain-of-thought variants for tasks requiring step-by-step problem solving.
- Grok Build 0.1 — xAI's dedicated software engineering model with a 256K token window, available since May 28, 2026, priced at $1.00 per million input and $2.00 per million output tokens.
- Grok Imagine — Image generation and editing models (standard and high-fidelity variants).
- Grok Imagine Video — Video generation and extension capabilities.
How It Works
Requests route through a standard Cloudflare gateway endpoint:
https://gateway.ai.cloudflare.com/v1/{account_id}/{gateway_id}/grok
Developers already using Cloudflare Workers, Pages, D1, or R2 can integrate Grok models with minimal configuration changes. The gateway accepts requests via cURL, OpenAI SDK (JavaScript and Python), and Anthropic SDK — making it a drop-in replacement for any existing multi-model routing setup.
Impact for Developers
The move positions Cloudflare as an end-to-end AI infrastructure layer. Rather than managing separate API keys, authentication flows, and billing accounts for each AI provider, developers get a single control plane covering model routing, request logging, rate limiting, caching, and consolidated invoicing.
For teams already operating within the Cloudflare ecosystem, this amounts to near-zero onboarding cost to access the full Grok model family — including Grok Imagine Video 1.5 Preview, one of the more capable video generation models currently available via public API.
Background
Cloudflare AI Gateway already aggregates models from OpenAI, Anthropic, Google Gemini, DeepSeek, and others under a unified interface. Adding xAI's Grok expands the roster and gives enterprise teams more flexibility when selecting models for different pipeline stages — with cost, context length, and latency trade-offs now manageable from a single dashboard.
The partnership follows xAI's rapid expansion of Grok's API availability and the May 28 public beta launch of Grok Build 0.1, which targets software engineering tasks directly competing with GitHub Copilot and Cursor.
What's Next
With the full Grok stack now on Cloudflare, expect accelerated adoption among teams building multi-agent workflows that require mixing text reasoning, code generation, image analysis, and video synthesis within a single pipeline — all routed through one billing account.