Skip to main content
The Responses API (/v1/responses) features native asynchronous execution for heavy computations, extensive document analysis, and long-running agent workflows using the official OpenAI SDK.

Initializing Background Tasks

Dispatch asynchronous requests by setting background=True in client.responses.create. The gateway returns an initial response object with a queued status and task id immediately without holding open an HTTP connection.

Polling Status and Output Retrieval

Use client.responses.retrieve to monitor task execution until reaching a terminal state (completed, failed, or cancelled).

Cancelling Running Tasks

Tasks currently queued or in progress can be aborted at any time via client.responses.cancel.

Registering Webhook Callbacks

To avoid continuous polling, specify a callback URL in the webhook property under extra_body. Neosantara delivers an automated HTTP POST once execution concludes.

Task Lifecycle States

Webhook Delivery Payload

Upon reaching a terminal state (completed or failed), Neosantara dispatches an HTTP POST request to your registered webhook URL:

Next Steps