Idempotency
Send an Idempotency-Key header with a value unique per operation on the POSTs that charge or reserve credits.
A network retry with the same key returns the original result instead of running again (and charging or reserving again).
Rules
- Required on POST /v1/batches (it reserves credits): 428 if missing.
- Recommended on POST /v1/generations.
- Reusing a key with a different payload returns 422 (you're not handed another operation's result); reusing it on a different endpoint too. Use a distinct key per operation.
- POST /v1/products (upsert) accepts the header, but upsert is already idempotent by SKU. Don't reuse the same key with a different batch: it would return the first one's cached counts without writing the new one.
- An operation still in flight with that key returns 409: retry in a moment.