API v2 문서미디어
ID로 미디어 URL 조회
완료된 작업의 outputs.mediaIds나 outputs.videoMediaId 등 최대 100개의 미디어 ID를 URL로 변환합니다. 공개 미디어는 인증이 필요하지 않습니다.
존재하지 않는 ID는 결과에서 제외되며 결과 순서는 보장되지 않으므로, id로 항목을 대조하세요.
Authorization
bearerAuth AuthorizationBearer <token>
인증이 필요한 모든 요청에는 HTTP 헤더에 다음을 추가하세요
In: header
Query Parameters
ids*|array<>
쉼표로 구분한 미디어 ID 1~100개입니다(예: ?ids=1,2,3). 파라미터를 반복(?ids=1&ids=2)해도 됩니다.
Response Body
application/json
curl -X GET "https://api.pixai.art/v2/media/batch?ids=string"[
{
"id": "string",
"type": "IMAGE",
"urls": [
{
"variant": "PUBLIC",
"url": "string"
}
],
"width": 0,
"height": 0,
"fileUrl": "string",
"hlsUrl": "string",
"thumbnailUrl": "string",
"duration": 0
}
]작업 조회 GET
v2 엔드포인트로 생성한 작업을 조회합니다. `status`가 `completed`, `failed`, `cancelled` 중 하나가 될 때까지 몇 초마다 폴링하세요.
오디오 파일 업로드 URL 발급 POST
`POST /v2/reference-video/create`의 `referenceAudioMediaIds`에 사용할 오디오 클립을 업로드하는 1단계입니다. 흐름은 이미지와 같습니다. 파일의 `Content-Type`(`audio/mpeg` 또는 `audio/wav`)을 지정해 바이트를 `uploadUrl`에 `PUT`한 다음 `POST /v2/media/audio/register`를 호출하세요.