11. Image Generation, Editing, and Creative AI Workflows
Integrate generated media safely, manage asynchronous jobs, and build reproducible asset workflows.
Image Generation as an Application Feature
Image generation may be provided by a dedicated image model or a multimodal model that returns image files. Model capabilities, output formats, editing support, and policy rules vary. Design a job abstraction that records prompt, model, parameters, input asset references, status, output locations, and moderation outcome.
Do not assume an image URL remains available indefinitely. Store generated assets in controlled object storage if your product needs persistence, apply access controls, and define retention. Handle rejected requests and partial failures gracefully, and tell users when outputs are generated rather than verified facts.
{
"jobId": "imgjob_123",
"status": "queued",
"model": "configured-image-model",
"promptVersion": "thumbnail-v2",
"inputAssetIds": [],
"outputAssetIds": [],
"createdAt": "2026-10-28T00:00:00Z"
}- Use durable job records for asynchronous generation.
- Manage output assets and permissions explicitly.
- Apply content policy and provenance appropriate to your product.
Why should generated images be stored in your own controlled asset storage when persistence is required?
Image Editing, Variations, and Iteration
Editing workflows may combine an input image, mask, prompt, and model-specific controls. Keep original assets immutable, store derived outputs separately, and record the relationship between versions. Make user intent explicit when editing an image rather than generating a replacement from scratch.
For creative tools, offer preview, retry, undo, and comparison. Do not promise pixel-perfect control unless the API and workflow provide it. When images include people or sensitive content, follow consent, privacy, and applicable policy requirements.
Original asset
-> edit request (prompt + mask + parameters)
-> generated version 1
-> user feedback
-> generated version 2
-> approved final asset- Record inputs and parameters for reproducibility.
- Keep originals and derivatives separate.
- Offer user control over preview, retry, and final selection.
What is a useful design rule for image editing history?