Guides
Retries and recovery
Reconcile uncertain requests, distinguish quota refusals from authentication throttles, and avoid duplicate paid work.
Check what happened first
Section titled “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 | Inspect your analyses 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 | Read its status. Start is idempotent while queued or processing: another call returns that resource without starting more work. A terminal resource cannot restart. |
| Stop an analysis | 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 | Inspect that analysis’s clip jobs before creating another. Repeating an accepted create makes another job and consumes quota again. |
| Delete an analysis or clip job | 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 describes normal status polling.
Quota refusals
Section titled “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 explains account limits and the lifecycle explains analysis slots and state changes. Get the user’s approval before paid work or deleting their data.
Authentication throttles
Section titled “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, not repeated attempts.