Get billing usage
curl --request GET \
--url https://api.truthlocks.com/v1/billing/usage \
--header 'X-API-Key: <api-key>'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));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)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))
}{
"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>'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));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)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))
}{
"period": "<string>",
"usage": {}
}{
"code": "AUTH_REQUIRED",
"message": "Authentication required",
"http_status": 401
}GET /v1/billing/usage
Response
Returns an array of usage counter objects.Maximum allowed for this metric under your plan. A value of
-1 denotes no configured quota for this metric; service and rate limits still apply.Whether the tenant is currently allowed to consume more of this metric. Returns
false when the limit has been reached. Only included when relevant.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.

