Brand

assets

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

品牌展示时使用的照片、视频和插图:店面、产品、团队。SDK 0.5.2+。

60 at most25 MB uploaded · 200 MB from Cloud~1 credit to describe
Using Python?

Switch any code block to Python: the choice applies to every page. Python SDK guide and resource reference.

// 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");
# 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")

角色

hero、place、interior、product、team、work、detail、texture 或 other。

没有描述的照片会被自动描述

由一个模型撰写描述,约花费 1 个积分,以便代理或页面无需查看图片就能选出合适的那张。自行提供 description,或设置 describe: false,则不产生任何费用。同一文件添加两次会被复用:lastReused 会说明这一点。