Docs
list_credit_ledger
List the account's credit history, newest first: grants (sign-up and monthly allowance), top-ups, spends on AI actions (with what they were for), refunds of failed AI actions, and staff adjustments. The balance is always the sum of these entries. Pass `cursor` from the previous page to see older entries.
List the account's credit history, newest first: grants (sign-up and monthly allowance), top-ups, spends on AI actions (with what they were for), refunds of failed AI actions, and staff adjustments. The balance is always the sum of these entries. Pass cursor from the previous page to see older entries.
Access and cost
- Kind: query
- Scope: account
- Actors: member, agent
- Credits: Free
- Requires confirmation: false
- Accepts idempotency key: false
Input schema
{
"properties": {
"limit": {
"default": 50,
"maximum": 200,
"minimum": 1,
"type": "integer"
},
"cursor": {
"pattern": "^(\\d{4}-\\d{2}-\\d{2}T[^|]+)\\|([0-9a-f-]{36})$",
"type": "string"
},
"accountId": {
"format": "uuid",
"type": "string"
}
},
"type": "object"
}Output schema
{
"additionalProperties": false,
"properties": {
"accountId": {
"format": "uuid",
"type": "string"
},
"balance": {
"type": "integer"
},
"entries": {
"items": {
"additionalProperties": false,
"properties": {
"id": {
"format": "uuid",
"type": "string"
},
"accountId": {
"format": "uuid",
"type": "string"
},
"kind": {
"enum": [
"grant",
"spend",
"refund",
"topup",
"adjustment"
],
"type": "string"
},
"amount": {
"type": "integer"
},
"reason": {
"type": "string"
},
"idempotencyKey": {
"type": "string"
},
"refersToEntryId": {
"anyOf": [
{
"format": "uuid",
"type": "string"
},
{
"type": "null"
}
]
},
"workspaceId": {
"anyOf": [
{
"format": "uuid",
"type": "string"
},
{
"type": "null"
}
]
},
"metadata": {
"type": "object"
},
"createdByAccountId": {
"anyOf": [
{
"format": "uuid",
"type": "string"
},
{
"type": "null"
}
]
},
"createdByAgentClientId": {
"anyOf": [
{
"format": "uuid",
"type": "string"
},
{
"type": "null"
}
]
},
"createdAt": {
"format": "date-time",
"type": "string"
}
},
"required": [
"id",
"accountId",
"kind",
"amount",
"reason",
"idempotencyKey",
"refersToEntryId",
"workspaceId",
"metadata",
"createdByAccountId",
"createdByAgentClientId",
"createdAt"
],
"type": "object"
},
"type": "array"
},
"nextCursor": {
"type": [
"string",
"null"
]
}
},
"required": [
"accountId",
"balance",
"entries",
"nextCursor"
],
"type": "object"
}Errors
[]Annotations
{
"destructiveHint": false,
"idempotentHint": true,
"openWorldHint": false,
"readOnlyHint": true,
"title": "List credit history"
}