Build and run AI applications

Last updated Apr 24, 2026 To build and deploy an AI application, you need compute for application logic, a way to run inference, and a gateway to manage costs across providers. Cloudflare Workers hosts your application logic and serves your frontend. Workers AI runs inference at the edge with pay-per-use pricing. AI Gateway adds caching, rate limiting, and observability across OpenAI, Anthropic, and other providers. Durable Objects coordinate stateful workflows and multi-turn conversations.

Solutions

Workers

Build and deploy serverless applications on Cloudflare's global network. Learn more about Workers.

  • Streaming responses - Stream AI responses token-by-token as they generate, without buffering the full reply
  • Full-stack deployment - Serve frontend and backend from a single deployment without managing separate infrastructure

Workers AI

Run inference on Cloudflare's global network via a Workers binding, with pay-per-use pricing. Learn more about Workers AI.

  • Global inference - Run models at the Cloudflare location nearest to the user, reducing round-trip latency
  • Pay-per-use pricing - No GPU reservations or idle costs; pay only for tokens processed

AI Gateway

Proxy requests to any AI provider with caching, rate limiting, and unified analytics. Learn more about AI Gateway.

  • Provider flexibility - Route requests to OpenAI, Anthropic, Workers AI, or any other provider through a single endpoint
  • Unified observability - Track request volume, latency, costs, and errors across all providers in one place

Durable Objects

Stateful objects with strongly consistent storage and coordination. Learn more about Durable Objects.

  • Stateful workflows - Coordinate multi-step AI pipelines and maintain conversation state across requests

Get started

  1. Workers AI get started
  2. AI Gateway get started
  3. Durable Objects get started

Was this helpful?

YesNo

On this page

Build and run AI applications - 图1Docs

{"@context":"https://schema.org","@type":"TechArticle","@id":"https://developers.cloudflare.com/use-cases/ai/build-and-run/#page","headline":"Build and run AI applications","description":"Build AI applications with serverless compute, edge inference, multi-provider gateways, and stateful coordination.","url":"https://developers.cloudflare.com/use-cases/ai/build-and-run/","inLanguage":"en","image":"https://developers.cloudflare.com/use-cases/ai/build-and-run/og.png?v=59f8db8e404fea96","dateModified":"2026-04-24","publisher":{"@type":"Organization","name":"Cloudflare","description":"One platform for your apps, agents, and workforce. Build, secure, and scale without managing infrastructure","url":"https://www.cloudflare.com/","sameAs":["https://github.com/cloudflare","https://www.linkedin.com/company/cloudflare","https://x.com/cloudflare"],"logo":{"@type":"ImageObject","url":"https://developers.cloudflare.com/logo.svg"},"address":{"@type":"PostalAddress","streetAddress":"101 Townsend St","addressLocality":"San Francisco","addressRegion":"CA","postalCode":"94107","addressCountry":"US"},"contactPoint":[{"@type":"ContactPoint","contactType":"Customer Support","url":"https://support.cloudflare.com/","availableLanguage":["English"]},{"@type":"ContactPoint","contactType":"Sales","url":"https://www.cloudflare.com/contact/","availableLanguage":["English"]}]},"isPartOf":{"@type":"WebSite","@id":"https://developers.cloudflare.com/#website","name":"Cloudflare Docs","url":"https://developers.cloudflare.com/"}}


description: Reduce AI inference costs and improve reliability with response caching, rate limiting, and unified provider analytics. title: Control costs and improve quality image: https://developers.cloudflare.com/use-cases/ai/control-costs/og.png?v=2026a75c7aea9dd5


Skip to content

Documentation Index
Fetch the complete documentation index at: https://developers.cloudflare.com/use-cases/llms.txt
Use this file to discover all available pages before exploring further.