Run the monthly AI overage close now (internal)

Add MCP server to your AI tool

Allow AI tools and LLMs to interact with the API documentation portal through MCP.

MCP server URL

https://docs.usehearsay.com/mcp

Standard setup for AI tools providing an mcp.json file

mcp.json
{
  "integrations MCP server": {
    "url": "https://docs.usehearsay.com/mcp"
  }
}

Close
POST /admin/billing/cron/ai-overage-close

Bills organizations on an AI tier for the AI tokens used in yearMonth (default: the current UTC month) above their budget, for every organization or only organizationId, and returns how many organizations were checked and how many overages were billed. Running it again for the same month bills nothing new. Not available in production (403). Super admin only.

application/json

Body Required

  • yearMonth string

    UTC month YYYY-MM (default: current month)

  • organizationId string

    Scope the close to one organization (default: all)

Responses

  • 200 application/json
    Hide response attributes Show response attributes object
    • data object Required
      Hide data attributes Show data attributes object
      • orgsChecked integer
      • overagesBilled integer
    • statusCode number Required
    • timestamp string(date-time) Required
POST /admin/billing/cron/ai-overage-close
curl \
 --request POST 'http://api.example.com/admin/billing/cron/ai-overage-close' \
 --header "Authorization: Bearer $ACCESS_TOKEN" \
 --header "Content-Type: application/json" \
 --data '{
  "yearMonth": "string",
  "organizationId": "string"
}'
Request examples
{
  "yearMonth": "string",
  "organizationId": "string"
}
Response examples (200)
{
  "data": {
    "orgsChecked": 12,
    "overagesBilled": 1
  },
  "statusCode": 200,
  "timestamp": "2026-01-15T10:15:00.000Z"
}