API v2 ドキュメントメディア
アップロードした画像の登録
画像アップロードのステップ 3 です。アップロードしたファイルをメディアアイテムにします。uploadUrl への PUT が成功した後に呼び出してください。返される id が、他のエンドポイントに渡すメディア ID です。
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
}