Technical white paper · v1.0
Images: a private, searchable library for AI-made pictures
How a pile of untagged AI images became a categorised, searchable library, screened for logos and recognisable people, that people browse and other applications query instead of generating new pictures.
01Executive summary
Images is a private library of AI-generated pictures. Every upload is resized, stored in object storage, and described by a vision model into a rich structured record: what it shows, its style and mood, where text could sit, how it crops, and what it suits. It is then searchable by keyword and by meaning, grouped with its near-duplicates, and screened for logos and recognisable people before any other application may receive it.
It is deliberately private by default. Publishing is a per-image decision, originals are not retained, and the library is not its own sign-in system. The point is that an AI asking for "a wide landscape, water visible, no people, room for a headline at the top, croppable to a vertical format" gets an answer from images that already exist.
02The problem
AI image tools produce a lot of pictures quickly, and they end up untagged across drives. Stock libraries are too thinly tagged for a machine to ask precise, compound questions of them. Generating a new picture every time is slow and costs money, and the result is rarely checked for trademarks or recognisable people.
| Principle | What it meant in practice |
|---|---|
| Own the schema | The library defines its own description fields so callers can combine conditions that stock sites cannot express. |
| Private by default | Nothing is public until the owner publishes that single image. There is no bulk publish. |
| Fail closed | When a rights verdict is uncertain, the image is withheld from other applications rather than waiting for a human who may never look. |
| Degrade, don't die | If meaning search is down, keyword search carries on and the page says so. |
| Detect work from data | Background jobs find unfinished work by looking at the records, not by trusting that every code path remembered to queue it. |
03How an image becomes a record
An upload is sniffed by its bytes rather than its file name, re-encoded to a 2048 pixel JPEG plus a thumbnail, and stored. A row is created marked processing, and the vision model is called in the background so the uploader is not kept waiting. The browser polls until the record is ready.
The record covers the subject, art style, mood, people, setting, text present, logos present, dominant colours, aspect and the crops each image supports, plus where copy could sit. The owner can correct any field, and a correction survives re-categorisation; clearing a field restores the model's value.
04Search by words and by meaning
A query runs two ways at once. Keyword search matches any word and ranks images matching all of them first, with typo correction learned from the library's own vocabulary. Meaning search embeds the query and compares it with each image's vector, so a picture can match without containing the exact word. The two result lists are merged.
Filters narrow the result: subject, style, people, water, copy space, crop, shot type, minimum quality, and nearness to a chosen colour measured in a perceptual colour space rather than raw RGB. Near-duplicates, such as the variants a generation tool produces for one prompt, collapse to one image and the page says how many were folded away.
05The rights screen
AI pictures routinely contain trademarks, logos and faces that resemble real people. Before any machine consumer may receive an image, a second model judges it for third-party marks and identifiable real people. The verdict is stored with the version of the judge that made it, so improving the judge re-queues the library automatically.
06Serving and feeding other applications
Other tools in the same estate, such as image generators, page builders and video makers, ask the library instead of generating. A versioned API gives each caller its own key with narrow scopes (read, write, delete, release), a usage log and instant revocation. A short brief written for AI agents explains the filter vocabulary so an agent can ask well on its first try.
| Caller | Sign-in | Can do |
|---|---|---|
| Owner | Passkey via the central sign-in | Upload, edit, publish, file, delete, manage keys |
| Viewer | Passkey, group membership | Search and browse only; editing controls are absent and the server refuses them |
| Application | Scoped API key, shown once | Only the scopes granted; restricted images never returned |
Images in: generation that files itself
The library is also the destination for new work. A companion image-generation application sends every picture it makes straight into the library, with the prompt and source recorded as provenance, so generated images arrive already categorised, searchable and screened, with no manual filing. Imports are idempotent: a source file that is sent twice is stored once.
The same path is available to AI assistants. An assistant skill generates images and files them through the API, using a key scoped to exactly that job. The loop closes: the library is where images are asked for first, and where new ones land when nothing suitable exists.
07Security and privacy
- No anonymous access. The library is reachable from the internet only through a tunnel and demands sign-in; a monitoring check confirms an anonymous visitor is refused.
- Passkeys, not passwords. The library holds no user list of its own.
- Keys are scoped and logged. A leaked key can be revoked without touching anything else.
- Rate limits on sign-in and on failed authentication. Sessions expire on idle and at a fixed maximum.
- Strict response headers on every reply, and uploads are validated by content, not file name.
- No originals. Only a resized copy and thumbnail are stored, which limits what a breach could expose.
- Hidden collections vanish from search and the API until opened by name.
08Operating it
It runs as two small containers: the application and a sidecar that produces embeddings. Metadata lives in a relational database, image bytes in private object storage, and released images in a separate public bucket. A health endpoint reports search and screening coverage; monitoring watches that, the container, and the sign-in gate. A probe script runs before every push and a red result blocks the push. Deploys are by pull, with a documented rollback and a runbook of known faults.
09Lessons
- Let the data say what is unfinished. Loops that scan for missing work survive bugs that a queue would not.
- Fail closed on rights. A review queue nobody empties is a policy of publishing everything.
- Keep the owner's edits sacred. Re-running the AI must never overwrite a human correction.
- Show degradation honestly. A search page that says "keyword only right now" is trusted; one that quietly returns worse results is not.
- Write the documentation from the live system. Spec, guide, runbook and API contract were written as the library grew.
10Appendix: facts and figures
| Item | Value |
|---|---|
| Built | 25 May 2026 |
| Version at writing | 0.41 |
| Stack | Bun and TypeScript, vanilla HTML/CSS/JS front end with no build step |
| Storage | Relational database for metadata, private object storage for images, a second public bucket for released images |
| AI | Vision model for categorisation, local embedding model for meaning search, a separate model for the rights screen |
| Stored per image | 2048 px JPEG, thumbnail, 64-bit perceptual hash, up to 8 dominant colours, meaning vector |
| Accepted uploads | Common photo and web image formats up to 15 MB |
| Background loops | Retry sweep, vector index, embedding, derivations, rights check |
Our work is always evolving, and so are the AI vendors and their products. Nothing described here is set in concrete. Each paper describes its system as it stood in October 2026, when it was written; the date shown is when the app was first built.