Sessions with their all-time credit spend, runs and top model. Matches the Sessions card on the account usage page. sort is spend (default, by gross credits spent), runs, or newest. Any key may read session totals. memberId returns only that member's sessions and their share; another member's requires the key's member to be a team owner or admin, and only those keys receive contributors. A deleted session keeps its spend and is returned with deleted: true. Returns usage_breakdown_unavailable (409) until the workspace's usage history has been indexed.
Authorization
bearerAuth usage:readIn: header
Scope: usage:read
Query Parameters
"spend"Value in
- "spend"
- "runs"
- "newest"
1 <= value <= 10020Opaque pagination cursor — pass the nextCursor from the previous page verbatim. nextCursor is null on the last page.
Response Body
application/json
application/json
application/json
application/json
application/json
application/json
curl -X GET "https://example.com/usage/sessions"{ "data": [ { "sessionId": "string", "title": "string", "deleted": true, "createdAt": "2019-08-24T14:15:22Z", "credits": 0, "creditsSpent": 0, "creditsRefunded": 0, "runs": 0, "topModel": { "id": "string", "label": "string" }, "contributors": [ { "userId": "string", "credits": 0, "runs": 0 } ] } ], "nextCursor": "string"}{ "error": { "code": "string", "message": "string", "requestId": "string" }}{ "error": { "code": "string", "message": "string", "requestId": "string" }}{ "error": { "code": "string", "message": "string", "requestId": "string" }}{ "error": { "code": "string", "message": "string", "requestId": "string" }}{ "error": { "code": "string", "message": "string", "requestId": "string" }}List sessions GET
Lists the team's sessions, the workspaces that group generations in the Yapper web app, newest first. Pass query to search titles over the most recent sessions instead; search returns a single page. A newly created session appears in this list within a few seconds; GET /sessions/{sessionId} reads it immediately. Uses the processes:read scope.
List team members GET
Everyone in the team with their name, email, role, and join date, owners first, then admins, then members. Open to every member's key, like the team page in the app. The userId values are the memberIds the usage endpoints take.