Yapper API
Api reference
GET
/usage/agent

The in-app agent's usage for the current billing period: the included allowance shared by every chat, pay-as-you-go credits charged after it ran out, and the split by agent model. Matches the Agent Usage card on the account usage page.

Authorization

bearerAuth usage:read
AuthorizationBearer <token>

In: header

Scope: usage:read

Response Body

application/json

application/json

application/json

application/json

curl -X GET "https://example.com/usage/agent"
{  "period": {    "start": "2019-08-24T14:15:22Z",    "end": "2019-08-24T14:15:22Z",    "source": "subscription"  },  "included": {    "allowanceCredits": 0,    "usedCredits": 0,    "remainingCredits": 0  },  "payAsYouGo": {    "enabled": true,    "creditsUsed": 0  },  "models": [    {      "id": "string",      "label": "string",      "included": true,      "includedCredits": 0,      "payAsYouGoCredits": 0,      "billedCredits": 0    }  ]}
{  "error": {    "code": "string",    "message": "string",    "requestId": "string"  }}
{  "error": {    "code": "string",    "message": "string",    "requestId": "string"  }}
{  "error": {    "code": "string",    "message": "string",    "requestId": "string"  }}