PixAI Platform
API v2 DocumentationTask

Get a task

Reads a task created by any v2 endpoint. Poll it every few seconds until status is completed, failed or cancelled.

Where the result is:

  • Images (taskKind t2i, i2i, inpaint): outputs.mediaIds and outputs.mediaUrls.
  • Videos (taskKind i2v-inhouse, reference-video): outputs.videoMediaId. Resolve it with GET /v2/media/batch?ids=<videoMediaId> and download fileUrl. outputs.mediaIds then holds only the poster image.

Generated media is not kept forever. Download results soon after they finish.

GET
/task/{id}

Authorization

bearerAuth
AuthorizationBearer <token>

In all requests that require authentication

In: header

Path Parameters

id*string

The task ID.

Query Parameters

with_parameters?string

Send true to include the stored task parameters in parameters.

Value in"true"

Response Body

application/json

application/json

application/json

curl https://api.pixai.art/v2/task/1943547603237249965 \  -H "Authorization: Bearer $PIXAI_API_KEY"
{
  "id": "string",
  "status": "waiting",
  "createdAt": "2019-08-24T14:15:22Z",
  "updatedAt": "2019-08-24T14:15:22Z",
  "startedAt": "2019-08-24T14:15:22Z",
  "endAt": "2019-08-24T14:15:22Z",
  "taskKind": "string",
  "paidQuota": 0,
  "taskStatusMsgI18n": {
    "key": "string",
    "defaultMessage": "string"
  },
  "outputs": {
    "videoMediaId": "string",
    "seed": "string",
    "mediaIds": [
      "string"
    ],
    "mediaUrls": [
      "string"
    ]
  }
}
{
  "code": "string",
  "status": 0,
  "message": "string",
  "data": {},
  "defined": true
}
{
  "code": "string",
  "status": 0,
  "message": "string",
  "data": {},
  "defined": true
}