Get credit balance
curl --request GET \
--url https://api.sidenet.ai/v1/billing/balance \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.sidenet.ai/v1/billing/balance"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.sidenet.ai/v1/billing/balance', 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.sidenet.ai/v1/billing/balance",
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.sidenet.ai/v1/billing/balance"
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.sidenet.ai/v1/billing/balance")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.sidenet.ai/v1/billing/balance")
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{
"balance": 318.46,
"period_start": "2026-10-01",
"period_end": "2026-11-01",
"opening_balance": 259.73,
"credits_added": 100,
"consumed": 41.27,
"spend": {
"today": 2.14,
"last_7_days": 12.9,
"month": 41.27,
"lifetime": 1240.54
},
"pricing": {
"service_charge_rate": 0.45,
"monthly_fixed": 0
}
}Billing
Get credit balance
The organization’s live credit balance, in USD: what the current month opened with, plus credits purchased since, minus what was consumed this month. This is the figure the spend gate enforces — requests are refused once it reaches zero.
Also carries the organization’s attributed spend over four windows (today, last 7 days, this calendar month, lifetime) — the sum of every group’s spend from GET /v1/groups — and its pricing: the service charge applied on top-ups and any fixed monthly fee.
Requires your organization API key, from your backend.
GET
/
v1
/
billing
/
balance
Get credit balance
curl --request GET \
--url https://api.sidenet.ai/v1/billing/balance \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.sidenet.ai/v1/billing/balance"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.sidenet.ai/v1/billing/balance', 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.sidenet.ai/v1/billing/balance",
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.sidenet.ai/v1/billing/balance"
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.sidenet.ai/v1/billing/balance")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.sidenet.ai/v1/billing/balance")
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{
"balance": 318.46,
"period_start": "2026-10-01",
"period_end": "2026-11-01",
"opening_balance": 259.73,
"credits_added": 100,
"consumed": 41.27,
"spend": {
"today": 2.14,
"last_7_days": 12.9,
"month": 41.27,
"lifetime": 1240.54
},
"pricing": {
"service_charge_rate": 0.45,
"monthly_fixed": 0
}
}Authorizations
Response
The balance