cURL
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>" }
Upload a new asset (image, video, audio, or 3D model). Accepts multipart/form-data with a file and optional description. Maximum file size: 75MB.
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Bearer <token>
<token>
The file to upload (JPEG, PNG, WebP, HEIC, MP4, MOV, WebM, GLB, WAV, MP3). Maximum size: 75MB.
Optional description for the asset
Asset uploaded successfully
Was this page helpful?