A Gradient API That Remembers

Téo Goulois
I built Better Gradient because I wanted something fast, playful, and precise—no accounts, no friction.
But one request kept coming up:
"Can I generate the same gradient again from code?"
Today I'm shipping the answer: the Better Gradient API—a single endpoint that generates deterministic mesh gradients using a seed.
Same Seed, Same Gradient
Pass the same seed, get the same output. Every time.
This unlocks some useful patterns:
Use a user's email as a seed to generate a unique-but-stable avatar background
Pick a brand seed like
seed=studioand reuse it across your marketing pagesBuild design systems with repeatable, consistent visuals
Endpoint
GET /api/gradientFormats: svg, css, share
Quick Example
bash
curl "https://better-gradient.com/api/gradient?seed=studio&size=1200&format=svg"Call it again with the same params—you'll get identical output.
Parameters
Param | Description |
|---|---|
| Deterministic identity (same value = same gradient) |
| Sets both width and height |
| Override dimensions individually |
| Number of blended shapes |
|
|
A sensible default: seed=your-app, size=1200, format=svg
Caching by Design
Public APIs can get expensive fast — bots, scrapers, accidental loops. So this API is built to be cache-friendly from the start:
Seeded requests return
ETagand long-lived cache headers, so browsers and CDNs can reuse responses.Random output is explicitly not cacheable — it would defeat the purpose and spike compute costs.
This is also why the public tier requires a seed: it makes the API cheaper and safer to run.
Public Tier (No Key)
Try it without signing up.
Rate limits: 20/min, 200/day
Max size: 2048px
Max shapes: 8
Requires
seedoremail(no random)
Strict, but open for experimentation.
Verified Tier (API Key)
Need higher limits or random output? Request a key at:
👉 better-gradient.com/developers
You'll verify your email, and the key will be shown once. Only the hashed version is stored.
Rate limits: 60/min, 1000/day
Max size: 6000px
Max shapes: 10
Random output: allowed
Usage
bash
curl "https://better-gradient.com/api/gradient?format=svg&size=1400" \
-H "Authorization: Bearer YOUR_KEY"Or use x-api-key: YOUR_KEY.
Rate Limit Headers
Every response includes rate limit info — and a Retry-After header when you hit the ceiling. Makes it easy to build polite integrations.
On Pricing
The API is free while usage stays reasonable.
If it scales to the point where it's expensive to run, I'll introduce paid tiers for heavy users—while keeping a free tier for small projects.
No surprise bills. No sudden shutoffs.
What's Next
This is v1. I'll iterate based on real usage.
If you build something with the API, especially if you're using seeds in creative ways (user themes, campaigns, personalized products) — I'd love to see it.
Got feedback ? Missing a format ? Limits don't fit ? Let me know.