Cloudflare AI Gateway vs SGLang
Cloudflare AI Gateway
cloudflare.comSGLang
sglang.ioSide by side
| Figure | Cloudflare AI Gateway | SGLang |
|---|---|---|
| Price from | Free | Free |
| Free plan | Yes | Yes |
| Free trial | — | — |
| Open source | — | — |
| Web | Yes | — |
| macOS | — | Yes |
| Linux | — | Yes |
| API | Yes | Yes |
| Self-hosted | — | Yes |
| Plans published | 3 | 1 |
| Spec score · LLM Gateway Software | 8.7 (#5) | 8.1 (#12) |
| Spec score · LLM gateways | 7.9 (#18) | 8.4 (#11) |
| Caching | Responses can be served from Cloudflare's global cache, with configurable TTL and per-request controls; Cloudflare says latency can fall by up to 90% for repeated queries. | The project describes hierarchical KV caching across GPU memory, host memory, and external storage through ecosystem projects including HiCache, Mooncake, and LMCache. |
Plans
Cloudflare AI Gateway
- AI Gateway corePriced on request
- AI Gateway coreFree
- Cloudflare AI Gateway listingPriced on request
In their own words
Cloudflare AI Gateway
Cloudflare AI Gateway has no write-up on Specifiction yet; its figures are above.
SGLang
SGLang is a free, open-source inference framework for serving large language, vision-language and diffusion models. It targets agentic workloads, reinforcement-learning rollouts and large-scale serving, from one GPU to distributed clusters. Runtime features include RadixAttention, prefix caching and multi-GPU parallelism. Listed optimizations include disaggregated prefill and decode, speculative decoding, a zero-overhead scheduler and optimized GPU kernels. Supported models include DeepSeek, Qwen, GPT-OSS, Llama, Mistral and GLM. SGLang works with Hugging Face and OpenAI APIs and exposes OpenAI-compatible endpoints. It installs with pip or Docker and supports self-hosted deployment. Hardware support spans NVIDIA and AMD GPUs, Google TPUs, Intel GPUs and CPUs, Apple Silicon, Huawei Ascend NPUs and Moore Threads GPUs. SGLang Diffusion adds image and video generation. The Apache-2.0 license permits open-source use.