Skip to Content

Usage by kind and day

Needs the scope account:read

Usage by kind and by day for a period. Everything is counted, whether it was ordered through the API, an agent or your CharpstAR account.

Query Parameters

from?string

First day, YYYY-MM-DD. Default: the start of the current period.

Formatdate
to?string

Last day, YYYY-MM-DD. Default: today.

Formatdate

Response Body

OK

application/json
  1. response
from*string

The first day counted (UTC).

Formatdate
to*string

The last day counted (UTC), included.

Formatdate
totals*array<>

Every kind, 0 included.

byDay*array<>

Days with usage only, oldest first.

Example Request
curl -sS "https://platform.charpstar.co/api/v1/usage?from=2026-10-01&to=2026-10-31" \  -H "Authorization: Bearer $CHARPSTAR_API_KEY"
Example Response
{  "from": "2026-10-01",  "to": "2026-10-02",  "totals": [    {      "kind": "model_ordered",      "count": 14    },    {      "kind": "model_delivered",      "count": 9    },    {      "kind": "model_replaced",      "count": 0    },    {      "kind": "packshot",      "count": 48    },    {      "kind": "scene",      "count": 3    },    {      "kind": "edit",      "count": 0    },    {      "kind": "video",      "count": 1    },    {      "kind": "export",      "count": 2    }  ],  "byDay": [    {      "date": "2026-10-01",      "kind": "model_ordered",      "count": 12    },    {      "date": "2026-10-01",      "kind": "packshot",      "count": 48    },    {      "date": "2026-10-01",      "kind": "scene",      "count": 3    },    {      "date": "2026-10-02",      "kind": "model_delivered",      "count": 9    },    {      "date": "2026-10-02",      "kind": "model_ordered",      "count": 2    },    {      "date": "2026-10-02",      "kind": "video",      "count": 1    },    {      "date": "2026-10-02",      "kind": "export",      "count": 2    }  ]}