Core
Identity, workspaces, and credits. The first calls every agent makes.
get_me
READREST: GET /api/v2/me
Who am I, which workspace did this read resolve to, and what does my credential allow. Call this first. credential.defaultWorkspaceId is immutable for the connection. credential.workspaceScope "all" means every workspace you can currently access (grantedWorkspaceIds stays empty); "listed" pins the credential to exactly grantedWorkspaceIds. Reads may omit workspace and use the connection default; every workspace-scoped write must pass workspace explicitly.
No input. Call with no arguments.
{
"success": true,
"data": {
"apiVersion": "3.0.1",
"user": {
"id": "64f1c2a1b2c3d4e5f6071829",
"email": "[email protected]",
"name": "Kshitij Dhyani",
"plan": "pro",
"team": {
"id": "64f1c2a1b2c3d4e5f6071830",
"role": "owner"
}
},
"workspace": {
"id": "6a18c36ee586c7e44e4ece67",
"name": "Client A",
"slug": "client-a",
"isDefault": true
},
"credential": {
"tokenPrefix": "gfa_live_9x3k",
"kind": "oauth",
"scopes": [
"read",
"spend"
],
"workspaceScope": "listed",
"grantedWorkspaceIds": [
"6a18c36ee586c7e44e4ece67",
"6a18c36ee586c7e44e4ece68"
],
"defaultWorkspaceId": "6a18c36ee586c7e44e4ece67",
"expiresAt": "2026-10-18T12:00:00.000Z"
}
}
}list_workspaces
READREST: GET /api/v2/workspaces
List the live workspaces this credential can act in, its immutable defaultWorkspaceId, and the workspace resolved for this request. Each has an id, name, and stable slug. Pass the slug or id as workspace on every write; the slug appears in dashboardUrl links.
No input. Call with no arguments.
{
"success": true,
"data": {
"resolvedWorkspaceId": "6a18c36ee586c7e44e4ece67",
"defaultWorkspaceId": "6a18c36ee586c7e44e4ece67",
"workspaces": [
{
"id": "6a18c36ee586c7e44e4ece67",
"name": "Client A",
"slug": "client-a",
"isDefault": true
},
{
"id": "6a18c36ee586c7e44e4ece68",
"name": "Client B",
"slug": "client-b",
"isDefault": false
}
]
}
}get_credits
READREST: GET /api/v2/credits
Current spendable credit balance for this account. On a team plan this is a live shared pool that teammates and their agents also draw from, so it can change between your calls; use list_transactions to attribute movements.
No input. Call with no arguments.
{
"success": true,
"data": {
"credits": 47,
"scope": "team"
}
}list_transactions
READREST: GET /api/v2/transactions
The credit ledger behind get_credits, newest first: every charge, grant, and refund that moved the balance. Negative amount = spend. Entries made through the agent API carry attribution (which credential and client). On a shared team balance, pass mine: true to reconcile exactly what this credential spent.
{
"type": "object",
"properties": {
"page": {
"description": "Page number (default 1).",
"type": "integer",
"minimum": 1,
"maximum": 9007199254740991
},
"limit": {
"description": "Per page (default 20, max 100).",
"type": "integer",
"minimum": 1,
"maximum": 100
},
"mine": {
"description": "Only entries this credential created (its charges and refunds). Default false: the whole balance ledger.",
"type": "boolean"
}
},
"$schema": "http://json-schema.org/draft-07/schema#"
}{
"success": true,
"data": {
"transactions": [
{
"id": "64f1c2a1b2c3d4e5f6071900",
"type": "image_generation",
"amount": -2,
"balanceAfter": 47,
"createdAt": "2026-07-18T11:45:00.000Z",
"workspaceId": "6a18c36ee586c7e44e4ece67",
"feature": "agent_create_avatar",
"model": "gemini_flash",
"count": 2,
"agent": {
"credentialId": "64f1c2a1b2c3d4e5f6071901",
"client": "Claude Code"
}
},
{
"id": "64f1c2a1b2c3d4e5f6071902",
"type": "refund",
"amount": 1,
"balanceAfter": 48,
"createdAt": "2026-07-18T10:10:00.000Z",
"reason": "Only 1 of 2 avatar images were generated"
}
],
"total": 134,
"page": 1,
"pages": 7,
"scope": "team",
"nextSteps": "This ledger covers the whole shared team pool, so entries from teammates and other agents appear too. Pass mine: true to see only what this credential spent."
}
}