Get an upload URL for an audio file
Step 1 of uploading an audio clip for referenceAudioMediaIds of POST /v2/reference-video/create. The flow is the same as for images: PUT the bytes to uploadUrl with the file's Content-Type (audio/mpeg or audio/wav), then call POST /v2/media/audio/register.
Only WAV and MP3 are accepted, under 15 MiB per clip. Duration limits depend on the video model; they are checked when the video task is created, not at upload.
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
curl -X POST "https://api.pixai.art/v2/media/audio/upload-url" \ -H "Content-Type: application/json" \ -d '{}'{
"uploadUrl": "string",
"externalId": "string"
}{
"code": "string",
"status": 0,
"message": "string",
"data": {},
"defined": true
}Get media URLs by ID GET
Resolves up to 100 media IDs to their URLs, for example the `outputs.mediaIds` or `outputs.videoMediaId` of a finished task. No authentication is needed for public media.
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.