Skip to main content
POST
/
assets
Upload an asset
curl --request POST \
  --url https://api.krea.ai/assets \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: multipart/form-data' \
  --form file='@example-file' \
  --form 'description=<string>'
{
  "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "image_url": "<string>",
  "uploaded_at": "2023-11-07T05:31:56Z",
  "width": 123,
  "height": 123,
  "size_bytes": 123,
  "mime_type": "<string>",
  "description": "<string>",
  "metadata": "<unknown>"
}

Authorizations

Authorization
string
header
required

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

Body

multipart/form-data
file
file
required

The file to upload (JPEG, PNG, WebP, HEIC, MP4, MOV, WebM, GLB, WAV, MP3). Maximum size: 75MB.

description
string

Optional description for the asset

Response

Asset uploaded successfully

id
string<uuid>
required
image_url
string<uri>
required
uploaded_at
string<date-time>
required
width
number | null
required
height
number | null
required
size_bytes
number | null
required
mime_type
string | null
required
description
string
metadata
any