# Particle Spray — Randomly

> A Gaussian mixture with k random components. 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.spray` — Particle Spray

A Gaussian mixture with k random components.

| | |
|---|---|
| **Key** | `images.spray` |
| **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/spray |
| **API** | `GET https://randomly.cluxnei.dev/api/v1/g/images.spray` |

`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 |
| `components` | int | `5` | `1` – `10` | Components — How many Gaussians the mixture is made of. One is a fuzzy dot; the interest is entirely in how several overlap. |
| `particles` | int | `450000` | `5000` – `900000` | Particles — Samples drawn from the mixture. The image is their density, so this is a grain control as much as a quantity one. |
| `spread` | float | `0.12` | `0.02` – `0.6` | Component size — The typical standard deviation, as a fraction of the short side. |
| `anisotropy` | float | `3.4` | `1` – `9` | Elongation — The most a component's two axes may differ. At 1 every component is a circular blur; above 3 they become strokes with a direction, which is what stops the result looking like spilt milk. |
| `alpha` | float | `0.11` | `0.004` – `0.3` | Particle alpha — Per-particle opacity. The picture is the accumulation, so this wants to stay low. |
| `radius` | float | `1` | `0.3` – `4` | Particle size |
| `glow` | bool | `true` | `true`, `false` | Additive blending — Particles add their light together instead of painting over each other. On a dark ground this is the whole look. |
| `drift` | float | `0.16` | `0` – `0.5` | Halo drift — How far along the palette a particle travels as it lands further from its component's centre — so a core is one colour and its halo another. |
| `background` | enum | `ink` | `ink`, `ground`, `paper`, `palette` | Ground |
| `palette` | enum | `magma` | `golden`, `analogous`, `complementary`, `triadic`, `split`, `viridis`, `magma`, `mono` | Colour |
| `colours` | int | `7` | `2` – `12` | Palette size |
| `grain` | float | `0.012` | `0` – `0.08` | Grain |

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.spray?width=1200&height=800&components=5' -H 'Accept: text/plain'
curl -o out.png 'https://randomly.cluxnei.dev/api/v1/g/images.spray?width=1200&height=800&components=5&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/spray)
