Overview
Record API usage for tracking purposes without deducting credits. This is useful for scenarios like Shopify payments where you want to track usage separately from credit consumption.
Request Body
Source of the usage (e.g., “api”, “shopify”, “wordpress”)
Number of usage records to create
Additional metadata to store with the usage record
Example Request
curl -X POST https://api.gistmag.co.uk/record-usage \
-H "Content-Type: application/json" \
-d '{
"api_key": "your_api_key_here",
"source": "shopify",
"count": 1,
"metadata": {
"order_id": "12345",
"product_id": "67890"
}
}'
Response
Whether the usage was recorded successfully
Number of usage records created
Example Response
{
"success": true,
"records_created": 1
}
Use Cases
- Track usage from external integrations (Shopify, WordPress, etc.)
- Record usage for analytics without consuming credits
- Monitor API usage across different sources
This endpoint records usage but does NOT deduct credits. Credits are only deducted when using the actual API endpoints like /generate or /tts.
Usage records created through this endpoint will appear in your usage statistics but won’t affect your credit balance.