Get Prediction
Task Management
Get Prediction
Poll an asynchronous prediction task by task_id via GET /v1/predictions/.
GET
Get Prediction
Use the
data.task_id returned from Create Prediction as the path parameter prediction_id.
Response fields
| Field | Type | Description |
|---|---|---|
code | string | Response status code. "0" indicates success. |
usage | object | Billing summary. May be omitted while the task is still processing. |
usage.upstream_cost | number | Upstream cost before discount (USD). |
usage.discount | number | Discount amount (USD). |
usage.discount_percent | number | Discount rate as a decimal (e.g. 0.75 = 75% off). |
usage.cost | number | Final billed cost after discount (USD). |
data.task_id | string | Async task ID. |
data.task_status | string | Task status, e.g. processing, success, or failed. |
data.output | array | Generated outputs when the task succeeds. |
data.output[].type | string | Output media type, e.g. image or video. |
data.output[].image | string | Image URL when type is image. URLs may be time-limited. |
request_id | string | Unique request identifier for support and debugging. |
Authorizations
Authorization: Bearer YOUR_API_KEY
Path Parameters
Task ID (data.task_id) returned when the prediction was created.
Response
Prediction detail
Response status code. "0" indicates success.
Example:
"0"
Unique request identifier for support and debugging.
Example:
"8bd6b5784a1e42b79bf172607f476f56"
Billing summary for the prediction. May be omitted while the task is still processing.