POST
/
v1
/
files
/
upload-urls
curl --request POST \
  --url https://api.magichour.ai/v1/files/upload-urls \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "items": [
    {
      "type": "video",
      "extension": "mp4"
    },
    {
      "type": "audio",
      "extension": "mp3"
    }
  ]
}'
{
  "items": [
    {
      "upload_url": "https://videos.magichour.ai/api-assets/id/video.mp4?auth-value=1234567890",
      "expires_at": "2024-07-25T16:56:21.932Z",
      "file_path": "api-assets/id/video.mp4"
    },
    {
      "upload_url": "https://videos.magichour.ai/api-assets/id/audio.mp3?auth-value=1234567890",
      "expires_at": "2024-07-25T16:56:21.932Z",
      "file_path": "api-assets/id/audio.mp3"
    }
  ]
}

Authorizations

Authorization
string
header
required

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

Body

application/json
Body
items
object[]
required
Example:
[
  { "type": "video", "extension": "mp4" },
  { "type": "audio", "extension": "mp3" }
]

Response

200
application/json

Success

items
object[]
required
Example:
[
  {
    "upload_url": "https://videos.magichour.ai/api-assets/id/video.mp4?auth-value=1234567890",
    "expires_at": "2024-07-25T16:56:21.932Z",
    "file_path": "api-assets/id/video.mp4"
  },
  {
    "upload_url": "https://videos.magichour.ai/api-assets/id/audio.mp3?auth-value=1234567890",
    "expires_at": "2024-07-25T16:56:21.932Z",
    "file_path": "api-assets/id/audio.mp3"
  }
]