Skip to content
Get started

Collections

List
client.collections.list(CollectionListParams { pageSize, paginationToken } query?, RequestOptionsoptions?): CollectionsCursor<CollectionListResponse { id, assetCount, createdAt, 6 more } >
GET/collections
Create
client.collections.create(CollectionCreateParams { name } body, RequestOptionsoptions?): CollectionCreateResponse { collection }
POST/collections
Retrieve
client.collections.retrieve(stringcollectionID, RequestOptionsoptions?): CollectionRetrieveResponse { collection }
GET/collections/{collectionId}
Update
client.collections.update(stringcollectionID, CollectionUpdateParams { name, thumbnail } body, RequestOptionsoptions?): CollectionUpdateResponse { collection }
PUT/collections/{collectionId}
Delete
client.collections.delete(stringcollectionID, RequestOptionsoptions?): CollectionDeleteResponse
DELETE/collections/{collectionId}
ModelsExpand Collapse
CollectionListResponse { id, assetCount, createdAt, 6 more }
id: string

The collection ID (example: “asset_GTrL3mq4SXWyMxkOHRxlpw”)

assetCount: number
createdAt: string

The collection creation date as an ISO string (example: “2023-02-03T11:19:41.579Z”)

itemCount: number
modelCount: number
name: string

The collection name

ownerId: string

The owner ID (example: “dcf121faaa1a0a0bbbd9ca1b73d62aea”)

updatedAt: string

The collection last update date as an ISO string (example: “2023-02-03T11:19:41.579Z”)

thumbnail?: Thumbnail { assetId, url }

The thumbnail for the collection (if any)

assetId: string
url: string
CollectionCreateResponse { collection }
collection: Collection { id, assetCount, createdAt, 6 more }
id: string

The collection ID (example: “asset_GTrL3mq4SXWyMxkOHRxlpw”)

assetCount: number
createdAt: string

The collection creation date as an ISO string (example: “2023-02-03T11:19:41.579Z”)

itemCount: number
modelCount: number
name: string

The collection name

ownerId: string

The owner ID (example: “dcf121faaa1a0a0bbbd9ca1b73d62aea”)

updatedAt: string

The collection last update date as an ISO string (example: “2023-02-03T11:19:41.579Z”)

thumbnail?: Thumbnail { assetId, url }

The thumbnail for the collection (if any)

assetId: string
url: string
CollectionRetrieveResponse { collection }
collection: Collection { id, assetCount, createdAt, 6 more }
id: string

The collection ID (example: “asset_GTrL3mq4SXWyMxkOHRxlpw”)

assetCount: number
createdAt: string

The collection creation date as an ISO string (example: “2023-02-03T11:19:41.579Z”)

itemCount: number
modelCount: number
name: string

The collection name

ownerId: string

The owner ID (example: “dcf121faaa1a0a0bbbd9ca1b73d62aea”)

updatedAt: string

The collection last update date as an ISO string (example: “2023-02-03T11:19:41.579Z”)

thumbnail?: Thumbnail { assetId, url }

The thumbnail for the collection (if any)

assetId: string
url: string
CollectionUpdateResponse { collection }
collection: Collection { id, assetCount, createdAt, 6 more }
id: string

The collection ID (example: “asset_GTrL3mq4SXWyMxkOHRxlpw”)

assetCount: number
createdAt: string

The collection creation date as an ISO string (example: “2023-02-03T11:19:41.579Z”)

itemCount: number
modelCount: number
name: string

The collection name

ownerId: string

The owner ID (example: “dcf121faaa1a0a0bbbd9ca1b73d62aea”)

updatedAt: string

The collection last update date as an ISO string (example: “2023-02-03T11:19:41.579Z”)

thumbnail?: Thumbnail { assetId, url }

The thumbnail for the collection (if any)

assetId: string
url: string
CollectionDeleteResponse = unknown

CollectionsAssets

Add
client.collections.assets.add(stringcollectionID, AssetAddParams { assetIds } body, RequestOptionsoptions?): AssetAddResponse { collection }
PUT/collections/{collectionId}/assets
Remove
client.collections.assets.remove(stringcollectionID, AssetRemoveParams { assetIds } body, RequestOptionsoptions?): AssetRemoveResponse { collection }
DELETE/collections/{collectionId}/assets
ModelsExpand Collapse
AssetAddResponse { collection }
collection: Collection { id, assetCount, createdAt, 6 more }
id: string

The collection ID (example: “asset_GTrL3mq4SXWyMxkOHRxlpw”)

assetCount: number
createdAt: string

The collection creation date as an ISO string (example: “2023-02-03T11:19:41.579Z”)

itemCount: number
modelCount: number
name: string

The collection name

ownerId: string

The owner ID (example: “dcf121faaa1a0a0bbbd9ca1b73d62aea”)

updatedAt: string

The collection last update date as an ISO string (example: “2023-02-03T11:19:41.579Z”)

thumbnail?: Thumbnail { assetId, url }

The thumbnail for the collection (if any)

assetId: string
url: string
AssetRemoveResponse { collection }
collection: Collection { id, assetCount, createdAt, 6 more }
id: string

The collection ID (example: “asset_GTrL3mq4SXWyMxkOHRxlpw”)

assetCount: number
createdAt: string

The collection creation date as an ISO string (example: “2023-02-03T11:19:41.579Z”)

itemCount: number
modelCount: number
name: string

The collection name

ownerId: string

The owner ID (example: “dcf121faaa1a0a0bbbd9ca1b73d62aea”)

updatedAt: string

The collection last update date as an ISO string (example: “2023-02-03T11:19:41.579Z”)

thumbnail?: Thumbnail { assetId, url }

The thumbnail for the collection (if any)

assetId: string
url: string

CollectionsModels

Add
client.collections.models.add(stringcollectionID, ModelAddParams { modelIds } body, RequestOptionsoptions?): ModelAddResponse { collection }
PUT/collections/{collectionId}/models
Remove
client.collections.models.remove(stringcollectionID, ModelRemoveParams { modelIds } body, RequestOptionsoptions?): ModelRemoveResponse { collection }
DELETE/collections/{collectionId}/models
ModelsExpand Collapse
ModelAddResponse { collection }
collection: Collection { id, assetCount, createdAt, 6 more }
id: string

The collection ID (example: “asset_GTrL3mq4SXWyMxkOHRxlpw”)

assetCount: number
createdAt: string

The collection creation date as an ISO string (example: “2023-02-03T11:19:41.579Z”)

itemCount: number
modelCount: number
name: string

The collection name

ownerId: string

The owner ID (example: “dcf121faaa1a0a0bbbd9ca1b73d62aea”)

updatedAt: string

The collection last update date as an ISO string (example: “2023-02-03T11:19:41.579Z”)

thumbnail?: Thumbnail { assetId, url }

The thumbnail for the collection (if any)

assetId: string
url: string
ModelRemoveResponse { collection }
collection: Collection { id, assetCount, createdAt, 6 more }
id: string

The collection ID (example: “asset_GTrL3mq4SXWyMxkOHRxlpw”)

assetCount: number
createdAt: string

The collection creation date as an ISO string (example: “2023-02-03T11:19:41.579Z”)

itemCount: number
modelCount: number
name: string

The collection name

ownerId: string

The owner ID (example: “dcf121faaa1a0a0bbbd9ca1b73d62aea”)

updatedAt: string

The collection last update date as an ISO string (example: “2023-02-03T11:19:41.579Z”)

thumbnail?: Thumbnail { assetId, url }

The thumbnail for the collection (if any)

assetId: string
url: string