A generated image looks finished until review starts.
Someone approves the first version. Someone else crops it. A branded copy goes out. Another edit changes the prompt. A week later, the useful question is simple: which prompt, model, seed, size, parent image, and publishing settings produced the version on screen?
In a content studio, I put those answers in the PostgreSQL row that stores the image. Logs explain what happened during a run, then rotate away. Object storage keeps the bytes and forgets why they exist. The row is the only one of the three that survives edits, review, and publishing.
1. The row is the receipt
The table in apps/api/src/database/init-ai-images-table.js treats generated and edited images as one record type. An original image gets its own row. An edit gets another row, with original_image_id pointing back to the parent.
CREATE TABLE IF NOT EXISTS ai_generated_images (
id SERIAL PRIMARY KEY,
image_url TEXT NOT NULL,
-- what produced it
Discussion
Start the conversation
Your voice can be the first to spark an engaging conversation.