Link Search Menu Expand Document

Monitoring API Usage

Two simple ways to track your image generation usage


Table of contents


Automated Usage Alerts

We automatically send email notifications when your account reaches usage thresholds:

  • At 80% of your monthly limit
  • At 100% of your monthly limit

Response Headers

The simplest way to monitor usage is through the response headers returned with each image creation. These headers provide real-time usage information:

Header Description
x-renders-allowed Your total image allowance for the current billing period
x-renders-consumed Number of renders used by this specific request
x-renders-used Total renders used in the current billing period

Monitoring Tip

These headers make it easy to implement usage alerts in your application before hitting your plan limits.

Usage API Endpoint

For detailed usage statistics, use our dedicated usage endpoint:

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

This endpoint returns comprehensive usage data broken down by:

  • Hourly usage (last 72 hours)
  • Daily usage (last 60 days)
  • Monthly usage (last 12 months)
  • Per billing period statistics

Example Request

curl -X GET https://hcti.io/v1/usage \
  -u 'user-id:api-key'

Response Format

The response includes usage data organized into different time periods:

{
  "data": {
    "hour": {
      "2024-03-17T13:00:00Z": 29,
      // ... hourly data
    },
    "day": {
      "2024-03-17T00:00:00Z": 838,
      // ... daily data
    },
    "month": {
      "2024-03-01T00:00:00Z": 50747,
      // ... monthly data
    }
  },
  "per_billing_period": [
    {
      "total_images": 40935,
      "start": "2024-03-01T00:00:00Z",
      "end": "2024-04-01T00:00:00Z"
    }
    // ... previous billing periods
  ]
}

Usage Tracking

Consider implementing regular usage checks with this endpoint to monitor trends and plan capacity needs.


Need help?

Talk to a human. Please email us support@htmlcsstoimage.com with any questions and we’ll gladly help you get started.


Back to top

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

Page last modified: Dec 26 2024 at 02:39 PM.

Edit this page on GitHub.