Overview of Calling Modes
BizyAir offers three calling modes, switched via HTTP headers. No request body changes are needed:Synchronous Blocking
The default mode. The HTTP connection stays open until the task completes. No special header is required.outputs[].object_url.
Synchronous mode requires a long-lived connection. Make sure your HTTP client’s read timeout is at least 60 seconds to prevent the client from disconnecting while the task is still running.
Async Polling
Enable by adding theX-BizyAir-Task-Async: enable header to your request.
Step 1: Submit an async task and get therequest_id
202 Accepted immediately:
Step 2: Poll the task status
Step 3: Retrieve results once the status is Success
Complete Python Example
Webhook Callback
Enable by adding theX-BizyAir-Task-WebHook-Url header to your request.
Step 1: Submit a task with a webhook
202 Accepted + request_id immediately.
Step 2: Receive results at your callback endpoint
When the task completes, BizyAir sends a POST request to the URL you specified:- Method:
POST - Headers:
Content-Type: application/json,User-Agent: Go-http-client/1.1, along with yourX-BizyAir-Task-Authorizationand any otherX-BizyAir-Task-*headers you set - Body: Contains the complete task result
Node.js Callback Server Example
Choosing a Calling Mode
Query Task Status
Get the current status and metadata of a task (queue info, runtime, etc.).data):
Status enum:
Query Task Results
Retrieve the outputs (object_url, etc.) of a completed task.
outputs[] field reference:
Cancel Task
Only works for tasks in the Queuing state; removes the task from the queue.Cancellation is idempotent — repeated calls have no side effects. If the task is already running, use Interrupt instead.
Interrupt Task
Only works for tasks in the Running state; forces a stop.Get AI App Information
You can retrieve metadata for any AI app (WebApp) you have permission to access viaweb_app_id, including the app name, author info, cover image, and all input node definitions (input_nodes) required to call the app.
Developers can use this to dynamically discover an app’s input parameters: the variable_name in input_nodes corresponds one-to-one with the keys of input_values in the “Invoke AI Apps” request body, making it ideal for building DIY plugins. A plugin can first call this endpoint to fetch the input fields, then auto-render a form and construct the call request.
Endpoint
{web_app_id} is the app ID, the same as the numeric ID in the app detail page URL and the web_app_id in the Invoke AI Apps request body. Public apps can be accessed without additional authentication; a 404 is returned if the app does not exist or you lack access.
Request Example
Response Example
input_nodes contains all input nodes for the app; the actual response may include multiple nodes. Some field values are omitted in this example.
Response Field Reference
Fields insidedata:
Fields inside
input_nodes[]: