/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 settingbackground=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
Useclient.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 viaclient.responses.cancel.
Registering Webhook Callbacks
To avoid continuous polling, specify a callback URL in thewebhook 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: