Skip to main content
POST
/
assets
Create Asset
curl --request POST \
  --url http://0.0.0.0:8008/assets \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: multipart/form-data' \
  --form index_id=3c90c3cc-0d44-4b50-8888-8dd25736052a \
  --form save_original=true \
  --form id=3c90c3cc-0d44-4b50-8888-8dd25736052a \
  --form 'asset_url=<string>' \
  --form 'name=<string>' \
  --form asset_file=@example-file
{
  "asset_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "task_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}

Authorizations

Authorization
string
header
required

JWT in Authorization header. 'Bearer ' prefix optional.

Body

multipart/form-data
index_id
string<uuid>
required

ID of the index this asset belongs to

save_original
boolean
required

Whether to save the original file

name
string
required

The name of the asset. Must include the extension.

id
string<uuid> | null

ID of the asset to create (in most cases, leave this blank. the server will generate it.)

features
enum<string>[]

Features to be extracted on the asset

asset_file
file | null

Direct file upload

asset_url
string | null

URL to download file from

Response

Successful Response

API response schema for creating an asset

asset_id
string<uuid>
required
task_id
string<uuid>
required