# Data formats

> The files behind the gallery and the API, so you or an agent can add images, mirror the data or build on it.


Everything on this site comes from a few JSON files. The pages, the [JSON API](/agents/#json), the Markdown twins and the MCP server all read the same data, so they never disagree.

## A generation record

`content/jobs.json` holds one record per generation job, written the moment the files come back from the model:

```json
{
  "batch": "av-16-helpful",
  "job": "stage",
  "kind": "image",
  "model": "kling-image-v3_0_omni",
  "params": "image_to_image · 2k · 16:9 · 2 images · ref: av-11-casting.adult-ref.2",
  "prompt": "Medium shot of the woman from image 1, the same person with the same face: ...",
  "note": "The stage: every request, sung like it is the only one.",
  "created": "2026-10-11",
  "files": ["media/raw/av-16-helpful/stage-1.png", "media/raw/av-16-helpful/stage-2.png"]
}
```

The prompt is stored exactly as it ran. `image 1` is the reference image named in `params`; where a Kling element was bound, its id reads `[Aivy element]`.

## An image

Each file in a job becomes one image with the id `batch.job.n`, for example `av-16-helpful.stage.1`. The API serves it like this:

| Field | Meaning |
|---|---|
| `id` | `batch.job.n` |
| `batch`, `job`, `n` | where it came from |
| `model`, `params`, `prompt` | how it was made |
| `verdict` | `pick`, `reject` or `note` |
| `note` | why |
| `retouch` | what was changed by hand after generation, or `null` |
| `look`, `framing`, `film` | tags for filtering |
| `her` | true when Aivy is in the frame |
| `w`, `h`, `color` | native size and dominant colour |
| `url.s`, `url.m`, `url.full` | 720 px webp, 1800 px webp, native jpg |
| `page` | the image's own page |

## Adding images

1. Generate, then record the job with `node tools/ingest.mjs job.json` (batch, job, model, params, prompt, note, urls).
2. Add a verdict and tags for each new id in `content/curation.json`.
   If a frame needs a hand fix, list it in `content/retouch.json` and run `python tools/retouch.py`. The original stays as generated; the site publishes the retouched copy and says so on the image page.
3. Run `npm run media` to make the web sizes, then `npm run build`.

The new images appear in the gallery, the API, the image pages, `llms-full.txt` and the MCP tools in one build.
