Get billing usage
curl --request GET \
--url https://api.truthlocks.com/v1/billing/usage \
--header 'X-API-Key: <api-key>'import requests
url = "https://api.truthlocks.com/v1/billing/usage"
headers = {"X-API-Key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'X-API-Key': '<api-key>'}};
fetch('https://api.truthlocks.com/v1/billing/usage', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.truthlocks.com/v1/billing/usage",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"X-API-Key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.truthlocks.com/v1/billing/usage"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-API-Key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.truthlocks.com/v1/billing/usage")
.header("X-API-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.truthlocks.com/v1/billing/usage")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-API-Key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"period": "<string>",
"usage": {}
}{
"code": "AUTH_REQUIRED",
"message": "Authentication required",
"http_status": 401
}Billing
Get usage
Returns current billing cycle usage counters for the authenticated tenant.
GET
/
v1
/
billing
/
usage
Get billing usage
curl --request GET \
--url https://api.truthlocks.com/v1/billing/usage \
--header 'X-API-Key: <api-key>'import requests
url = "https://api.truthlocks.com/v1/billing/usage"
headers = {"X-API-Key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'X-API-Key': '<api-key>'}};
fetch('https://api.truthlocks.com/v1/billing/usage', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.truthlocks.com/v1/billing/usage",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"X-API-Key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.truthlocks.com/v1/billing/usage"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-API-Key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.truthlocks.com/v1/billing/usage")
.header("X-API-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.truthlocks.com/v1/billing/usage")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-API-Key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"period": "<string>",
"usage": {}
}{
"code": "AUTH_REQUIRED",
"message": "Authentication required",
"http_status": 401
}GET /v1/billing/usage
Response
Returns an array of usage counter objects.string
The usage metric identifier (e.g.,
attestations.mint, verifications_monthly, storage_bytes).integer
Amount consumed in the current billing period.
integer
Maximum allowed for this metric under your plan. A value of
-1 means unlimited.string
Billing period for this counter:
monthly or total.string
Unit of measurement:
count or bytes.boolean
Whether the tenant is currently allowed to consume more of this metric. Returns
false when the limit has been reached. Only included when relevant.integer
Change in usage since the last query. Only included when the server tracks incremental updates.
Tracked metrics
The usage endpoint returns up to 16 metrics organized by product group. Which metrics appear depends on your plan and active features.Core
| Metric | Description | Unit |
|---|---|---|
attestations.mint | Attestations minted | count |
verifications_monthly | Verifications performed | count |
storage_bytes | Total storage consumed | bytes |
proof_bundles | Proof bundles generated | count |
webhook_endpoints | Active webhook endpoints | count |
webhook_deliveries | Webhook deliveries sent | count |
seats | Team member seats | count |
MAIP (Machine Identity)
| Metric | Description | Unit |
|---|---|---|
maip.agents | Registered machine agents | count |
maip.sessions | Agent sessions created | count |
maip.trust_computes | Trust score calculations | count |
maip.compliance_checks | Compliance verification requests | count |
AI
| Metric | Description | Unit |
|---|---|---|
ai.dataset_attestations | Datasets attested for lineage | count |
ai.model_attestations | Models attested for provenance | count |
Anti-Fraud
| Metric | Description | Unit |
|---|---|---|
antifraud.risk_signals | Risk signals ingested or generated | count |
antifraud.deepfake_scans | Deepfake scan requests | count |
antifraud.velocity_records | Velocity scoring records | count |
To check whether a specific operation is allowed before performing it, use the entitlements endpoint to verify your quotas.

