Skip to main content

Base URL

https://costhawk.ai/api

Authentication

All API requests require an access token in the Authorization header:
Authorization: Bearer ch_sk_your_token_here
Get your token from Settings → Developer in your CostHawk dashboard.

Response Format

All responses are JSON:
{
  "data": { ... },
  "error": null
}
Error responses:
{
  "data": null,
  "error": "Error message here"
}

Rate Limits

PlanRequests/minute
Free60
Pro300
Teams1000
Rate limit headers are included in every response:
  • X-RateLimit-Limit
  • X-RateLimit-Remaining
  • X-RateLimit-Reset

Endpoints

Usage

MethodEndpointDescription
GET/mcp/usage/summaryGet usage summary
GET/mcp/usage/by-tagGet usage by tag

Savings

MethodEndpointDescription
GET/mcp/savingsGet savings summary
GET/mcp/savings/breakdownPer-model breakdown
GET/mcp/subscriptionsList subscriptions

Monitoring

MethodEndpointDescription
GET/mcp/anomaliesDetect anomalies
GET/mcp/alertsList alerts

Webhooks

MethodEndpointDescription
GET/mcp/webhooksList webhooks
POST/mcp/webhooksCreate webhook

Pricing

MethodEndpointDescription
GET/mcp/pricingGet model pricing