API reference
Admin API
Manage a team with an admin key: members and their spend, usage, spend and feature limits, and the team policy, with examples and error codes.
A team's Owner and Admins can do from a script what Settings → Admin does in the app: read who is in the team and what they spent, and set the team's limits and policy.
GET /v1/admin/members members with role, join date and spend
GET /v1/admin/usage the whole team's spend, as GET /v1/usage/summary
GET /v1/admin/spend-limits the team cap, the member default and each member's limit
PUT /v1/admin/spend-limits set or remove one of them
GET /v1/admin/feature-limits limits per feature (video, image, audio, ...)
PUT /v1/admin/feature-limits set or remove one
GET /v1/admin/policies features, models, sharing and key rules
PUT /v1/admin/policies change part of the policy
GET /v1/admin/audit_logs the team's audit logThe audit log has its own page: Audit log API.
The live OpenAPI gives the accurate schemas.
Admin keys
The admin API takes an admin key, and an admin key calls nothing else.
- A team Owner or Admin makes one in the team on Settings → API keys with Access Admin, Admin, read only or Audit log only. A Creator, Viewer or Billing member cannot.
- Admin carries
admin:read,admin:write,audit_logs:read,audit_logs:writeandaccount:read. Admin, read only carriesadmin:read,audit_logs:readandaccount:readand cannot change anything. - Audit log only carries
audit_logs:readandaccount:read. It reads the audit log and nothing else: any other admin route answers it403 insufficient_scope. Make this one for a SIEM. - An admin key made before audit log access existed carries
admin:read,admin:writeandaccount:read(or the read-only pair) and cannot read the audit log. - It cannot generate, spend or read work: any route outside
/v1/adminanswers403 insufficient_scopewithdetails.reason: "admin_key". A leaked admin key cannot run up a bill. - It works for its own team only. There is no team id in the path.
- Every request reads its owner's role again. When they are no longer an
Owner or Admin of the team, the key answers
403 insufficient_roleuntil an Owner makes them Admin again. When they leave the team, the key is revoked. - The team's maximum key lifetime applies to admin keys as to any key.
- A personal workspace has no admin API:
404 team_only.
Members
curl "https://api.sume.com/v1/admin/members" \
-H "Authorization: Bearer $SUME_ADMIN_KEY"{
"object": "list",
"as_of": "2026-11-26T15:00:00.000Z",
"data": [
{
"user_id": "user_2ana",
"name": "Ana Kim",
"email": "ana@example.com",
"role": "creator",
"custom_role_id": null,
"joined_at": "2026-09-02T08:14:00.000Z",
"today_usd": "4.000000",
"last_7_days_usd": "5.500000",
"last_30_days_usd": "31.200000",
"this_month_usd": "22.005000",
"last_active_at": "2026-11-26T09:00:00.000Z",
"by_feature_this_month": { "video": "20.005000", "image": "2.000000" }
}
]
}roleisowner,admin,creator,viewer(shown as Member in the app),billingorcustom(thencustom_role_idnames the role).- Today and this month are UTC calendar windows, the windows of the limits. The last 7 and 30 days count back from now.
- Spend counts charges that are held or settled; a refund gives it back.
- Every amount on the admin API is US dollars as a string with six decimals, the exact micro-dollars, as in the Usage API.
last_active_atis the member's newest usage row in the team, ornull.
Usage
GET /v1/admin/usage takes the query of GET /v1/usage/summary (from,
to, group_by, timezone, date_field, model, member, surface) and
answers the same body, always for the whole team:
curl "https://api.sume.com/v1/admin/usage?from=2026-11-01&to=2026-11-30&group_by=member" \
-H "Authorization: Bearer $SUME_ADMIN_KEY"Spend limits
GET /v1/admin/spend-limits answers what Settings → Members shows:
{
"data": {
"can_manage": true,
"team_cap": {
"limit_usd": "500.000000",
"limit_reset": "monthly",
"enforcement": "block",
"spent_usd": "120.405000",
"resets_at": "2026-12-01T00:00:00.000Z"
},
"member_default": null,
"spent_this_month_usd": "120.405000",
"members": [
{
"user_id": "user_2ana",
"source": "member",
"source_name": null,
"limit": {
"limit_usd": "20.000000",
"limit_reset": "weekly",
"enforcement": "notify",
"spent_usd": "4.000000",
"resets_at": "2026-11-30T00:00:00.000Z"
},
"spent_this_month_usd": "22.005000"
}
],
"alerts": { "enabled": true }
}
}PUT /v1/admin/spend-limits sets or removes one limit and answers the same
body:
curl -X PUT "https://api.sume.com/v1/admin/spend-limits" \
-H "Authorization: Bearer $SUME_ADMIN_KEY" \
-H "Content-Type: application/json" \
-d '{ "subject": "member", "user_id": "user_2ana", "limit_usd": "20.00", "limit_reset": "weekly", "enforcement": "notify" }'| Field | Value |
|---|---|
subject | team (the monthly cap), member_default (each member with no limit of their own) or member |
user_id | the member, with subject: "member" |
limit_usd | US dollars in whole cents, from 0 to 1,000,000, as a decimal string such as "20.00" (a JSON number is taken too); null removes the limit |
limit_reset | daily, weekly or monthly; the team cap is always monthly |
enforcement | block refuses spending past the limit, notify only alerts; left out, a new limit blocks and a change keeps what was set |
Feature limits
A feature limit caps spend on one feature: video, image, audio,
avatar, model3d, agents or gpu, for the whole team (team), for each
member who has none of their own (member_default) or for one member
(member).
{
"data": {
"limits": [
{
"feature": "video",
"subject": "team",
"user_id": null,
"limit_usd": "100.000000",
"limit_reset": "monthly",
"enforcement": "block",
"spend_usd": "40.000000",
"resets_at": "2026-12-01T00:00:00.000Z"
}
],
"can_edit": true
}
}spend_usd is this window's spend on the feature; the member default has
none. PUT /v1/admin/feature-limits takes feature, subject, user_id,
limit_usd, limit_reset and enforcement as above.
Policy
curl -X PUT "https://api.sume.com/v1/admin/policies" \
-H "Authorization: Bearer $SUME_ADMIN_KEY" \
-H "Content-Type: application/json" \
-d '{ "features": { "gpu": false }, "models": { "mode": "deny", "models": ["kling"] } }'The body names only the parts to change. The answer is the whole policy:
{
"data": {
"policy": {
"models": { "mode": "deny", "models": ["kling"], "makers": [] },
"features": { "video": true, "image": true, "audio": true, "avatar": true, "model3d": true, "agents": true, "gpu": false },
"sharing": { "public_links": true, "social_posting": true },
"api_keys": { "max_lifetime_days": null }
},
"can_edit": true,
"makers": [{ "id": "openai", "label": "OpenAI" }],
"recent_models": [{ "model": "seedance-2.5", "feature": "video", "maker": "bytedance", "uses_30d": 12 }],
"updated_at": "2026-11-26T15:00:00.000Z",
"updated_by_user_id": "user_2ada"
}
}- A feature turned off, or a model outside
models, is refused for everyone in the team, Owner and Admins included, from the next request, withfeature_disabledormodel_not_allowed. models.modeisall,allow(only the listed models and makers) ordeny(all but them). A model id also matches its versions:klingmatcheskling-4.recent_modelslists the models the team generated with in the last 30 days, most used first.
Audit log
Every change through the admin API is written to the team's audit log with
the key that made it: spend_limit.changed for a spend or feature limit,
policy.changed for the policy, each with the previous value. A change that
changes nothing is not written. Read the log itself with the
Audit log API.
Limits
GET /v1/admin/usage shares the usage summary's rate budget and
GET /v1/admin/members the usage reports' budget. The other reads use the
read budget and changes the write budget.
Errors
| Status | Code | When |
|---|---|---|
| 400 | invalid_request | A spend limit field is wrong; details.field names it. |
| 400 | invalid_limit | A feature limit field is wrong; details.field names it. |
| 400 | invalid_policy | A policy field is wrong; details.field names it. |
| 403 | insufficient_scope | Not an admin key (details.required_scope: "admin:read"), an Audit log only key outside the audit log, a read-only admin key on a change ("admin:write"), or an admin key outside /v1/admin (details.reason: "admin_key"). |
| 403 | insufficient_role | The key's owner is no longer an Owner or Admin of the team. |
| 404 | team_only | The key belongs to a personal workspace. |
| 404 | member_not_found | user_id is not a member of the team. |
| 503 | admin_api_unavailable | The team's settings cannot be read right now. Retry. |