POST
/
v1
/
assets
curl --request POST \
  --url https://api.octoai.cloud/v1/assets \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "asset_type": "file",
  "data": {},
  "description": "<string>",
  "is_public": true,
  "name": "<string>",
  "transfer_api_type": "presigned-url",
  "url": "<string>"
}'
{
  "asset": {
    "asset_type": "file",
    "created_at": "<string>",
    "data": {
      "asset_type": "<any>",
      "file_format": "unknown",
      "preview_url": "<string>",
      "version": "<string>"
    },
    "description": "<string>",
    "id": "<string>",
    "is_public": true,
    "name": "<string>",
    "size_bytes": 123,
    "status": "ready_to_upload",
    "status_details": "<string>",
    "tenant_uuid": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
  },
  "token": "<string>",
  "transfer_api": {
    "get_url": "<string>",
    "put_url": "<string>",
    "type": "<any>"
  }
}

Authorizations

Authorization
string
headerrequired

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

Body

application/json
asset_type
enum<string>
required

Asset type.

Available options:
file,
checkpoint,
lora,
textual_inversion,
vae,
volume
data
object
required

Data specific to the asset type; use the class named ${asset_type}Data

description
string
required

Asset descriptions.

is_public
boolean
default: false

True if asset is public.

name
string
required

Asset name.

transfer_api_type
enum<string>

Transfer API type.

Available options:
presigned-url,
sts
url
string

Upload the contents of the url as the asset.

Response

200 - application/json
asset
object
required

Asset.

token
string
default: deprecated

Unused. Present for compatibility purposes.

transfer_api
object
required

Asset transfer API.