---
title: Retries and recovery
description: "Reconcile uncertain requests, distinguish quota refusals from authentication throttles, and avoid duplicate paid work."
url: "https://mediaseer.ai/docs/guides/retries/"
---

# Retries and recovery

## Check what happened first

A timeout or lost response does not tell you whether a request took effect. Read the resource, or list its jobs, before repeating a mutation. Keep the resource ID once you receive it. Treat a structured refusal separately from an answer you never received.

The API does not support an `Idempotency-Key` header. Sending one does not deduplicate creation requests.

| Operation | After an uncertain answer |
| - | - |
| [Create an analysis](https://mediaseer.ai/docs/api/operations/createvodanalysis/) | Inspect [your analyses](https://mediaseer.ai/docs/api/operations/listvodanalyses/) before creating another. Repeating an accepted create takes another slot. A matching filename alone does not establish that a resource is the same upload. |
| [Start an analysis](https://mediaseer.ai/docs/api/operations/startvodanalysis/) | Read [its status](https://mediaseer.ai/docs/api/operations/getvodanalysis/). Start is idempotent while queued or processing: another call returns that resource without starting more work. A terminal resource cannot restart. |
| [Stop an analysis](https://mediaseer.ai/docs/api/operations/stopvodanalysis/) | Read its status first. A retry can report that the resource is gone after an upload was abandoned, or that cancellation has already happened. |
| [Create clips](https://mediaseer.ai/docs/api/operations/createclipjob/) | Inspect [that analysis’s clip jobs](https://mediaseer.ai/docs/api/operations/listclipjobs/) before creating another. Repeating an accepted create makes another job and consumes quota again. |
| [Delete an analysis](https://mediaseer.ai/docs/api/operations/deletevodanalysis/) or [clip job](https://mediaseer.ai/docs/api/operations/deleteclipjob/) | Read it to reconcile an uncertain delete. Confirmed absence completes the cleanup; an authentication error does not establish absence. |

An explicit refusal that creates nothing differs from an uncertain response: follow the operation’s documented error and recovery action. Do not turn a network failure during creation into an automatic second create. For reads after transient network or server errors, use bounded backoff with jitter rather than a tight loop. [Waiting for results](https://mediaseer.ai/docs/guides/wait/) describes normal status polling.

## Quota refusals

For `QUOTA_EXCEEDED`, inspect `details[].field`. These quota refusals do not include `Retry-After`; retrying an unchanged request repeatedly does not free capacity.

| Field | Recovery |
| - | - |
| `jobs` | Delete an analysis you no longer need to free an analysis slot. |
| `storage` | Delete analyses you no longer need. Clips do not count against the storage limit; a successful analysis deletion frees storage at once. |
| `sizeBytes` | Use a smaller file. |
| `dailyStarts` | Wait until the next UTC day. Stopping or deleting an analysis does not refund a start. |
| `activeClipJobs` | Wait for a job to finish, reading its status, or delete an unwanted job to free its active slot. |
| `dailyClipJobs` | Wait until the next UTC day. A failed or deleted clip job still counts. |
| `minutes` | Wait until `period.end` in usage, then start again. Deleting an analysis gives no minutes back. |
| `clips` | Wait until `period.end` in usage. Deleted clips still count. |

Follow the response’s guidance for another refusal. [Limits and costs](https://mediaseer.ai/docs/limits/) explains account limits and [the lifecycle](https://mediaseer.ai/docs/lifecycle/) explains analysis slots and state changes. Get the user’s approval before paid work or deleting their data.

## Authentication throttles

Account authentication operations can return `RATE_LIMITED` with `Retry-After`, expressed in seconds. Honor that wait when it is present. This is different from the quota refusals above; do not assume every rate-limit response has that header. An invalid or revoked API key needs [replacement](https://mediaseer.ai/docs/guides/api-keys/), not repeated attempts.
