DEV Community

Polyform Prints
Polyform Prints

Posted on

I built a 3D print pricing API on Cloudflare Workers — here's why and how

I've been trying to start a small 3D printing business on Etsy, and kept running into the same problem: pricing by gut feel.

You finish a print, look at it, and pick a number that "feels right." Then at the end of the month you realise you've been working for free.

So I built PolyQuote — a REST API that calculates a recommended sale price from filament type, weight, print time, and markup. It handles material cost, electricity, failure rate buffer, packaging costs, and platform fees for Etsy, eBay, and Shopify. Responses come back in GBP, USD, and EUR.

The stack:

Cloudflare Workers (compute)
Cloudflare KV (API key storage, rate limiting, filament defaults)
Stripe (subscription billing)
Resend (transactional email)
Deployed via Wrangler

A few things I learned:

Cloudflare Workers are genuinely impressive for this use case — cold starts are essentially zero, global distribution is free, and KV is good enough for simple key-value storage at this scale. The free tier gets you surprisingly far.

Currency conversion was originally hardcoded (embarrassing in retrospect). I swapped it out for live rates from the Frankfurter API, cached at the edge for an hour. One fetch call, Cloudflare handles the caching.

Rate limiting without a database is simpler than I expected — just KV keys with TTLs. Not bulletproof at high scale but fine for where I am now.

What's live:

Free tier: 200 calls/month, no credit card
Maker: £5/month, 5,000 calls
Pro: £15/month, 25,000 calls
Public demo with no signup required

If you sell 3D prints or build tools for people who do, I'd genuinely love feedback. The Postman collection is public if you want to poke around without signing up.

Landing page: api.polyformprints.co.uk

**Postman: **https://documenter.getpostman.com/view/54931854/2sBXqRjwqj

Top comments (0)