Skip to main content
POST
/
v1
/
pricing
/
estimate
curl --request POST \
  --url https://api.monk.com/v1/pricing/estimate \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "events": [
    {
      "eventName": "llm_call",
      "idempotencyKey": "run_abc123",
      "properties": {
        "model": "gpt-4o",
        "input_tokens": 1500,
        "output_tokens": 800
      }
    },
    {
      "eventName": "llm_call",
      "idempotencyKey": "run_def456",
      "properties": {
        "model": "claude-sonnet-4-20250514",
        "input_tokens": 2000,
        "output_tokens": 500
      }
    }
  ]
}
'
{
  "events": [
    {
      "idempotencyKey": "run_abc123",
      "totalAmount": 0.035
    },
    {
      "idempotencyKey": "run_def456",
      "totalAmount": 0.015
    }
  ],
  "meters": [
    {
      "meterName": "Input Tokens",
      "meterDisplayName": "Input Tokens",
      "totalQuantity": 3500,
      "totalAmount": 0.02
    },
    {
      "meterName": "Output Tokens",
      "meterDisplayName": "Output Tokens",
      "totalQuantity": 1300,
      "totalAmount": 0.03
    }
  ],
  "totalAmount": 0.05,
  "currency": "USD",
  "unit": "currency",
  "estimatedAt": "2026-02-24T15:30:00Z"
}
Scope: pricing:read Rate Limit: 100 requests per minute per IP (see rate limits) Best Practices:
  • Batch events together (up to 500 per request) instead of making many small requests
  • Cache responses when displaying the same estimate multiple times
  • Use estimatedAt to indicate when the estimate was calculated

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json
events
object[]
required

Events to estimate pricing for. Batch multiple events in a single request for better performance.

Required array length: 1 - 500 elements
creditRateCents
integer

Optional: Cost per credit in cents (e.g., 750 = $7.50/credit). When provided, amounts are returned in credits instead of USD. Uses the same rate semantics as contract creditSettings.creditRateCents.

Required range: x >= 1

Response

Cost estimate with per-meter breakdown

Cost estimate result with per-event and per-meter breakdown. Response shape varies based on whether creditRateCents was provided in the request.

events
object[]

Per-event cost breakdown. Each entry corresponds to an input event. When idempotencyKey was provided on the input event, it is echoed back here for correlation.

meters
object[]

Breakdown of estimated costs per meter. Only meters that matched at least one event are included.

totalAmount
number

Grand total across all meters. In USD when unit=currency, in credits when unit=credits.

currency
enum<string>

Currency code. Only present when unit=currency.

Available options:
USD
creditRateCents
integer

The credit rate used for conversion (cents per credit). Only present when unit=credits.

unit
enum<string>

Unit of the amounts in the response.

Available options:
currency,
credits
estimatedAt
string<date-time>

ISO 8601 timestamp when the estimate was calculated. Use this to indicate freshness when caching.