Idempotency-Key makes the retry safe: the same key and the same request never run twice.
The rules
- Accepted on every POST, PATCH and PUT, and on deleteSegment: 1 to 255 printable ASCII characters. Any other value answers 422
validation_failed. - Required on every operation that starts a job or spends credits, and on createSegment and restoreTranscriptVersion. Without it they answer 400
idempotency_key_required. The operation table marks them. - Ignored on estimates, whatever its value: every estimate is computed fresh.
- Kept 24 hours, per workspace and acting user, so it survives replacing the API key.
What a retry answers
When to retry
The problem says it inretry:
Before a new attempt at paid work, call the estimate again, because the price may have changed. A higher price is a new
decision for whoever accepted the first one, so do not send it as the price cap on your own.
A client that may restart keeps its keys where a restart finds them. The Quickstart’s client
saves them in a file with the price it accepted, so a rerun sends the same requests and the API replays them.
Edits and deletes
An edit that requiresIf-Match is protected twice. Its stale ETag makes a blind retry fail with 412, and the replay check runs before the If-Match check, so a retry of a successful edit with its key replays instead of failing. Send a key on those too.
A DELETE takes no key, and repeating it answers 204 for at least 30 days after the delete. The one exception is deleteSegment, a hard delete that returns an edit result: it accepts a key, and without one a repeat answers 404 segment_not_found.