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.Endpoint Information
- URL:
/v1/usage/costs - Method:
GET - Authentication: Required (
x-api-keyheader) - Rate Limiting: Subject to tier-based rate limits
Query Parameters
None. This endpoint always returns the current pricing model in effect.Code Examples
- Python
- TypeScript
- cURL
Response Schema
PricingDetailsOutput Object
usage_pricing Object
Example Response
Error Responses
Related Endpoints
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.Related
- Get Credit Balance — check your current credit balance
- Pricing Details — see per-operation costs
- Rate Limits — check rate limit status