Assets

Collections

Group assets into collections — folders you own, optionally nested one inside another.

Endpoints

MethodPath
POST/v1/collectionsCreate
GET/v1/collectionsList collections
GET/v1/collections/{id}/assetsList assets in one
POST/v1/collections/{id}/assetsAdd assets
POST/v1/collections/{id}/assets/removeRemove assets
PATCH/v1/collections/{id}Rename
DELETE/v1/collections/{id}Delete

Create a collection

POST/v1/collections
ParameterDescription
nameREQUIRED
string
Collection name, 1–255 characters.
parentIdOPTIONAL
string
Id of another collection to nest this one under. Omit for a top-level collection.
request
curl -X POST https://api.picoberry.ai/v1/collections \
  -H "Authorization: Bearer pb_live_xxx" -H "Content-Type: application/json" \
  -d '{"name":"Hero Props"}'
requests.post(f"{BASE}/v1/collections", headers=headers,
    json={"name": "Hero Props"})
await fetch(`${BASE}/v1/collections`, { method: "POST",
  headers: { ...headers, "Content-Type": "application/json" },
  body: JSON.stringify({ name: "Hero Props" }) });
response · 200
{ "success": true, "data": { "id": "019…", "name": "Hero Props", "parentId": null } }

List collections

GET/v1/collections

Returns your collections in data.

request
curl https://api.picoberry.ai/v1/collections \
  -H "Authorization: Bearer pb_live_xxx"

List assets in a collection

GET/v1/collections/{id}/assets
ParameterDescription
pageOPTIONALdefault 1
integer
1-based page number.
limitOPTIONALdefault 20
integer
Page size, up to 100.

data is an array of assets, each the same shape as GET /v1/assets/{id}.

Add assets

POST/v1/collections/{id}/assets
ParameterDescription
assetIdsREQUIRED
string[]
Asset ids to add — 1 to 200 per call.
request
curl -X POST https://api.picoberry.ai/v1/collections/019…/assets \
  -H "Authorization: Bearer pb_live_xxx" -H "Content-Type: application/json" \
  -d '{"assetIds":["019a…","019b…"]}'
requests.post(f"{BASE}/v1/collections/{id}/assets", headers=headers,
    json={"assetIds": ["019a…", "019b…"]})
await fetch(`${BASE}/v1/collections/${id}/assets`, { method: "POST",
  headers: { ...headers, "Content-Type": "application/json" },
  body: JSON.stringify({ assetIds: ["019a…", "019b…"] }) });
response · 200
{ "success": true, "data": { "id": "019…" } }

Remove assets

POST/v1/collections/{id}/assets/remove

Body { assetIds } — a string array. Removes those assets from the collection; the assets themselves are not deleted.

request
curl -X POST https://api.picoberry.ai/v1/collections/019…/assets/remove \
  -H "Authorization: Bearer pb_live_xxx" -H "Content-Type: application/json" \
  -d '{"assetIds":["019a…"]}'

Rename

PATCH/v1/collections/{id}

Body { name } — the new name, 1–255 characters.

request
curl -X PATCH https://api.picoberry.ai/v1/collections/019… \
  -H "Authorization: Bearer pb_live_xxx" -H "Content-Type: application/json" \
  -d '{"name":"Boss Props"}'

Delete

DELETE/v1/collections/{id}

Deletes the collection. Assets that were in it are not deleted — they stay in your library.

request
curl -X DELETE https://api.picoberry.ai/v1/collections/019… \
  -H "Authorization: Bearer pb_live_xxx"
Everything is scoped to your key You can only see and modify collections and assets your API key owns; anything else returns 404. See Errors.