Cloudflare API Pricing Sheet & Platform Rates
Cloudflare delivers global edge compute, zero-egress object storage (R2), and serverless model inference (Workers AI). Compare monthly rates, operation tiers, and edge unit economics.
Cloudflare R2 Storage & Egress TCO Simulator
Calculate your monthly savings on Cloudflare R2 by eliminating cloud bandwidth fees.
Production Pricing & Model Tier Rates
Verified rates, context capacities, typical inference latency, and recommended enterprise workloads.
| Model / Tier | Input Rate (1M) | Output Rate (1M) | Context Window | Latency / Throughput | Recommended Workload |
|---|---|---|---|---|---|
| R2 Object Storage | $0.015 / GB-mo | $0.00 Egress (Free) | Unlimited | Global Edge | High-traffic web assets, AI model distribution, videos |
| R2 Class A Ops (Write/List) | $4.50 / 1,000,000 | 1M free / mo | Standard | Sub-50ms | Uploads, multipart commits, bucket listings |
| R2 Class B Ops (Read/Get) | $0.36 / 1,000,000 | 10M free / mo | Standard | Sub-20ms | Asset downloads, static file serving |
| Cloudflare Workers Paid | $5.00 / month | + $0.50/M reqs | 10M reqs inc. | Sub-15ms edge | Global serverless APIs, request routing, caching |
| Workers AI Inference | $0.011 / 1k Neurons | Pay-as-you-go | Edge GPUs | Sub-100ms | Serverless Llama 3, Whisper, and embedding models |
⚡ Architectural Deep Dive & Unit Economics Analysis
Cloudflare has transformed from a reverse-proxy CDN into a premier global cloud platform. Their defining architectural value proposition is the elimination of the cloud egress tax. While legacy hyperscalers (AWS, Google Cloud, Azure) charge $0.08 to $0.12 per gigabyte of outbound traffic, Cloudflare R2 charges $0.00 for data egress worldwide.
Paired with Cloudflare Workers (V8 isolate serverless compute executing in over 330 cities globally) and Workers AI (edge-accelerated GPU inference), developers can construct full-stack AI applications where data storage, compute, and model inference run adjacent to the end user with sub-50ms global latency.
Production Workloads & Monthly Cost Modeling
Evaluating practical unit economics across real-world application architectures.
Viral SaaS Video & Media Delivery
Storing 5 TB of user video clips with 50 TB monthly egress. Cloudflare R2 costs $75.00 flat ($0 egress). AWS S3 would cost $4,615.00.
Edge AI Summarization on Workers AI
Running 500,000 edge text summarizations using Llama 3.1 8B on Workers AI. Costs approximately $12.50/month with zero server management.
Global Edge Microservice API (Workers Paid)
Serving 50 million monthly API requests globally with sub-20ms latency. Costs $5 base + $20 requests = $25.00/month.
import os
import boto3
from botocore.config import Config
# Cloudflare R2 is 100% S3-compatible via boto3
r2 = boto3.client(
's3',
endpoint_url=f"https://{os.environ['CLOUDFLARE_ACCOUNT_ID']}.r2.cloudflarestorage.com",
aws_access_key_id=os.environ['R2_ACCESS_KEY_ID'],
aws_secret_access_key=os.environ['R2_SECRET_ACCESS_KEY'],
config=Config(signature_version='s3v4')
)
def upload_asset_to_r2(local_path: str, bucket: str, key: str):
"""Upload asset to Cloudflare R2 with zero download egress fees."""
r2.upload_file(local_path, bucket, key)
print(f"Successfully uploaded {key} to R2 with $0 egress fees.")
Operational Gotchas & Failure Modes
Engineering realities, throttling thresholds, and hidden surcharge traps to monitor.
Related Models, Showdowns & Benchmarks
Cross-reference provider rates against hosted models, direct head-to-head battles, and calculators.
AWS S3 vs Cloudflare R2 Showdown
Compare AWS egress taxes against Cloudflare R2 zero-egress.
Cloudflare R2 vs Backblaze B2 Showdown
Compare zero-egress R2 against $0.006/GB Backblaze B2.
AWS S3 Pricing Guide
Explore Amazon S3 Standard, Glacier, and egress fee tables.
Full API Directory & Cost Guide
Search 100+ developer and cloud infrastructure APIs.
Frequently Asked Questions
Is Cloudflare R2 really free for outbound egress bandwidth?
Yes! Cloudflare R2 charges $0.00 for data egress, no matter how many gigabytes or terabytes your users download from your buckets.
How does storage pricing compare between Cloudflare R2 and AWS S3?
Cloudflare R2 charges $0.015 per GB-month ($15/TB). AWS S3 Standard charges $0.023 per GB-month ($23/TB), making R2 35% cheaper for base storage.
What is Cloudflare Workers AI?
Workers AI is Cloudflare's serverless AI inference service that runs popular open-source models (Llama 3, Whisper, Mistral) on GPUs deployed inside Cloudflare edge data centers globally.
Does Cloudflare R2 have a free tier?
Yes! Cloudflare R2 gives you 10 GB of storage, 1,000,000 Class A write operations, and 10,000,000 Class B read operations completely free every month.
Can I use AWS S3 SDKs with Cloudflare R2?
Yes! R2 implements the S3 API. Tools like boto3 (Python), the AWS CLI, aws-sdk (Node.js), and rclone work by simply changing the endpoint URL.
What are Class A and Class B operations?
Class A operations modify bucket state (PUT, POST, LIST, multipart uploads) and cost $4.50/M. Class B operations read data (GET, HEAD) and cost $0.36/M on R2.
Cloudflare Edge Architecture: Workers, Zero Egress R2 & Workers AI Economics
Cloudflare's serverless edge ecosystem—comprising Workers (V8 isolate compute), R2 Storage (S3-compatible zero egress object store), KV / D1 Database, and Workers AI—offers a disruptive financial model compared to traditional AWS and Google Cloud infrastructure. Because V8 isolates spin up in under 5 milliseconds (eliminating container cold starts) and R2 completely waives egress bandwidth fees ($0/GB), modern SaaS architectures offload static assets, API auth routing, and rate limiting to Cloudflare's edge at 1/10th the cost of hyperscaler microservices.
Cloudflare Developer Platform Production Rate Card
| Service | Base Allowance | Overage Rate | AWS Equivalent Pricing |
|---|---|---|---|
| Workers Paid ($5/mo) | 10M requests included | $0.30 / 1M requests | AWS Lambda ($0.20/1M + duration) |
| R2 Storage | 10 GB storage free | $0.015 / GB-mo ($0 egress) | AWS S3 ($0.023/GB + $0.09/GB egress) |
| KV Storage | 1 GB storage included | $0.50 / 1M reads | DynamoDB ($0.25/1M reads) |
| Workers AI | 10k neurons / day free | $0.011 / 1k neurons | Managed GPU endpoints |
Cloudflare Worker Zero-Cold-Start Auth Proxy (TypeScript)
export default {
async fetch(request: Request, env: Env): Promise {
const authHeader = request.headers.get('Authorization');
if (!authHeader?.startsWith('Bearer ')) {
return new Response('Unauthorized', { status: 401 });
}
const token = authHeader.split(' ')[1];
// Evaluate cached session token in Cloudflare KV in sub-3ms
const isValid = await env.SESSION_KV.get(token);
if (!isValid) return new Response('Forbidden', { status: 403 });
return fetch(request); // Proxy request to origin backend
}
};
Engineering Q&A: Cloudflare Edge Platform
How do Cloudflare Workers avoid container cold starts?
Cloudflare Workers run as lightweight V8 isolates rather than standalone Docker containers or virtual machines. Starting a V8 isolate requires under 5ms and negligible memory, completely eliminating the 500ms to 2s cold starts common to AWS Lambda and Google Cloud Functions.
What are the CPU execution limits on Cloudflare Workers Paid?
On Workers Paid ($5/month), each request receives up to 30 seconds of active CPU execution time (50ms on Free tier), providing ample compute capacity for complex JWT cryptographic verification, HTML streaming, and payload transformation.