PixAI Platform

Create a generation task

Start to generate a new image.

POST
/task

Authorization

bearerAuth
AuthorizationBearer <token>

In all requests that require authentication, please add the following to the HTTP header:

In: header

Request Body

application/json

Create a generation task with parameters.

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

curl -X POST "https://api.pixai.art/v1/task" \  -H "Content-Type: application/json" \  -d '{    "parameters": {      "prompts": "1girl, green hair, solo, standing",      "modelId": "1983308862240288769",      "width": 768,      "height": 1280,      "batchSize": 4    }  }'
{
  "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",
  "outputs": {
    "mediaIds": [
      "string"
    ],
    "mediaUrls": [
      "string"
    ]
  }
}
Empty
Empty