Requests and recovery
Track requests, handle retries, and recover uncertain results.
Retries and recovery
Send a unique Idempotency-Key for each intended completion. It accepts 1–128 ASCII letters, digits, underscores, or hyphens. Without one, the API creates a request ID. Retain the ID before sending a request so you can inspect an uncertain result.
An existing ID returns HTTP 409, including while the original request is preparing. Changing its body also returns 409. The API does not replay a reply or start another paid completion under a retained ID. Use a new ID only when you intend to pay for another completion. Failures before signing remain for ten minutes. Signed terminal records remain for seven days; unresolved records remain until reconciled. Keep IDs unique after those windows, because an expired record no longer prevents reuse.
An uncertain signed transaction is reconciled before any replacement. Recovery can resend the same signed transaction; it does not dispatch inference again. Disconnecting stops response delivery and triggers best-effort provider cancellation. It does not reverse work or a valid usage charge. Unused funds become free protocol balance after settlement, release, or expiry.
Check request status
Use GET /v1/requests/{requestId} with an API key from the same account. It returns id, object, status, created_at in Unix seconds, booking, signature, reserved_usdc, charged_usdc, and settled. Booking and signature can be null before submission. Amounts are exact decimal strings with six places.
status describes request progress: preparing, submitted, reserved, dispatching, streaming, completed, interrupted, failed, expired, or released. completed means the provider response transfer finished; it does not mean payment has settled. charged_usdc is available after confirmed booking state or an authenticated, confirmed receipt establishes the amount, when settled becomes true. A null charge is unknown, not zero.
This example shows completed response delivery with settlement still pending: