Skip to main content

When to use it

Networks drop connections. When a client can’t tell whether a request reached Sideren, it retries — and without an idempotency key, that retry runs the work (and bills it) a second time. Send an Idempotency-Key header and Sideren recognises the retry. Idempotency applies to batch creation, where a duplicate does real work: POST /v1/messages/batches and POST /v1/batches (Batches).
A create with an idempotency key
Use a fresh random value (a UUID) per logical request, and reuse it only when retrying that same request. Keys up to 200 characters are accepted.

How it works

A key is remembered for 24 hours, scoped to your account and the collection you are creating in.

What it does not cover

An idempotency key protects the create call. It can’t undo side effects your own client caused — for example tools your agent already ran after reading a streamed tool call. Guard those in your own code. The chat endpoints have no idempotency mechanism: a retried chat request is a new request. See Errors for the retry recipe.