Skip to main content
There is no dedicated endpoint that returns a historical, day-by-day breakdown of your spend. Instead, the Swarms API exposes three complementary pieces: the current pricing model (/v1/usage/costs), your raw request logs (/v1/account/logs), and an at-a-glance metrics summary (/v1/account/metrics/summary). Combine these client-side for a custom usage report — see each section 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


Request Logs

GET /v1/account/logs returns your account’s full API request history — every logged request across all of your API keys (including revoked ones), excluding client IP information.
GET /v1/swarm/logs is a deprecated alias for the same endpoint, kept only for backwards compatibility. Use /v1/account/logs in new integrations.

SwarmLogsOutput Object


Metrics Summary

GET /v1/account/metrics/summary returns an at-a-glance overview of your core usage metrics across all of your API keys.
GET /v1/metrics/summary is a deprecated alias for the same endpoint, kept only for backwards compatibility. Use /v1/account/metrics/summary in new integrations.

MetricsSummaryOutput Object


For other account-level usage and spend tracking, 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.