Check Credit Usage
curl --request POST \
--url https://api.nozle.app/api/v1/usage/check \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.nozle.app/api/v1/usage/check"
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.nozle.app/api/v1/usage/check', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.nozle.app/api/v1/usage/check"
req, _ := http.NewRequest("POST", 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))
}require 'uri'
require 'net/http'
url = URI("https://api.nozle.app/api/v1/usage/check")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.nozle.app/api/v1/usage/check",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
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;
}HttpResponse<String> response = Unirest.post("https://api.nozle.app/api/v1/usage/check")
.header("Authorization", "Bearer <token>")
.asString();Product Credits
Check Credit Usage
Calculate an advisory credit decision without mutation
POST
/
usage
/
check
Check Credit Usage
curl --request POST \
--url https://api.nozle.app/api/v1/usage/check \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.nozle.app/api/v1/usage/check"
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.nozle.app/api/v1/usage/check', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.nozle.app/api/v1/usage/check"
req, _ := http.NewRequest("POST", 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))
}require 'uri'
require 'net/http'
url = URI("https://api.nozle.app/api/v1/usage/check")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.nozle.app/api/v1/usage/check",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
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;
}HttpResponse<String> response = Unirest.post("https://api.nozle.app/api/v1/usage/check")
.header("Authorization", "Bearer <token>")
.asString();Auth: secret key only.
The response includes
Projected deductions follow the same deterministic expiry, priority, creation
time, and ID ordering as an authoritative consume, but no source or ledger row
is changed. Another request can spend credits before a later track call, so
this endpoint is not authorization to perform irreversible work.
{
"customer_id": "customer_123",
"feature_code": "agent_execution",
"credit_system_code": "ai_credits",
"properties": {},
"occurred_at": "2026-07-20T12:00:00.750Z"
}
advisory: true, exact metric_amount,
credits_required, the available balance, and the projected source
selection:
{
"advisory": true,
"allowed": true,
"metric_amount": "1",
"credit_system": "ai_credits",
"credits_required": "2",
"available": "625",
"projected_remaining": "623",
"projected_deductions": [
{
"balance_source_id": "0f89...",
"source_type": "subscription_grant",
"amount": "2",
"remaining": "373"
}
]
}