Skip to main content
GET
/
orgs
/
{org_id}
/
billing
/
overage
cURL
curl --request GET \
  --url https://api.timbal.ai/orgs/{org_id}/billing/overage \
  --header 'Authorization: Bearer <token>'
import requests

url = "https://api.timbal.ai/orgs/{org_id}/billing/overage"

headers = {"Authorization": "Bearer <token>"}

response = requests.get(url, headers=headers)

print(response.text)
const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};

fetch('https://api.timbal.ai/orgs/{org_id}/billing/overage', 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.timbal.ai/orgs/{org_id}/billing/overage",
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.timbal.ai/orgs/{org_id}/billing/overage"

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.timbal.ai/orgs/{org_id}/billing/overage")
.header("Authorization", "Bearer <token>")
.asString();
require 'uri'
require 'net/http'

url = URI("https://api.timbal.ai/orgs/{org_id}/billing/overage")

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
{
  "enabled": true,
  "invoiced_credits": 123,
  "pending_credits": 123,
  "used_credits": 123,
  "cap_credits": 123,
  "period_end": "2023-11-07T05:31:56Z",
  "period_start": "2023-11-07T05:31:56Z",
  "rate_cents_per_1k": 123,
  "threshold_usd": 123
}
{
"code": "<string>",
"message": "<string>"
}
{
"code": "<string>",
"message": "<string>"
}

Authorizations

Authorization
string
header
required

Timbal API key. Obtain your API key from the Timbal platform settings. See Authentication for more information.

Path Parameters

org_id
string
required

Response

Overage usage summary

Customer-facing overage usage summary for the current credits period.

used_credits = invoiced_credits + pending_credits. invoiced_credits is the real metered overage billed on finalized invoices this period (see [overage_summary]); pending_credits is the headline "extra usage you'll be billed for" number, and a non-zero invoiced_credits means an interim (threshold-driven) invoice has already billed part of this period.

enabled
boolean
required

Whether usage-based overage billing is currently enabled for the org.

invoiced_credits
integer<int64>
required

Overage credits already included on a finalized invoice this period.

pending_credits
integer<int64>
required

Overage credits accrued this period that have not been invoiced yet.

used_credits
integer<int64>
required

Total overage credits consumed this period (invoiced + pending).

cap_credits
integer<int64> | null

Org-configured ceiling on overage credits for the period. null means unlimited (or no cap configured); only meaningful when enabled.

period_end
string<date-time> | null

End of the current credits period — when pending overage bills if no interim invoice fires first. null when there is no metered window.

period_start
string<date-time> | null

Start of the current credits period. null when the org has no metered billing window (e.g. free plan with no period anchor).

rate_cents_per_1k
integer<int64> | null

Metered overage rate in cents per 1,000 credits. null when overage pricing is unavailable for the plan.

threshold_usd
integer<int64> | null

Outstanding overage value (whole USD) that triggers an interim invoice. null means overage bills only at the end of the period.