Skip to main content
There is no dedicated endpoint that returns a historical, day-by-day breakdown of your spend. The Swarms API exposes the current pricing model via /v1/usage/costs, plus a handful of related endpoints for checking your balance and activity — see Related Endpoints below.
The Usage endpoint returns the unified pricing model the API uses to calculate costs for every operation (token costs, agent costs, search/scrape costs, and the night-time discount). Use it to compute expected costs before you run a request, or to keep your own cost estimates in sync with the live pricing.

Endpoint Information

  • URL: /v1/usage/costs
  • Method: GET
  • Authentication: Required (x-api-key header)
  • Rate Limiting: Subject to tier-based rate limits

Query Parameters

None. This endpoint always returns the current pricing model in effect.

Code Examples


Response Schema

PricingDetailsOutput Object

usage_pricing Object

Example Response


Error Responses


For actual usage and spend tracking (rather than the pricing model itself), use:
Billable completion endpoints require your total_credits balance to be above $1.00. This is checked before the request runs — if the balance is at or below the minimum, the API returns a 402 Payment Required error without doing any work. Use GET /v1/account/credits to monitor your balance.