POST /v1/run/{sku} call still returns the standard success envelope when the result is
ready during the initial wait. Otherwise, it returns 202 Accepted with a Request ID.
Start a durable call
Send anIdempotency-Key with every durable call. Reuse the same key only when you are resuming the
same logical invocation with the same SKU and input.
Prefer: respond-async asks AnyAPI to return the Request snapshot immediately, even if an existing
same-key Request has already completed. Omit it to wait up to 10 seconds. You can also send
Prefer: wait=N; AnyAPI clamps N to 90 seconds.
A pending response includes Location, Retry-After, and X-Anyapi-Request-Id headers:
Poll the Request
Read the Request from the URL inLocation. Customer polling reads AnyAPI’s stored state. It does
not repeat the paid operation.
queued, running, succeeded, failed, or expired. Honor
retryAfterSeconds before polling again. A succeeded snapshot includes the standard run envelope
as result. A failed snapshot includes a safe AnyAPI error code.
Request IDs are private to the wallet customer that created them. Unknown IDs and IDs owned by
another customer both return 404.
Resume safely
Keep both the Request ID and the original idempotency key until the call completes. If a client wait times out, resume withGET /v1/requests/{requestId}. Do not send another paid POST.
AnyAPI returns the same active Request for concurrent calls that use the same key, SKU, and input.
It replays a completed success. Reusing a key with different input returns 409.
Successful output remains retrievable for 24 hours. After that, the Request metadata remains
available with resultExpired: true.
Durable execution currently requires an authenticated wallet API key. It is not available through
anonymous, x402, or MPP payment flows.