curl --request GET \
--url https://api.zebratruth.ai/v1/usage \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.zebratruth.ai/v1/usage"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.zebratruth.ai/v1/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.zebratruth.ai/v1/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 => [
"Authorization: Bearer <token>"
],
]);
$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.zebratruth.ai/v1/usage"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
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.zebratruth.ai/v1/usage")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.zebratruth.ai/v1/usage")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"tenantId": "<string>",
"creditsRemaining": 1420,
"creditsTotal": 84450,
"baseCredits": 83250,
"carriedCredits": 1200,
"creditsUsedThisMonth": 245,
"creditsReserved": 123,
"periodStart": "2026-04-01",
"periodEnd": "2026-04-30",
"periodKey": "<string>",
"tier": "trial"
}{
"statusCode": 401,
"message": "Invalid API key",
"error": true,
"url": "https://api.zebratruth.ai/v1/whoami",
"statusMessage": "Invalid API key"
}Get credit usage
Returns current credit balance, usage this period, and plan details.
curl --request GET \
--url https://api.zebratruth.ai/v1/usage \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.zebratruth.ai/v1/usage"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.zebratruth.ai/v1/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.zebratruth.ai/v1/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 => [
"Authorization: Bearer <token>"
],
]);
$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.zebratruth.ai/v1/usage"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
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.zebratruth.ai/v1/usage")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.zebratruth.ai/v1/usage")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"tenantId": "<string>",
"creditsRemaining": 1420,
"creditsTotal": 84450,
"baseCredits": 83250,
"carriedCredits": 1200,
"creditsUsedThisMonth": 245,
"creditsReserved": 123,
"periodStart": "2026-04-01",
"periodEnd": "2026-04-30",
"periodKey": "<string>",
"tier": "trial"
}{
"statusCode": 401,
"message": "Invalid API key",
"error": true,
"url": "https://api.zebratruth.ai/v1/whoami",
"statusMessage": "Invalid API key"
}Authorizations
API key starting with zt_live_ (production) or zt_test_ (sandbox).
Get your key at https://developers.zebratruth.ai
Response
Usage data
1420
Spendable total for the period. Always baseCredits + carriedCredits.
84450
Your plan's own allowance for this period.
83250
Credits carried in from a previous period. 0 unless you upgraded from
Individual to Pro mid-period, in which case your unused Individual
balance is added on top of the Pro allowance. Reported separately so a
cap above the Pro allowance does not look like a billing error.
1200
245
Credits currently held by in-flight checks and queued jobs. Released or committed when they finish.
"2026-04-01"
"2026-04-30"
Opaque identifier of the current billing period.
trial, individual, pro, free, starter, personal, team, enterprise