Skip to content
Get started

Uploads

Create
client.uploads.create(UploadCreateParams { assetOptions, civitaiModelUrl, contentType, 6 more } body, RequestOptionsoptions?): UploadCreateResponse { upload }
POST/uploads
Retrieve
client.uploads.retrieve(stringuploadID, RequestOptionsoptions?): UploadRetrieveResponse { upload }
GET/uploads/{uploadId}
Trigger Action
client.uploads.triggerAction(stringuploadID, UploadTriggerActionParams { action } body, RequestOptionsoptions?): UploadTriggerActionResponse { upload }
POST/uploads/{uploadId}/action
ModelsExpand Collapse
UploadCreateResponse { upload }
upload: Upload { id, authorId, createdAt, 18 more }
id: string
authorId: string
createdAt: string
fileName: string
kind: "3d" | "asset" | "audio" | 4 more

The kind of the file once validated (example: “model”)

One of the following:
"3d"
"asset"
"audio"
"avatar"
"image"
"model"
"video"
ownerId: string
source: "civitai" | "huggingface" | "multipart" | 2 more
One of the following:
"civitai"
"huggingface"
"multipart"
"other"
"url"
status: "complete" | "failed" | "imported" | 3 more
One of the following:
"complete"
"failed"
"imported"
"pending"
"validated"
"validating"
updatedAt: string
assetOptions?: AssetOptions { collectionIds, hide, parentId }
collectionIds?: Array<string>

The collection ids to add the asset to.

hide?: boolean

Specify if the asset should be hidden from the user.

parentId?: string

The parentId of the asset.

config?: unknown
contentType?: string
entityId?: string
errorMessage?: string
fileSize?: number
jobId?: string
originalFileName?: string
parts?: Array<Part>
expires: string
number: number
url: string
partsCount?: number
provider?: "civitai" | "huggingface" | "other"
One of the following:
"civitai"
"huggingface"
"other"
url?: string
UploadRetrieveResponse { upload }
upload: Upload { id, authorId, createdAt, 18 more }
id: string
authorId: string
createdAt: string
fileName: string
kind: "3d" | "asset" | "audio" | 4 more

The kind of the file once validated (example: “model”)

One of the following:
"3d"
"asset"
"audio"
"avatar"
"image"
"model"
"video"
ownerId: string
source: "civitai" | "huggingface" | "multipart" | 2 more
One of the following:
"civitai"
"huggingface"
"multipart"
"other"
"url"
status: "complete" | "failed" | "imported" | 3 more
One of the following:
"complete"
"failed"
"imported"
"pending"
"validated"
"validating"
updatedAt: string
assetOptions?: AssetOptions { collectionIds, hide, parentId }
collectionIds?: Array<string>

The collection ids to add the asset to.

hide?: boolean

Specify if the asset should be hidden from the user.

parentId?: string

The parentId of the asset.

config?: unknown
contentType?: string
entityId?: string
errorMessage?: string
fileSize?: number
jobId?: string
originalFileName?: string
parts?: Array<Part>
expires: string
number: number
url: string
partsCount?: number
provider?: "civitai" | "huggingface" | "other"
One of the following:
"civitai"
"huggingface"
"other"
url?: string
UploadTriggerActionResponse { upload }
upload: Upload { id, authorId, createdAt, 18 more }
id: string
authorId: string
createdAt: string
fileName: string
kind: "3d" | "asset" | "audio" | 4 more

The kind of the file once validated (example: “model”)

One of the following:
"3d"
"asset"
"audio"
"avatar"
"image"
"model"
"video"
ownerId: string
source: "civitai" | "huggingface" | "multipart" | 2 more
One of the following:
"civitai"
"huggingface"
"multipart"
"other"
"url"
status: "complete" | "failed" | "imported" | 3 more
One of the following:
"complete"
"failed"
"imported"
"pending"
"validated"
"validating"
updatedAt: string
assetOptions?: AssetOptions { collectionIds, hide, parentId }
collectionIds?: Array<string>

The collection ids to add the asset to.

hide?: boolean

Specify if the asset should be hidden from the user.

parentId?: string

The parentId of the asset.

config?: unknown
contentType?: string
entityId?: string
errorMessage?: string
fileSize?: number
jobId?: string
originalFileName?: string
parts?: Array<Part>
expires: string
number: number
url: string
partsCount?: number
provider?: "civitai" | "huggingface" | "other"
One of the following:
"civitai"
"huggingface"
"other"
url?: string