Cloudflare R2 through Squiid
S3-compatible object storage with no egress fees. Cloudflare R2 is live on Squiid today.
What Cloudflare R2 is
Cloudflare R2 is object storage that speaks the S3 API, so existing SDKs, tools and multipart upload code work unchanged. The difference is egress: R2 does not charge for data transferred out, which removes the line item that makes other object stores unpredictable. Buckets can be bound directly to Workers for zero-latency access from edge code, presigned URLs let browsers upload and download without proxying through your server, and public buckets can sit behind a custom domain on Cloudflare's CDN. Event notifications can trigger a Worker when an object lands, which is how upload processing pipelines are usually wired.
Every vibe-coded app with a file in it needs this. User uploads, profile images, generated images and video from model providers, PDF exports, CSV imports, model artifacts and backups all belong in object storage rather than on a server disk that vanishes on the next deploy. Generated media is the case where the no-egress pricing really shows, because an image your app produced once may be downloaded thousands of times. Lifecycle rules expire temporary files automatically, which matters when an agent writes intermediate artifacts on every run.
Why connect it through Squiid
Squiid provisions the R2 bucket and holds the account id, access key id and secret. Your app uses https://api.squiid.io/v1/cloudflare-r2/... with Authorization: Bearer $SQUIID_API_KEY, and S3-compatible clients work by pointing their endpoint at the gateway (gateway convention). Storage and operations are metered against prepaid credits at Cloudflare's list price. S3 credentials are long-lived and grant full bucket access, which makes them one of the worst secrets to leak in a repository, and with Squiid they are never in one.
- One account, one key, one bill, one dashboard. Cloudflare R2 sits beside every other service your project uses, on the same invoice and the same credit balance.
- Key custody. Squiid holds the Cloudflare R2 credentials. Your code carries
SQUIID_API_KEY, so R2_ACCOUNT_ID, R2_ACCESS_KEY_ID, R2_SECRET_ACCESS_KEY, R2_BUCKET, S3_ENDPOINT never land in a repository, a preview deployment or an agent’s context. - Metering you can see. Every call is counted per service and per day, so you know what Cloudflare R2 costs before the month ends.
- Pause on zero. When prepaid credits run out the gateway stops authorizing usage instead of running up a bill you did not fund.
- One rotation. Rotating the Squiid key cuts off every agent, worker and deployment at once, with no provider key to hunt down.
What you get
- A provisioned R2 bucket with credentials held by Squiid
- S3-compatible API that works with existing tooling
- No egress charges on data leaving the bucket
- Presigned upload and download URLs
- Cloudflare list pricing, no markup
How to connect Cloudflare R2
One variable replaces the provider credentials this service would normally need. Requests go to the gateway and the official SDKs work by pointing their base URL at it (gateway convention).
# .env
# replaces R2_ACCOUNT_ID, R2_ACCESS_KEY_ID, R2_SECRET_ACCESS_KEY, R2_BUCKET, S3_ENDPOINT
SQUIID_API_KEY=sq_live_xxxxxxxxxxxxxxxxxxxxxxxx
# every request: https://api.squiid.io/v1/cloudflare-r2/...
# header: Authorization: Bearer $SQUIID_API_KEY
Add it in your dashboard
Open the Squiid catalog, add Cloudflare R2 and fund credits. Squiid provisions the project and keeps the provider keys.
Put the one key in your env
Add SQUIID_API_KEY to .env and delete R2_ACCOUNT_ID, R2_ACCESS_KEY_ID, R2_SECRET_ACCESS_KEY, R2_BUCKET, S3_ENDPOINT. Nothing else from Cloudflare R2 needs to exist in your project.
Point your agent at it
Claude Code, Cursor and Codex read the same variable and call https://api.squiid.io/v1/cloudflare-r2/. Claude Code and Cursor wire presigned uploads so files go from the browser straight to the bucket, with no credential in the client.
Pricing through Squiid
Cloudflare charges for stored data and Class A and B operations with no egress fee, at the provider's listed price. Squiid passes that through at par: one dollar of prepaid credit is one dollar of Cloudflare R2 usage, with no markup and no per-request margin.
Cloudflare R2 has no subscription attached on Squiid today. If a plan is required for a feature you need, it passes through at the provider’s listed price with no Squiid fee.
Squiid adds no markup to provider prices. There is a free plan at $0 a month with a 15% fee when you top up credits, Solo at $19.97 a month with a top-up fee that starts at 8% and falls to 3.5% as your spend grows, Team from $29.97 a seat a month with the same ladder one point lower, and Custom with a rate of 3% or less. Credits are prepaid, so Cloudflare R2 usage stops when the balance reaches zero rather than producing an invoice you did not fund. Auto top-up with a cap keeps production running without handing anyone an open-ended card.
If you leave
Export: there is no Cloudflare account transfer, so objects are copied out with S3-compatible tooling into a bucket in your own account. Squiid never owns your code, your schema or your domain, and the gateway speaks Cloudflare R2's own API, so the client change is a base URL. The handover page lists what happens for every provider in the catalogue.
Works with every coding agent
Cloudflare R2 through Squiid is just an HTTP call with a bearer token, so every agentic coding tool can use it with the single key already in your environment:
- Claude Code
- Cursor
- ChatGPT
- Codex
- Grok
- Gemini CLI
- GitHub Copilot
- Windsurf
- Perplexity
- Devin
- Replit
- v0
- Lovable
- Cline
Vibe coding a feature on Cloudflare R2 usually means asking for it in plain language and letting the agent write the integration. Because the key is Squiid’s rather than the provider’s, it can do that without ever holding a credential that could be leaked, logged or committed.
Related services
Cloudflare Workers
Storage and mediaServerless code on Cloudflare's edge network with near-zero cold starts
Next upProvisionedCloudflare KV / D1
Storage and mediaEdge key-value store and SQLite database bound to your Workers
Next upProvisioned BBBackblaze B2
Storage and mediaLow-cost S3-compatible object storage with free partner egress
RoadmapProvisioned CLCloudinary
Storage and mediaImage and video pipeline with URL-based transforms and optimisation
RoadmapProvisionedSupabase
DatabasesPostgres with auth, storage, realtime and edge functions attached
Next upProvisionedQuestions people ask
Can I use the AWS S3 SDK with R2 through Squiid?
Yes. R2 is S3-compatible, so the SDK works by pointing its endpoint at the Squiid gateway and authenticating with SQUIID_API_KEY.
Does R2 really have no egress fees?
Cloudflare does not charge for data leaving R2 at its listed pricing. You pay for storage and operations, and Squiid passes both through at list.
Can Cursor set up file uploads with R2?
Yes. The usual pattern is a server route that mints a presigned URL through the gateway, then a direct browser upload to the bucket.
What happens to my files if credits run out?
New operations stop being authorized. Stored objects are not deleted because a balance reached zero.
R2 or Supabase Storage?
Supabase Storage is convenient when your auth and policies already live in Supabase. R2 is cheaper at volume and better for heavy public downloads. Both are on one Squiid key.
Connect Cloudflare R2 with one key.
R2 is Cloudflare's object storage: S3-compatible, globally distributed and billed with no charge for data leaving the bucket. Provisioned by Squiid with credentials held for you.