Chuyển đến nội dung chính
POST
/
media
Create media
curl --request POST \
  --url https://api.youka.io/api/v1/media \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "inputFileId": "<string>",
  "type": "video"
}
'
{
  "id": "<string>",
  "type": "video",
  "url": "<string>",
  "status": "processing",
  "error": "<string>",
  "width": 123,
  "height": 123,
  "createdAt": "<string>",
  "updatedAt": "<string>",
  "previewUrl": "<string>"
}

Ủy quyền

Authorization
string
header
bắt buộc

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Tiêu đề

Idempotency-Key
string

Nội dung

application/json
inputFileId
string
bắt buộc
type
enum<string>
bắt buộc
Tùy chọn có sẵn:
video,
image,
logo,
intro-video,
outro-video

Phản hồi

200 - application/json

Media created

id
string
bắt buộc
type
enum<string>
bắt buộc
Tùy chọn có sẵn:
video,
image,
logo,
intro-video,
outro-video
url
string<uri>
bắt buộc
status
enum<string>
bắt buộc
Tùy chọn có sẵn:
processing,
ready,
failed
error
string | null
bắt buộc
width
number
bắt buộc
height
number
bắt buộc
createdAt
string
bắt buộc
updatedAt
string
bắt buộc
previewUrl
string<uri> | null