Link Search Menu Expand Document

Checking account usage

You have two options for checking your current usage via the API


Usage headers

Whenever you create an image, we return your current usage in the response headers.

  • x-renders-allowed: the total allowed for the current billing period.
  • x-renders-consumed: the number used by the created image.
  • x-renders-used: the total number used this period.

Usage endpoint

  get https://hcti.io/v1/usage

To check your account usage, you can make a request to the usage endpoint. It will return the total images created for your account rolled up into different time periods.

Example response

STATUS: 200 OK
{
  "data": {
    "hour": {
      "2021-11-14T14:00:00Z": 54,
      "2021-11-14T15:00:00Z": 56,
      "2021-11-14T16:00:00Z": 56,
      "2021-11-14T17:00:00Z": 57,
      "2021-11-14T18:00:00Z": 59,
      "2021-11-14T19:00:00Z": 55,
      "2021-11-14T20:00:00Z": 58,
      "2021-11-14T21:00:00Z": 54,
      "2021-11-14T22:00:00Z": 57,
      "2021-11-14T23:00:00Z": 57,
      "2021-11-15T00:00:00Z": 60,
      "2021-11-15T01:00:00Z": 56,
      "2021-11-15T02:00:00Z": 56,
      "2021-11-15T03:00:00Z": 55,
      "2021-11-15T04:00:00Z": 57,
      "2021-11-15T05:00:00Z": 55,
      "2021-11-15T06:00:00Z": 55,
      "2021-11-15T07:00:00Z": 56,
      "2021-11-15T08:00:00Z": 55,
      "2021-11-15T09:00:00Z": 60,
      "2021-11-15T10:00:00Z": 62,
      "2021-11-15T11:00:00Z": 60,
      "2021-11-15T12:00:00Z": 62,
      "2021-11-15T13:00:00Z": 62,
      "2021-11-15T14:00:00Z": 62,
      "2021-11-15T15:00:00Z": 61,
      "2021-11-15T16:00:00Z": 61,
      "2021-11-15T17:00:00Z": 60,
      "2021-11-15T18:00:00Z": 61,
      "2021-11-15T19:00:00Z": 64,
      "2021-11-15T20:00:00Z": 61,
      "2021-11-15T21:00:00Z": 61,
      "2021-11-15T22:00:00Z": 62,
      "2021-11-15T23:00:00Z": 63,
      "2021-11-16T00:00:00Z": 62,
      "2021-11-16T01:00:00Z": 62,
      "2021-11-16T02:00:00Z": 60,
      "2021-11-16T03:00:00Z": 60,
      "2021-11-16T04:00:00Z": 62,
      "2021-11-16T05:00:00Z": 53,
      "2021-11-16T06:00:00Z": 60,
      "2021-11-16T07:00:00Z": 60,
      "2021-11-16T08:00:00Z": 60,
      "2021-11-16T09:00:00Z": 60,
      "2021-11-16T10:00:00Z": 60,
      "2021-11-16T11:00:00Z": 60,
      "2021-11-16T12:00:00Z": 68,
      "2021-11-16T13:00:00Z": 62,
      "2021-11-16T14:00:00Z": 61,
      "2021-11-16T15:00:00Z": 60,
      "2021-11-16T16:00:00Z": 60,
      "2021-11-16T17:00:00Z": 65,
      "2021-11-16T18:00:00Z": 63,
      "2021-11-16T19:00:00Z": 60,
      "2021-11-16T20:00:00Z": 60,
      "2021-11-16T21:00:00Z": 60,
      "2021-11-16T22:00:00Z": 62,
      "2021-11-16T23:00:00Z": 61,
      "2021-11-17T00:00:00Z": 60,
      "2021-11-17T01:00:00Z": 60,
      "2021-11-17T02:00:00Z": 65,
      "2021-11-17T03:00:00Z": 63,
      "2021-11-17T04:00:00Z": 62,
      "2021-11-17T05:00:00Z": 63,
      "2021-11-17T06:00:00Z": 63,
      "2021-11-17T07:00:00Z": 64,
      "2021-11-17T08:00:00Z": 63,
      "2021-11-17T09:00:00Z": 64,
      "2021-11-17T10:00:00Z": 60,
      "2021-11-17T11:00:00Z": 61,
      "2021-11-17T12:00:00Z": 61,
      "2021-11-17T13:00:00Z": 29
    },
    "day": {
      "2021-09-19T00:00:00Z": 1569,
      "2021-09-20T00:00:00Z": 1722,
      "2021-09-21T00:00:00Z": 1604,
      "2021-09-22T00:00:00Z": 1560,
      "2021-09-23T00:00:00Z": 1571,
      "2021-09-24T00:00:00Z": 1627,
      "2021-09-25T00:00:00Z": 1660,
      "2021-09-26T00:00:00Z": 1527,
      "2021-09-27T00:00:00Z": 1588,
      "2021-09-28T00:00:00Z": 1549,
      "2021-09-29T00:00:00Z": 1523,
      "2021-09-30T00:00:00Z": 1662,
      "2021-10-01T00:00:00Z": 1556,
      "2021-10-02T00:00:00Z": 1585,
      "2021-10-03T00:00:00Z": 1539,
      "2021-10-04T00:00:00Z": 1556,
      "2021-10-05T00:00:00Z": 1487,
      "2021-10-06T00:00:00Z": 1580,
      "2021-10-07T00:00:00Z": 1498,
      "2021-10-08T00:00:00Z": 1485,
      "2021-10-09T00:00:00Z": 1474,
      "2021-10-10T00:00:00Z": 1487,
      "2021-10-11T00:00:00Z": 1513,
      "2021-10-12T00:00:00Z": 1477,
      "2021-10-13T00:00:00Z": 1464,
      "2021-10-14T00:00:00Z": 1458,
      "2021-10-15T00:00:00Z": 1452,
      "2021-10-16T00:00:00Z": 1477,
      "2021-10-17T00:00:00Z": 1471,
      "2021-10-18T00:00:00Z": 1482,
      "2021-10-19T00:00:00Z": 1499,
      "2021-10-20T00:00:00Z": 1504,
      "2021-10-21T00:00:00Z": 1530,
      "2021-10-22T00:00:00Z": 1502,
      "2021-10-23T00:00:00Z": 1501,
      "2021-10-24T00:00:00Z": 1486,
      "2021-10-25T00:00:00Z": 1475,
      "2021-10-26T00:00:00Z": 1469,
      "2021-10-27T00:00:00Z": 1460,
      "2021-10-28T00:00:00Z": 1451,
      "2021-10-29T00:00:00Z": 1443,
      "2021-10-30T00:00:00Z": 1447,
      "2021-10-31T00:00:00Z": 1443,
      "2021-11-01T00:00:00Z": 1455,
      "2021-11-02T00:00:00Z": 1473,
      "2021-11-03T00:00:00Z": 1482,
      "2021-11-04T00:00:00Z": 1463,
      "2021-11-05T00:00:00Z": 1472,
      "2021-11-06T00:00:00Z": 1452,
      "2021-11-07T00:00:00Z": 1469,
      "2021-11-08T00:00:00Z": 1478,
      "2021-11-09T00:00:00Z": 1494,
      "2021-11-10T00:00:00Z": 1469,
      "2021-11-11T00:00:00Z": 1471,
      "2021-11-12T00:00:00Z": 1465,
      "2021-11-13T00:00:00Z": 1462,
      "2021-11-14T00:00:00Z": 1336,
      "2021-11-15T00:00:00Z": 1427,
      "2021-11-16T00:00:00Z": 1461,
      "2021-11-17T00:00:00Z": 838
    },
    "month": {
      "2020-12-01T00:00:00Z": 44847,
      "2021-01-01T00:00:00Z": 44973,
      "2021-02-01T00:00:00Z": 43263,
      "2021-03-01T00:00:00Z": 59095,
      "2021-04-01T00:00:00Z": 56422,
      "2021-05-01T00:00:00Z": 50747,
      "2021-06-01T00:00:00Z": 46309,
      "2021-07-01T00:00:00Z": 46777,
      "2021-08-01T00:00:00Z": 48160,
      "2021-09-01T00:00:00Z": 47341,
      "2021-10-01T00:00:00Z": 46251,
      "2021-11-01T00:00:00Z": 24167
    }
  },
  "per_billing_period": [
    {
      "total_images": 439,
      "start": "2018-11-02T22:57:29.015Z",
      "end": "2018-12-02T22:57:29.015Z"
    },
    {
      "total_images": 3744,
      "start": "2018-12-02T22:57:29.015Z",
      "end": "2019-01-01T22:57:29.015Z"
    },
    {
      "total_images": 595,
      "start": "2019-01-01T22:57:29.015Z",
      "end": "2019-01-31T22:57:29.015Z"
    },
    {
      "total_images": 123570,
      "start": "2019-01-31T22:57:29.015Z",
      "end": "2019-03-02T22:57:29.015Z"
    },
    {
      "total_images": 55398,
      "start": "2019-03-02T22:57:29.015Z",
      "end": "2019-04-01T22:57:29.015Z"
    },
    {
      "total_images": 40935,
      "start": "2019-04-01T22:57:29.015Z",
      "end": "2019-05-01T22:57:29.015Z"
    }
  ]
}

Back to top

Built with extensive integration tests and serious care for developer happiness.
© 2018-2024 Code Happy, LLC.

Page last modified: Apr 9 2024 at 11:04 PM.

Edit this page on GitHub.