v1 preview
CORE CONCEPTS/Callbacks & polling
API PREVIEWv1

Callbacks & polling

Generation state, credit settlement, and delivery are separate.

Platform preview. Real model providers are not connected yet. Requests and prices below describe the intended contract; examples are not live generation results.

Two different callback directions

Provider callbacks notify APIstable about an upstream task. Customer webhooks notify your application about a platform operation. They are different endpoints and use separate credentials and verification.

Callback support is part of the provider integration stage. Do not assume a signed production webhook is active merely because a task preview contains notification fields.

Make receivers idempotent

  • Verify the documented signature against the original request body before trusting an event.
  • Deduplicate by event ID and tolerate retries or out-of-order delivery. Query the authoritative task when unsure.
  • Acknowledge accepted events promptly, then process your application work in a background task.
  • A failed customer notification does not regenerate media or change settled credits.

Polling remains a recovery path

Providers without reliable callbacks can be polled. APIstable records the upstream task ID before scheduling later checks. A missed callback, a worker restart, or a file-download retry must not create another paid generation.

Your app can also poll the public task endpoint. Use a bounded wait and backoff; a timeout means your app stopped waiting, not that the upstream operation was cancelled.

Was this page useful?Something unclear?