PixAI Platform
API v2 문서미디어

업로드한 이미지 등록

이미지 업로드의 3단계로, 업로드한 파일을 미디어 항목으로 만듭니다. uploadUrl로의 PUT이 성공한 후 호출하세요. 반환된 id가 다른 엔드포인트에 전달할 미디어 ID입니다.

POST
/media/image/register

Authorization

bearerAuth
AuthorizationBearer <token>

인증이 필요한 모든 요청에는 HTTP 헤더에 다음을 추가하세요

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/image/register" \  -H "Content-Type: application/json" \  -d '{    "externalId": "3f2b8c1e-6a4d-4f6e-9b1a-2c7d5e8f9a01"  }'
{
  "id": "string",
  "type": "IMAGE",
  "urls": [
    {
      "variant": "PUBLIC",
      "url": "string"
    }
  ],
  "width": 0,
  "height": 0,
  "fileUrl": "string",
  "hlsUrl": "string",
  "thumbnailUrl": "string",
  "duration": 0
}
{
  "code": "string",
  "status": 0,
  "message": "string",
  "data": {},
  "defined": true
}