Assets
Upload and manage 3D models, textures, and graphics.
List Assets
const assets = await client.getAssets('3d');
assets.forEach(a => console.log(a.name, a.format, a.fileSize));Create Asset
const asset = await client.createAsset({
name: 'Chair Model',
type: '3d',
url: 'https://storage.example.com/chair.glb',
fileSize: 1024000,
category: 'furniture'
});Get Download URL
const url = await client.getAssetDownloadUrl('asset_123');
// Returns a signed URL valid for about 5 minutes.
// Download under the asset's display name instead of opening in the browser
// (e.g. "Lounge Chair.glb"):
const saveUrl = await client.getAssetDownloadUrl('asset_123', { attachment: true });
// A 3D model uploaded as OBJ / FBX / STL / DAE / GLTF / ZIP is stored as GLB.
// When asset.hasSourceFile is true, the original upload is also available:
if (asset.hasSourceFile) {
const originalUrl = await client.getAssetDownloadUrl('asset_123', { variant: 'original', attachment: true });
}
// Throws when the model has no original, or the server predates API 3.15.Imported Models (Online Libraries)
// Models imported from Poly Haven, Sketchfab or Smithsonian Open Access
// (Assets → Browse Online) carry their provenance and readiness score:
const assets = await client.getAssets('3d');
for (const a of assets) {
if (a.externalSource) {
console.log(a.name, a.externalSource.license, a.readinessLevel);
// Show this wherever you publish a CC BY / CC BY-SA model:
console.log(a.externalSource.attribution);
}
}
// Null for uploaded models; absent on servers older than API 3.16.
// Searching and importing are session-only REST endpoints (/external-assets/*),
// not SDK methods — see the API docs, Online 3D Libraries.Delete Asset
await client.deleteAsset('asset_123');