Retrieve usage

get/v1/usage

The organization's plan and what it has used this billing period, for every endpoint the plan includes, grouped and named as on the dashboard's usage page. Calls to this endpoint count too.

quota and share are null for an endpoint with no monthly limit. Endpoints the plan does not include are left out.

Private keyapi.v1.usage.retrieveNo demo

Response

200The plan, the period, and the use of each endpoint.
objectrequired

The plan the organization is on.

namestringnullable

The plan's name, or null when it has none.

objectrequired

The billing period the counts are for.

startstring (date-time)

When the period began.

endstring (date-time)

When it ends and the counts reset.

array<object>required

Endpoints grouped as on the usage page. A group with nothing in the plan is left out.

keystring

The group: assistant, catalogue, organization, or other.

titlestring

The group's name.

captionstring

What the group covers.

array<object>

Each endpoint in the group.

Errors

21

Every error is JSON with a single error string unless noted. Match on the status code; the message is for humans.

404
This organization does not have an active subscription.

The organization has no active plan.

404
No usage found for this billing period.

The plan has no usage record for the current period yet, which happens briefly at renewal.

curl -X GET "https://stylor.ai/api/v1/usage" \
  -H "Authorization: Bearer $STYLOR_API_KEY"
Response · 200
{
  "plan": {
    "name": "Pro"
  },
  "period": {
    "start": "2026-09-14T00:00:00.000Z",
    "end": "2026-10-14T00:00:00.000Z"
  },
  "usage": [
    {
      "key": "assistant",
      "title": "Shopping assistant",
      "caption": "What shoppers use on your store.",
      "items": [
        {
          "path": "v2.agent.chat",
          "label": "Chat messages",
          "unlimited": false,
          "quota": 2000,
          "used": 412,
          "share": 0.206
        }
      ]
    }
  ]
}