Skip to content
Anlyon
Esc
↑↓navigate↵open⌘Jpreview

Estimate current-month cost

GET/api/v2/billing/cost-estimate
Authorization
AuthorizationBearer token (Anlyon API key) · headerrequired

Workspace API key sent as Authorization: Bearer <key>.

or
better-auth.session_tokenAPI key · cookierequired

Browser session used by dashboard-only operations.

Header parameters
X-Request-Idstring

Optional caller correlation ID. Unsafe or oversized values are replaced.

max length 128
Responses
200

Current-month cost estimate returned in USD.

successbooleanrequired
Allowed:true
dataobjectrequired
Show properties
planstringrequired
Allowed:freepaygoenterpriseproductiongrowth
currentMonthobjectrequired
Show properties
messagesUsedintegerrequired
min 0
bandwidthUsedstringrequired

Human-readable byte count.

estimatedCostnumberrequired
min 0
currencystringrequired
Allowed:USD
breakdownobjectrequired
Show properties
baseFeenumberrequired
min 0
messageCostnumberrequired
min 0
bandwidthCostnumberrequired
min 0
perMessageRatenumberrequired
min 0
perGBRatenumberrequired
min 0
401

Unauthorized - Invalid or missing API key

successbooleanrequired
requestIdstringrequired

Correlation ID matching the X-Request-Id response header.

errorobjectrequired
Show properties
codestring
messagestring
detailsobject
403

Authenticated credential lacks the required scope or workspace access.

successbooleanrequired
requestIdstringrequired

Correlation ID matching the X-Request-Id response header.

errorobjectrequired
Show properties
codestring
messagestring
detailsobject
404

Not Found - Resource does not exist

successbooleanrequired
requestIdstringrequired

Correlation ID matching the X-Request-Id response header.

errorobjectrequired
Show properties
codestring
messagestring
detailsobject
429

Too Many Requests - Rate limit exceeded

successbooleanrequired
requestIdstringrequired

Correlation ID matching the X-Request-Id response header.

errorobjectrequired
Show properties
codestring
messagestring
detailsobject
Try it
Server
Authorization
Parameters
Request
curl -X GET 'https://api.anlyon.com/api/v2/billing/cost-estimate' \
  -H 'Authorization: Bearer YOUR_TOKEN'
Response
{
  "success": true,
  "data": {
    "plan": "free",
    "currentMonth": {
      "messagesUsed": 0,
      "bandwidthUsed": "string",
      "estimatedCost": 0,
      "currency": "USD"
    },
    "breakdown": {
      "baseFee": 0,
      "messageCost": 0,
      "bandwidthCost": 0,
      "perMessageRate": 0,
      "perGBRate": 0
    }
  }
}