Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.theswarm.com/llms.txt

Use this file to discover all available pages before exploring further.

Use this endpoint to retrieve your team’s current billing period credit usage. The API identifies your team from the API key, fetches the meter usage for the active billing period, and returns the number of credits already consumed.

Endpoint

To use it, send a GET request to:
​GET https://bee.theswarm.com/credits/usage/

Authentication

Pass your API key in the x-api-key header.
HeaderValueDescription
x-api-keyYour team’s API key.

Query parameters

None.

Response

A successful request returns 200 OK with the following body:
"usage": 2255235
FieldTypeDescription
usageintegerNumber of credits already consumed in the current billing period

Errors

If authentication fails or usage cannot be retrieved, the endpoint returns the corresponding error status. See Errors for details.\

Example request

bash cURL curl -X GET "https://bee.theswarm.com/credits/usage/" \ -H "x-api-key: <your_api_key>" ​