Cloudflare Workers AI vs xAI
xAI sells closed Grok models with live X data. Cloudflare Workers AI sells open models at the edge, with long context that avoids Grok 4.6's 200K price doubling.
By The Subconscious Team · Updated
Cloudflare Workers AI vs xAI: key differences
The models are the first split. xAI's Grok 4.6 is closed, carries a 500K context, and costs $2 in and $6 out per million tokens under 200K prompt tokens. Past that line the whole request bills at double. Older Grok 4.20 and 4.3 keep a 1M window at $1.25 in and $2.50 out, cheap output for that class. Cloudflare serves open models only: DeepSeek V4 Pro with a 1M context at $1.32 in and $3.96 out, GLM 5.3, Kimi K2.7 Code and gpt-oss 120B at $0.35 in and $0.75 out. For long-context agents, Cloudflare's prefix caching and session affinity lower the cost of rereading prompts, while Grok 4.6's surcharge punishes long contexts.
xAI's real differentiator is data. Server-side Web Search and X Search pull current posts straight from X, which no other lab offers natively, and xAI adds a multi-agent Grok 4.20, the grok-build coding model and separate image, video and audio APIs. Grok 4.6 runs around 54 tokens per second. Cloudflare has no live-data tools of its own but offers the Agents SDK, storage and AI Gateway for caching, fallbacks and spend logs, plus bring-your-own LoRA on smaller models. xAI has a smaller enterprise footprint and fewer cloud-marketplace options. For news and sentiment agents, xAI is the natural pick. For cost-sensitive open-model features inside Workers apps, Cloudflare fits better.
What Cloudflare Workers AI and xAI do
Cloudflare Workers AI
Workers AI is the serverless GPU inference service of Cloudflare, which was founded in 2009. It launched in September 2023 and reached general availability in April 2024. Models run on GPUs inside Cloudflare's own network and are called from a Worker through an AI binding or over REST, including OpenAI-compatible Chat Completions and Embeddings endpoints plus a Responses endpoint for gpt-oss. The catalog lists 50+ open models. Since Kimi K2.5 arrived in March 2026 it has carried frontier-scale LLMs: Kimi K2.6 and K2.7 Code, GLM 5.2 and 5.3, DeepSeek V4 Pro and Flash, gpt-oss 120B and 20B, Qwen 3.8 27B and Llama 4 Scout. DeepSeek V4, added August 14, 2026, was the first to offer the full 1,048,576 token context.
Example models: DeepSeek V4 Pro, GLM 5.3
Full Cloudflare Workers AI profilexAI
xAI sells the Grok models through its own API. Grok 4.6 is the current flagship and xAI tells developers to use it for everything outside audio, image and video, code included. It has a 500K context window and costs $2 in and $6 out per million tokens under 200K prompt tokens. Older Grok 4.20 and 4.3 models keep a 1M window at $1.25 in and $2.50 out, which is aggressive for that capability class.
Example models: Grok 4.6, Grok 4.20
Full xAI profileShould you choose Cloudflare Workers AI or xAI?
Cloudflare Workers AI
Choose Cloudflare Workers AI for
- Open-weight models with no vendor lock-in
- Long prompts without a 200K price doubling
- Agents running end to end on Workers
xAI
Choose xAI for
- Social listening with native X Search
- Cheap output on Grok 4.20 with 1M context
- Image, video and audio from one vendor
Cloudflare Workers AI vs xAI at a glance
| Attribute | ||
|---|---|---|
| Model access | Open weights | Closed |
| Flagship models | DeepSeek V4 Pro, GLM 5.3, Kimi K2.7 Code, gpt-oss 120B | Grok 4.6, Grok 4.20, grok-build |
| Speed | Unknown | ~54 tok/s on Grok 4.6 |
| Price | $0.011 per 1K Neurons; 10K free daily | $2 in, $6 out (Grok 4.6); 2x past 200K |
| Customization | BYO LoRA on small models (beta) | Unknown |
| Deployment | Serverless on Cloudflare network | First-party API |
| Long context | 1M on DeepSeek V4; 262K on Kimi | 500K (4.6), 1M (4.20, 4.3) |
Frequently asked questions
What is the difference between Cloudflare Workers AI and xAI?
xAI sells closed Grok models with live X data. Cloudflare Workers AI sells open models at the edge, with long context that avoids Grok 4.6's 200K price doubling.
When should I choose Cloudflare Workers AI over xAI?
Open-weight models with no vendor lock-in; Long prompts without a 200K price doubling; Agents running end to end on Workers.
When should I choose xAI over Cloudflare Workers AI?
Social listening with native X Search; Cheap output on Grok 4.20 with 1M context; Image, video and audio from one vendor.
Is Cloudflare Workers AI or xAI cheaper?
Cloudflare Workers AI: $0.011 per 1K Neurons; 10K free daily. xAI: $2 in, $6 out (Grok 4.6); 2x past 200K. The cheaper choice depends on the model and workload.
Which has more context, Cloudflare Workers AI or xAI?
Cloudflare Workers AI: 1M on DeepSeek V4; 262K on Kimi. xAI: 500K (4.6), 1M (4.20, 4.3).
Related comparisons
Subconscious vs Cloudflare Workers AI
OpenAI vs Cloudflare Workers AI
Anthropic vs Cloudflare Workers AI
Google Vertex AI vs Cloudflare Workers AI
Amazon Bedrock vs Cloudflare Workers AI
Together AI vs Cloudflare Workers AI
Subconscious vs xAI
OpenAI vs xAI
Anthropic vs xAI
Google Vertex AI vs xAI
Amazon Bedrock vs xAI
Together AI vs xAI
Running long-horizon agents?
If your agents run past 200K tokens, compare both against Subconscious. Our inference stack treats a long-horizon trace as the primary workload, so speed, cost, and accuracy hold up deep into the trace.