Skip to main content

Retries, idempotency and unknown outcomes

Decide per endpoint whether a request can be repeated.

Ordinary text requests

An initial text request does not promise replay of the original response or exactly-once execution. Timeouts, reloads, interrupted streams and SDK network errors do not prove the provider never executed.

  1. Retain the transport ID and any returned consumption ID.
  2. Inspect execution and financial state in My requests.
  3. Only after confirmed non-acceptance should the application/user explicitly decide to issue another request.

Model examples disable automatic SDK POST retries. Adding Idempotency-Key to every text request does not create a universal safe-replay guarantee.

Operations with explicit idempotency

Use Idempotency-Key for media, orders, budgets or compliance only when that endpoint’s contract supports it. Persist the original key and parameters and reuse them for recovery of the same operation. Changes to identity, profile, quantity, amount or price version can conflict; do not bypass 409 with a random new key.

Transport, consumption and provider/task/operation identifiers are separate. Settlement, release and refunds follow their own rules; cancelling a UI action does not erase actual usage.

Next action

Known stateAction
Definitely not acceptedCorrect conditions and explicitly submit a new request
Accepted and runningQuery the original request/task
Unknown outcomeKeep original identifiers and reconcile before executing again
Delivered, billing pendingKeep the output and query the original bill; do not assume free usage

Errors · Streaming · Billing