# assets

Canonical URL: https://developers.iagenify.com/sdk/ref/brand-object/assets/
Language: en

`brand.assets.add(asset) · update(id, changes) · remove(id) · byRole(role) · last · lastCredits`

The photos, videos and illustrations a brand is shown with: a storefront, a product, a team. SDK 0.5.2+.

Status: 60 at most · 25 MB uploaded · 200 MB from Cloud · ~1 credit to describe

```javascript
// A file already in the account's Object Storage: nothing is uploaded again.
await brand.assets.add({ cloud: "Brand/storefront.jpg", role: "hero" });

// Or bytes, like a logo.
await brand.assets.add({ name: "team.jpg", content: bytes, role: "team", description: "The roasting team" });

brand.assets.last;          // the resource just added, with its url
brand.assets.lastCredits;   // what its description cost
brand.assets.byRole("hero");
```

## Roles {#roles}

`hero`, `place`, `interior`, `product`, `team`, `work`, `detail`, `texture` or `other`.

## A photo without a description is described {#describe}

A model writes it, for about one credit, so that an agent or a page can choose the right picture without seeing it. Give `description` yourself, or `describe: false`, and nothing is spent. The same file added twice is reused: `lastReused` says so.

- [Brand](/sdk/ref/brand-object): What a brand carries, and how to change it.
- [api.cloud](/sdk/ref/cloud): The Object Storage these files live in.

```python
# A file already in the account's Object Storage: nothing is uploaded again.
brand.assets.add({"cloud": "Brand/storefront.jpg", "role": "hero"})

# Or bytes, like a logo.
brand.assets.add({"name": "team.jpg", "content": image_bytes, "role": "team", "description": "The roasting team"})

brand.assets.last           # the resource just added, with its url
brand.assets.last_credits   # what its description cost
brand.assets.by_role("hero")
```
