# Mesh Gradient — Randomly

> Random control points, dithered to kill the banding. One of 63 generators at [Randomly](https://randomly.cluxnei.dev), a library of random generators seeded from verifiable real-world entropy. Free HTTP API, no key, no signup.

## `images.gradient` — Mesh Gradient

Random control points, dithered to kill the banding.

| | |
|---|---|
| **Key** | `images.gradient` |
| **Module** | `images` |
| **Version** | `1` — a permalink carries this, and a replay against a different version returns `409` rather than something else |
| **Formats** | `application/json`, `text/plain`, `image/png` |
| **Studio** | https://randomly.cluxnei.dev/g/images/gradient |
| **API** | `GET https://randomly.cluxnei.dev/api/v1/g/images.gradient` |

`value` is a **render spec** — algorithm, parameters, palette and a render key — not pixels. Ask for `format=png` to get the image.

| Parameter | Type | Default | Accepts | What it does |
|---|---|---|---|---|
| `width` | int | `1200` | `256` – `2048` | Width |
| `height` | int | `800` | `256` – `2048` | Height |
| `stops` | int | `10` | `2` – `18` | Control points — Each one holds a colour and pulls the field towards it. |
| `blend` | enum | `soft` | `soft`, `sharp` | Blend |
| `falloff` | float | `0.42` | `0.18` – `1.8` | Softness — The Gaussian width, measured in the typical spacing between control points rather than in pixels — so adding points does not also change how soft the blend is. |
| `power` | float | `2.6` | `1` – `8` | Shepard exponent — Only used by the stained-glass blend. Higher values flatten the cell interiors and tighten the boundaries between them. |
| `warp` | float | `0.18` | `0` – `0.6` | Domain warp — Displaces each pixel through a noise field before the blend is evaluated. The isolines stop being circles and start folding around each other, which is what makes a gradient look poured rather than computed. |
| `warp_scale` | float | `2.2` | `0.4` – `8` | Warp zoom |
| `dither` | float | `1` | `0` – `4` | Dither — Ordered dither amplitude, in output levels. One level is the right answer; zero is there so you can see the banding it prevents. |
| `palette` | enum | `split` | `golden`, `analogous`, `complementary`, `triadic`, `split`, `viridis`, `magma`, `mono` | Colour |
| `colours` | int | `7` | `2` – `12` | Palette size |
| `grain` | float | `0.006` | `0` – `0.06` | Grain — Film grain over the finished render, on top of the dither. The two do different jobs: the dither hides quantisation, the grain gives the surface a texture. |

Out-of-range numbers are **clamped, not rejected**, so a request never fails for being
ambitious — but it may not do what you meant. Unknown keys are dropped and missing ones
fall back to the defaults above.

```bash
curl -s 'https://randomly.cluxnei.dev/api/v1/g/images.gradient?width=1200&height=800&stops=10' -H 'Accept: text/plain'
curl -o out.png 'https://randomly.cluxnei.dev/api/v1/g/images.gradient?width=1200&height=800&stops=10&format=png'
```

## The receipt

Every result carries one, naming the physical source of the randomness and linking to the
third party's own record of it:

```json
"receipt": {
  "source": "seismic",
  "source_label": "USGS Seismic Feed",
  "class": "C",
  "caveat": "Carries only tens of bits of genuine surprise. Always mixed with the OS CSPRNG.",
  "narrative": "A magnitude 3.6 earthquake, 67 km N of Culebra, Puerto Rico, 39.6 km down — 52 minutes ago.",
  "proof_url": "https://earthquake.usgs.gov/earthquakes/eventpage/us7000th33",
  "mixed_with_csprng": true,
  "degraded": false
}
```

Pick the source with `?source=`, or leave it at the default `auto`:

- **Class A** (Cryptographic) — `csprng`, `anu-qrng`, `random-org`
- **Class B** (Public beacon) — `nist-beacon`, `drand`, `bitcoin`. Published openly — anyone can look this value up after the fact.
- **Class C** (Observational) — `seismic`, `space-weather`, `atmosphere`, `iss`. Carries only tens of bits of genuine surprise. Always mixed with the OS CSPRNG.

## More

- [The full API contract](https://randomly.cluxnei.dev/api.md)
- [Everything in one file](https://randomly.cluxnei.dev/llms-full.txt)
- [The catalogue as JSON](https://randomly.cluxnei.dev/api/v1/generators)
- [This generator in the browser](https://randomly.cluxnei.dev/g/images/gradient)
