Skip to main content
POST
/
assets
/
{id}
/
upload
Upload Asset
curl --request POST \
  --url https://api.hedra.com/web-app/public/assets/{id}/upload \
  --header 'Content-Type: multipart/form-data' \
  --header 'X-API-Key: <api-key>' \
  --form file=@example-file
{
  "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "type": "image",
  "name": "<string>",
  "thumbnail_url": "<string>",
  "description": "<string>",
  "is_favorite": false,
  "created_at": "2023-11-07T05:31:56Z",
  "asset": {
    "type": "uploaded_image",
    "width": 123,
    "height": 123,
    "url": "<string>"
  }
}

Authorizations

X-API-Key
string
header
required

Path Parameters

id
string<uuid>
required

Body

multipart/form-data
file
file
required

Response

Successful Response

id
string<uuid>
required

The id of the asset.

type
enum<string>
required

The type of the asset.

Available options:
image,
audio,
video,
voice
name
string
required

Name of the asset. Default to user-provided file name.

thumbnail_url
string
required

URL of the thumbnail image.

created_at
string<date-time>
required

Date the asset was created.

asset
object
required

The asset itself.

  • UploadedImage
  • UploadedAudio
  • GeneratedAudio
  • GeneratedImage
  • GeneratedVideo
  • Voice
description
string | null

Optional description of the asset.

is_favorite
boolean
default:false

Whether the asset is favorited by the user.

I