About Cloudflare Workers AI
Workers AI lets developers run machine learning models on Cloudflare's network without managing servers or GPUs. Models are called from Cloudflare Workers code through bindings or over a REST API, and the service is billed as part of the wider Cloudflare platform.
Its documentation covers a model catalog, OpenAI-compatible API endpoints, integration with the Vercel AI SDK, an asynchronous batch API, function calling, JSON mode, prompt caching and fine-tuning with LoRA adapters. A markdown conversion feature turns supported file formats into text for model input. Related pages describe limits, pricing and a playground for trying models.
Workers AI is a proprietary, cloud-only service from Cloudflare, so there is no self-hosted option. Pricing and platform limits are documented in the Workers AI docs rather than summarized on the overview page.
Key features
- Serverless GPU inference without server management
- Workers bindings and REST API access
- OpenAI-compatible API endpoints
- Function calling and JSON mode
- LoRA adapter fine-tuning support
- Asynchronous batch API
Good fit for
- →Adding inference to Cloudflare Workers apps
- →Prototyping with hosted open models
- →Batch processing prompts asynchronously
- Tags
- serverless
- inference
- gpu
- cloudflare
- llm
- edge
- ai-infrastructure
Cloudflare Workers AI: questions and answers
- What is Cloudflare Workers AI used for?
- Cloudflare Workers AI is a serverless service for running machine learning models on Cloudflare's network using serverless GPUs. It is a good fit for adding inference to Cloudflare Workers apps, prototyping with hosted open models and batch processing prompts asynchronously.
- How much does Cloudflare Workers AI cost?
- Cloudflare Workers AI is a paid product with no free plan. Usage-based pricing per million tokens, varying by model. Llama 3.2 1B costs $0.027 per million input tokens and $0.201 output; embeddings start at $0.012 per million input tokens.
- Is Cloudflare Workers AI open source?
- No. Cloudflare Workers AI is proprietary (closed-source) software and can't be self-hosted. Open-source alternatives to Cloudflare Workers AI include beta9, vLLM and LocalAI.
- What are some alternatives to Cloudflare Workers AI?
- Cloudflare Workers AI competes with Replicate, Together AI and Fireworks AI. For open-source options, see Enlisted's ranked list of open-source Cloudflare Workers AI alternatives.
Open-source alternatives to Cloudflare Workers AI
See all
beta9
AI Infrastructure
Ultrafast serverless GPU inference, sandboxes, and background jobs
AGPL-3.0vs Modal★ 1.8k
vLLM
AI Infrastructure
A high-throughput and memory-efficient inference and serving engine for LLMs
Apache-2.0vs Amazon Bedrock★ 93k
LocalAI
AI Infrastructure
LocalAI is the open-source AI engine. Run any model - LLMs, vision, voice, image, video -
MITvs ChatGPT★ 49k
SGLang
AI Infrastructure
SGLang is a high-performance serving framework for large language models and multimodal mo
Apache-2.0vs Amazon Bedrock★ 37k
llama.cpp
AI Infrastructure
LLM inference in C/C++
MITvs OpenAI API Platform★ 130k
MLC LLM
AI Infrastructure
Universal LLM Deployment Engine with ML Compilation
Apache-2.0★ 23k
SaaS alternatives to Cloudflare Workers AI
See all
Replicate
AI Infrastructure
API platform for running open-source AI models in the cloud
SaaS
Together AI
AI Infrastructure
Cloud platform for running, fine-tuning and training open and custom AI models
SaaS
Fireworks AI
AI Infrastructure
Inference platform for running and fine-tuning generative AI models at low latency
SaaS
DeepInfra
AI Infrastructure
Pay-per-use API for running open-source AI models
SaaS
Baseten
AI Infrastructure
Inference platform for deploying and scaling AI models in production
SaaS
Amazon Bedrock
AI Infrastructure
Managed AWS service for building generative AI apps with models from several providers
SaaS

