How many files the Library holds, and what they cost to make
- Credentials
- OAuth access token
- Scopes
store:read
The two numbers at the top of the Library screen.
Access: OAuth scope store:read; not write-gated.
merchantOAuth store:readAuthorizationBearer <token>OAuth 2.1 (authorization code + PKCE S256, public clients, dynamic registration) for connected AI apps. Effective power is scopes granted AND the person's role today AND the plan. orders:refund, billing:write and team:write are opt-in on the consent screen. Write implies read for marketing:read and messages:read, so a grant holding marketing:write passes a marketing:read check, and messages:send passes messages:read.
Scope: store:read
storeId*stringA store the person can reach. Any other id answers 404, never 403.
OK
application/json- response
data*curl -X GET 'https://api.shopeazy.co/v1/merchant/stores/<storeId>/library/stats' \ -H 'Authorization: Bearer <access_token>'{ "data": { "count": 2, "credits": 0 }}Note that Library files are shown on a product POST
Advisory bookkeeping: it fills `usedIn` on `listLibrary` so deleting a file can warn first. A product's photos are an embedded list, not a link, so nothing enforces it. Marking the same pair twice changes nothing, so a retry is safe. Files that are gone are skipped; a listing that does not exist is 404 `not_found`. Access: OAuth scope `listings:write`; not write-gated.
A caption about this picture, in the shop's voice POST
Looks at the photo (or a video's cover) and the listing it was made for and writes one Instagram/Facebook caption in the store's brand voice. Free: it spends no credits, but is capped at 40 a day per business (429 `rate_limited`, shared response; nothing is counted when it fails). 422 `validation_error` for a file that is gone or a sound, 403 `ai_not_configured` where AI is off. It saves nothing: `sendLibraryAssetToPromote` makes the draft. Access: OAuth scope `marketing:write`; not write-gated.