Create an image-to-video task
Animates an image into a video with PixAI's Tsubaki video model. The video starts on firstFrameMediaId and, when you send lastFrameMediaId, ends on it. The output keeps the first frame's aspect ratio.
Frames are image media IDs: upload your own with POST /v2/media/image/upload-url, or reuse an image you generated. Media owned by another user is rejected.
Image-to-video needs a PixAI membership. Credits are charged when the task is created. Poll GET /v2/task/{id} for the result; a finished task's video is outputs.videoMediaId.
Authorization
bearerAuth In all requests that require authentication
In: header
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/json
application/json
application/json
application/json
curl -X POST https://api.pixai.art/v2/frame-video/create \ -H "Authorization: Bearer $PIXAI_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "model": "tbkv1.0.1", "firstFrameMediaId": "1943547603237249965", "prompt": "she turns around and smiles, hair blowing in the wind", "duration": 5 }'{
"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
}{
"code": "string",
"status": 0,
"message": "string",
"data": {},
"defined": true
}{
"code": "string",
"status": 0,
"message": "string",
"data": {},
"defined": true
}Get the limits of an inpaint preset GET
Returns the size limits and redraw presets of an inpaint `modelPreset`. An unknown preset answers `null` fields rather than an error. No authentication is needed.
Create a reference video task POST
Generates a video guided by reference images, and depending on the model, reference videos and audio.