Billing

Get credit usage summary

Returns the total number of credits used between start_date and end_date, with a breakdown by job type and time bucket (day, week, or month).

GET
/billing/credits
AuthorizationBearer <token>

Token-based authentication using access tokens.

In: header

Query Parameters

start_date?Start Date

Starting datetime (UTC) in ISO 8601 format.

end_date?End Date

Ending datetime (UTC) in ISO 8601 format.

resolution?Resolution

Time resolution for credit aggregation.

Default"day"
Value in"day" | "week" | "month"

Response Body

Examples

curl -X GET "https://v2.api.piktid.com/billing/credits?start_date=string&end_date=string&resolution=day"
{
  "total_credits": 0,
  "summary": [
    {
      "period_start": "string",
      "period_end": "string",
      "job_type": "string",
      "total_credits": 0,
      "job_count": 0
    }
  ]
}
{
  "error": "Invalid request",
  "detail": [
    {
      "field": null,
      "message": "string",
      "position": "query"
    }
  ]
}
Empty