Skip to main content
A timeout is not an answer. Send an Idempotency-Key on every paid call, and a retry returns the first result instead of buying it again.
1–255 visible ASCII characters. Use one value per intent — a request id from your own system is ideal.

What it guarantees

Keys are scoped to your API key and the endpoint, so two of your keys, or two endpoints, can use the same string without colliding.

Where it applies

Retrying in practice

If that call times out on your side, send it again unchanged. You get the same run id, the same result and the same single charge.
While the first request is still running, a retry answers 409 request_in_progress with a retry_after_ms. Wait that long and retry; it is not an error, and nothing was charged twice.

Runs already in flight

A run that is still executing answers 202 with its id. Polling GET /v2/runs/{id} is always free and never starts anything new.