POST /api/v1/product-image-enhancements is idempotent per account and API key environment.
Send a unique Idempotency-Key for every logical catalog batch.
Idempotency-Key on the request to AI Gen Studio.
Why it matters
Network failures can happen after AI Gen Studio accepts an enhancement but before your server receives the response. Idempotency lets you retry the same create request safely. If the same API key owner sends the same idempotency key with the same request body, AI Gen Studio returns the existing enhancement instead of creating another one. This prevents duplicate provider processing and duplicate credit reservations when the caller retries after a timeout, deployment restart, or temporary network failure.Who sends the key
Your integration sends the key in the request header. AI Gen Studio does not generate it for create requests because the caller is the only system that knows which retry belongs to the same logical catalog batch. Use a key that is stable for one batch and unique across different batches.Key requirements
Retrying a create request
If your request times out, retry with:- the same API key;
- the same
Idempotency-Key; - the exact same JSON body.
Conflict behavior
Reusing an idempotency key with a different body returns409 idempotency_conflict.
