post /v2/credits/usage

Get credit usage per endpoint

Credits consumed through the public API, broken down by endpoint and aggregated into periods of the chosen granularity. Covers REST public API endpoints only, not MCP tool usage or usage from the Ocean web app. The date range is inclusive of both the start and end days.

Authorizations

apiToken string
x-api-token string

Body application/json

startDate string Required
endDate string
granularity enum Required
"hour""day""week""month"

Responses

200 Successful Response
Credits consumed per endpoint per period, API usage only, ordered by period then by credits consumed.
Array of CreditsUsageItem
periodStart string Required
Start of the period this usage falls in, ISO 8601.
endpoint string Required
The API endpoint that consumed the credits.
credits number Required
Credits consumed by this endpoint during the period.
400 Bad Request
detail string Required
402 Payment Required
detail enum Required
"Insufficient email credits""Some email verifications are already in progress and might use all your remaining email credits. Please try again later.""Insufficient phone credits""Some phone verifications are already in progress and might use all your remaining phone credits. Please try again later.""Insufficient credits"
403 Forbidden
detail enum Required
"API token should be provided in headers or query parameters""Current API token is not registered in our database"
404 Not found
422 Validation Error
Array of ValidationError
Array of string | integer
string | integer
msg string Required
type string Required
input any
object
429 Too Many Requests
detail string Required