Class CreateAssetRequest

Request for creating an asset.

Remarks

This is used with AssetLibrary.create. The data field requires data from the matching asset_type. This includes FileData, CheckpointData, LoraData, VAEData, and TextualInversionData.

Constructors

Properties

asset_type: AssetType

AssetType one of the valid asset types, including 'file', 'checkpoint', 'lora', and 'textual_inversion'.

data: any

Data specific to the asset type; use the class named (asset_type)Data. Includes FileData, CheckpointData, LoraData, VAEData, and TextualInversionData.

description: null | string

Description of asset.

file?: string | ArrayBuffer | Buffer

string representing filepath, Buffer, or ArrayBuffer containing data of asset to upload.

is_public?: boolean

true if asset is public.

name: string

Alphanumeric, _, or - allowed.

transfer_api_type?: TransferApiType

TransferApiType - If left undefined, the OctoAI TypeScript SDK will select the fastest method for upload based on file size.

url?: string

The URL of the asset to upload.

Generated using TypeDoc