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
Run
A run is one execution of a creative app — a single call with a brief, a brand kit, and parameters that produces one or more media assets. Every run has an id, a phase stream (queued → composing → rendering → done), and an evaluation score against the attached brand rubric.
Agent-callable API
An agent-callable API is one designed to be invoked by an autonomous LLM agent rather than a human developer. It exposes typed tool schemas, returns structured outputs an agent can parse, supports idempotency keys for safe retries, and handles long-running jobs through streaming or polling instead of blocking.
MCP server
An MCP server is a process that exposes tools, resources, and prompts to an LLM client over the Model Context Protocol — Anthropic's open standard, donated to the Linux Foundation in December 2025. MCP servers let agents in Claude, Cursor, Windsurf, and VS Code call your API as native tools.