Skip to Content
webagent docs
API reference

Billing

Plan, usage and credits of the organization.

Open as .md

Audit log (admin)

GET
/v1/audit

Authorization

headerAuthorizationBearer <token>

An API key (wa_<region>_…) or a dashboard access token.

Query Parameters

target?string
Lengthlength <= 200
action?string
Lengthlength <= 100
limit?integer
Range1 <= value <= 500
Default100
before?integer
Range0 < value <= 9007199254740991

Response Body

OK

application/json
  1. response
events*array<>
next?integer
Range-9007199254740991 <= value <= 9007199254740991
Example Request
curl -X GET 'https://api.us.webagent.lookover.ai/v1/audit'
Example Response
{  "events": [    {      "seq": -9007199254740991,      "actor": "string",      "action": "string",      "target": "string",      "detail": null,      "at": -9007199254740991    }  ],  "next": -9007199254740991}
GET
/v1/billing

Authorization

headerAuthorizationBearer <token>

An API key (wa_<region>_…) or a dashboard access token.

Response Body

OK

application/json
  1. response
priceTable*string
prices?
monthToDate*
budget*
alerts*array<>
daily*array<>
stripe*
Example Request
curl -X GET 'https://api.us.webagent.lookover.ai/v1/billing'
Example Response
{  "priceTable": "string",  "prices": {    "property1": 0,    "property2": 0  },  "monthToDate": {    "priceMicros": -9007199254740991,    "byKind": {      "property1": -9007199254740991,      "property2": -9007199254740991    }  },  "budget": {    "budgetMicros": 0,    "spentMicros": -9007199254740991,    "ratio": 0,    "hardCap": true,    "blocked": true  },  "alerts": [    {      "id": "string",      "kind": "string",      "period": "string",      "message": "string",      "at": -9007199254740991    }  ],  "daily": [    {      "day": "string",      "kind": "string",      "rows": 0,      "units": -9007199254740991,      "priceMicros": -9007199254740991,      "reportedAt": -9007199254740991    }  ],  "stripe": {    "configured": true,    "customer": "string"  }}
GET
/v1/decisions/stats

Agent decisions in the window and how many the action cache replayed (decisions = cache hits + model calls)

Authorization

headerAuthorizationBearer <token>

An API key (wa_<region>_…) or a dashboard access token.

Query Parameters

sinceMs?integer
Range0 <= value <= 9007199254740991

Response Body

OK

application/json
  1. response
sinceMs*integer
Range0 <= value <= 9007199254740991
decisions*integer
Range0 <= value <= 9007199254740991
cacheHits*integer
Range0 <= value <= 9007199254740991
hitRate*number
Range0 <= value <= 1
savedMicros*integer
Range0 <= value <= 9007199254740991
daily*array<>
Example Request
curl -X GET 'https://api.us.webagent.lookover.ai/v1/decisions/stats'
Example Response
{  "sinceMs": 0,  "decisions": 0,  "cacheHits": 0,  "hitRate": 0,  "savedMicros": 0,  "daily": [    {      "day": "string",      "decisions": 0,      "cacheHits": 0    }  ]}

Usage totals by kind

GET
/v1/usage

Authorization

headerAuthorizationBearer <token>

An API key (wa_<region>_…) or a dashboard access token.

Query Parameters

sinceMs?integer
Range0 <= value <= 9007199254740991

Response Body

OK

application/json
  1. response
rows*integer
Range0 <= value <= 9007199254740991
units*integer
Range-9007199254740991 <= value <= 9007199254740991
priceMicros*integer
Range-9007199254740991 <= value <= 9007199254740991
byKind*
byEngine*
Example Request
curl -X GET 'https://api.us.webagent.lookover.ai/v1/usage'
Example Response
{  "rows": 0,  "units": -9007199254740991,  "priceMicros": -9007199254740991,  "byKind": {    "property1": {      "rows": 0,      "priceMicros": -9007199254740991    },    "property2": {      "rows": 0,      "priceMicros": -9007199254740991    }  },  "byEngine": {    "property1": {      "rows": 0,      "priceMicros": -9007199254740991    },    "property2": {      "rows": 0,      "priceMicros": -9007199254740991    }  }}
GET
/v1/usage/ai-spend

Model spend in the window (default last 30 days), per UTC day and per model

Authorization

headerAuthorizationBearer <token>

An API key (wa_<region>_…) or a dashboard access token.

Query Parameters

sinceMs?integer
Range0 <= value <= 9007199254740991

Response Body

OK

application/json
  1. response
sinceMs*integer
Range0 <= value <= 9007199254740991
totalMicros*integer
Range0 <= value <= 9007199254740991
calls*integer
Range0 <= value <= 9007199254740991
daily*array<>
byModel*
Example Request
curl -X GET 'https://api.us.webagent.lookover.ai/v1/usage/ai-spend'
Example Response
{  "sinceMs": 0,  "totalMicros": 0,  "calls": 0,  "daily": [    {      "day": "string",      "calls": 0,      "costMicros": 0    }  ],  "byModel": {    "property1": {      "calls": 0,      "costMicros": 0    },    "property2": {      "calls": 0,      "costMicros": 0    }  }}