Idempotent generation

Also known as: idempotency for generative APIs, deterministic generation, safe-retry generation

Idempotent generation is the property that the same generative-media call — same brief, brand, seed, and idempotency key — returns the same result on retry instead of producing a new (and billed) output. It's a survival requirement for agents, which retry on timeout and would otherwise create duplicate runs.

Example

If an agent's first lamina.create call times out and it retries with the same Idempotency-Key, the second call returns run_8H2K9 — the original run id — instead of starting run_8H2K10 and double-billing.

Why idempotency is non-optional for agents

An LLM agent operating against a tool-call budget will retry on any unclear failure. Without idempotency keys, a retried productShoot call costs you twice and leaves two runs in the queue. With idempotency keys, the platform recognizes the second call as a duplicate, returns the original result, and charges you once. In 2026 this is treated as a fundamental architectural requirement for any agent-callable API, not a nice-to-have.

How idempotent generation differs from determinism

Deterministic generation says: same brief, same seed, same model → same output. Idempotent generation is one layer above: same idempotency key on the request → same run id and same billing, even if the request was duplicated by retry logic. You need both for agents to be safe.

References

Related terms