GPT Image 2.6’s separation of fast visual exploration (Flare) from precise editing (Sunburst) is a practical workflow shift, but it introduces a critical engineering failure mode: asset provenance. When an application splits a single generation into two API calls, retries, callbacks, and user revisions can silently produce duplicate or untraceable assets. The solution isn't a cleverer prompt; it is an application-level asset lineage contract that treats returned URLs as delivery locations, not primary identities.

The Failure Mode: A URL Is Not Provenance

Consider a standard e-commerce flow: a user generates a product hero image, approves it, and requests a background change. If the service times out after submitting the edit, the worker retries. Both requests may eventually succeed, but if the database only stores the latest image URL, you lose the audit trail. You cannot answer basic questions like which prompt produced the file, whether it was edited from an approved parent, or if a retry created a duplicate. The fix requires giving each logical operation a stable key and making parent-child relationships explicit in the schema.

Implementing a Minimal Lineage Model

A compact SQL table is sufficient to begin enforcing lineage. The core fields include a unique idempotency_key to prevent queue duplicates, a parent_asset_id to link edits to approved sources, and a request_hash to detect accidental mutations. The idempotency_key must describe the user's logical intent, not a random timestamp. For example, if a prompt changes, the key increments to v2; if only transport failed, v1 is reused. This ensures that the idempotency layer belongs to the application, not the provider, since the image endpoint itself does not accept an idempotency header.

Stage 1: Generate and Record the Candidate

Use GPT Image 2.6 Flare for rapid exploration. The API supports asynchronous processing via async: true, returning a task_id for later polling or callback delivery. The code example demonstrates fetching the task ID and saving it immediately. Crucially, the request JSON and its hash are stored before the provider returns a result. This immutable request record becomes the anchor for all subsequent operations, ensuring that even if the network fails, the intent is preserved.

Stage 2: Edit From an Approved Parent

After review, freeze the selected candidate as an asset. Then, create a child job using GPT Image 2.6 Sunburst for bounded revisions. The Images Edits documentation requires an image URL and prompt, but the engineering pattern here enforces a parent_asset_id link. This division is a workflow choice, not a pixel-perfect guarantee. The original parent remains immutable, and the child routes through review before promotion, preventing accidental overwrites of approved assets.

Making Callbacks Replay-Safe

Callbacks can arrive multiple times or after a polling worker has already stored the result. Handle them as state transitions, not commands. The code checks if the job status is already succeeded before processing. If the payload indicates success but contains no result URL, it throws an error. In production, authenticate webhook traffic, validate payload sizes, and commit status changes transactionally. Retry transient 5xx errors with capped exponential backoff, but stop on 401 or 403 errors, as repeating unauthorized requests does not repair credentials.

Key Takeaways

  • Treat provider URLs as delivery locations, not primary identities.
  • Use stable idempotency keys based on logical intent, not timestamps.
  • Store request hashes and parent asset IDs to enable audit trails.
  • Handle callbacks as idempotent state transitions, not one-time commands.
  • Retain content hashes and metadata, not just final image files.

The Bottom Line

LLM image APIs are becoming more powerful, but they are not becoming more reliable on their own. If you are building production-grade image pipelines with GPT Image 2.6, you must build the provenance layer yourself. The model gives you pixels; your database gives you truth.