PixAI Platform
API v2 DocumentationMedia

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.

POST
/media/audio/upload-url

Authorization

bearerAuth
AuthorizationBearer <token>

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
}