Cloud Parts

Workers AI

Serverless inference on GPUs in Cloudflare’s network: call one of 50+ open models by name from a Worker binding or a REST API, and pay per unit of GPU work instead of renting GPUs.

Type
Commercial product
License
Proprietary (the models carry their own open licenses)
Facts checked
12 October 2026

What it is

There is nothing to deploy or scale. A Worker gets an AI binding and calls env.AI.run("@cf/…", input) with a model name from Cloudflare’s catalog; anything else calls the same models over the Cloudflare REST API, including OpenAI-compatible Chat Completions and Embeddings endpoints. The catalog covers text generation (Llama, Qwen, Gemma, Mistral, DeepSeek, GPT-OSS, Kimi and GLM models), embeddings, speech recognition, translation, classification and image generation. Cloudflare runs the models on GPUs across its data centers, and its load balancer sends a request to another city when the local GPUs are busy. Cloudflare doesn’t create or train the models and doesn’t use your prompts or outputs to train any.

Usage is measured in Neurons, Cloudflare’s unit for the GPU compute behind a request, at $0.011 per 1,000 after 10,000 free Neurons a day. Each model page converts that to familiar units: for example, @cf/meta/llama-3.1-8b-instruct-fp8-fast costs $0.045 per million input tokens and $0.384 per million output tokens. Free accounts stop at 10,000 Neurons a day, and the largest frontier models require a paid plan or prepaid AI Gateway credits.

Why teams pick it

  • No GPUs, containers or endpoints to manage: a binding and a model name are enough, and you pay nothing when idle
  • Pay per use in small units: 10,000 free Neurons a day, then $0.011 per 1,000, with per-token prices published for every LLM
  • Works from anywhere: the Worker binding, the REST API, or OpenAI-compatible endpoints that existing SDKs can point at
  • Sits next to Vectorize, AI Gateway and Workflows, so embeddings, caching, logging and multi-step pipelines stay on one platform

Watch out for

  • Only models in Cloudflare’s catalog, plus LoRA adapters on supported base models; no arbitrary custom weights without a custom request
  • Rate limits per task type: 300 requests a minute for most text generation, and 20 a minute for paid frontier models on standard billing
  • Models are retired on Cloudflare’s schedule (the changelog announces planned deprecations), so pinned model names need updating
  • Can’t run locally: wrangler dev sends inference to Cloudflare’s GPUs, and those calls count against the same limits

Alternatives

What all serverless functions (faas) have in common →

How it fits with other technologies

Stream an LLM answer from a Worker through the AI binding · ts

export default {
  async fetch(request, env): Promise<Response> {
    const { question } = await request.json<{ question: string }>();

    const stream = await env.AI.run("@cf/meta/llama-3.1-8b-instruct-fp8-fast", {
      prompt: question,
      stream: true, // server-sent events as tokens arrive
    });

    return new Response(stream, { headers: { "content-type": "text/event-stream" } });
  },
} satisfies ExportedHandler<Env>;

See it in a real stack

No architecture uses Workers AI yet. Drop it into the playground and wire it up yourself.Open playground →
Where it came from2023–2026

In 2023 using AI in an application mostly meant either calling closed, proprietary models or finding GPUs and setting up infrastructure to run open ones. Cloudflare, with over a million active developers on its platform, launched Workers AI on September 27, 2023 as inference as a service: a curated set of open models, such as Llama 2, Whisper and BGE embeddings, run on serverless GPUs in its own network, callable from Workers, Pages or a REST API. The launch post, by Phil Wittig, Rita Kozlov, Rebecca Weekly and Celso Martinho, promised that customer data would not be used to train models.

At launch GPUs were in seven sites, with plans for about 100 by the end of 2023 and nearly everywhere by the end of 2024. Billing was announced in Neurons, a unit meant to scale down to zero. Workers AI became generally available on April 2, 2024, during Developer Week, with GPUs in over 150 cities, load balancing that routes requests to cities with spare capacity, price cuts of up to 14x on popular models, and bring-your-own LoRA adapters.

Since then the catalog has grown from small open models to large ones: GPT-OSS, Qwen3, Kimi K2.6 and GLM-5 models among them, OpenAI-compatible endpoints, and payment through AI Gateway credits.

Why it’s built this way

Open models in a curated catalog
The launch post argued that closed models don’t meet developers’ privacy needs while open models aren’t accessible enough; a catalog of well-known open models, expanded through a Hugging Face partnership, aimed to fix the second problem.
GPUs inside Cloudflare’s own data centers
Running inference near users, and eventually in nearly every location, was meant to keep latency low and later support data localization.
Bill in Neurons
One unit across very different models (LLMs, image classification, embeddings) that always scales down to zero, so you pay only for what you use.

Timeline

  1. 2023

    Launched on September 27 with GPUs in seven sites and a Hugging Face partnership

  2. 2024

    Billing in Neurons starts on April 1 for non-beta models

  3. 2024

    Generally available on April 2, with GPUs in over 150 cities and BYO LoRAs

  4. 2026

    Frontier open models such as Kimi K2.6 and GLM-5.2 join the catalog

Sources8 · facts checked 12 October 2026

Improve this page on GitHub