API v2 DocumentationMedia
Inspect a video or audio file
Returns the duration, size, containers and codecs of a video or audio media item, so you can check a reference file against the model's limits before creating a reference video task.
Authorization
bearerAuth AuthorizationBearer <token>
In all requests that require authentication
In: header
Path Parameters
mediaId*string
A video or audio media ID.
Response Body
application/json
application/json
application/json
application/json
curl -X GET "https://api.pixai.art/v2/media/string/info"{
"mediaId": "string",
"durationSeconds": 0,
"sizeBytes": "string",
"containers": [
"string"
],
"videoStreams": [
{
"codec": "string",
"width": 0,
"height": 0,
"averageFrameRate": 0
}
],
"audioStreams": [
{
"codec": "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
}Get an upload URL for an image POST
Step 1 of uploading an image you want to use as an input, for example a `contextImages` entry, a video frame or an inpaint base image.
Register an uploaded audio file POST
Step 3 of uploading an audio clip. The returned `id` is the media ID to pass in `referenceAudioMediaIds`.