Get Billing Credits
curl --request GET \
--url https://api.eesi.ai/v1/organizations/billing/credits \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.eesi.ai/v1/organizations/billing/credits"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.eesi.ai/v1/organizations/billing/credits', 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.eesi.ai/v1/organizations/billing/credits",
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.eesi.ai/v1/organizations/billing/credits"
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.eesi.ai/v1/organizations/billing/credits")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.eesi.ai/v1/organizations/billing/credits")
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{
"total_credits_used": 0,
"remaining_credits": 0,
"total_quota": 0,
"usage_last_30d_minor": 0,
"ledger_entries": [
{
"id": 123,
"entry_type": "<string>",
"credits_delta": 123,
"balance_after": 123,
"created_at": "<string>",
"amount_minor": 123,
"amount_currency": "<string>",
"description": "<string>",
"metadata": {}
}
],
"total_count": 0,
"page": 1,
"limit": 50,
"total_pages": 0,
"billing_exempt": false,
"price_per_minute_usd": 0,
"minutes_remaining": 0,
"low_balance": false,
"voice_clone_credits": 0,
"free_tier": {
"active": false,
"signup_grant_credits": 0,
"signup_grant_minutes": 0,
"daily_tts_seconds": 0,
"daily_stt_seconds": 0,
"daily_realtime_seconds": 0,
"clone_allowance": 0
},
"sandbox": false
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}Usage and billing
Get Billing Credits
Return the organization’s prepaid credit balance and paginated ledger.
GET
/
v1
/
organizations
/
billing
/
credits
Get Billing Credits
curl --request GET \
--url https://api.eesi.ai/v1/organizations/billing/credits \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.eesi.ai/v1/organizations/billing/credits"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.eesi.ai/v1/organizations/billing/credits', 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.eesi.ai/v1/organizations/billing/credits",
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.eesi.ai/v1/organizations/billing/credits"
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.eesi.ai/v1/organizations/billing/credits")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.eesi.ai/v1/organizations/billing/credits")
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{
"total_credits_used": 0,
"remaining_credits": 0,
"total_quota": 0,
"usage_last_30d_minor": 0,
"ledger_entries": [
{
"id": 123,
"entry_type": "<string>",
"credits_delta": 123,
"balance_after": 123,
"created_at": "<string>",
"amount_minor": 123,
"amount_currency": "<string>",
"description": "<string>",
"metadata": {}
}
],
"total_count": 0,
"page": 1,
"limit": 50,
"total_pages": 0,
"billing_exempt": false,
"price_per_minute_usd": 0,
"minutes_remaining": 0,
"low_balance": false,
"voice_clone_credits": 0,
"free_tier": {
"active": false,
"signup_grant_credits": 0,
"signup_grant_minutes": 0,
"daily_tts_seconds": 0,
"daily_stt_seconds": 0,
"daily_realtime_seconds": 0,
"clone_allowance": 0
},
"sandbox": false
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}Authorizations
BearerAuthApiKeyHeader
An EESI API key (sk-eesi-...) or a Clerk session token.
Query Parameters
Required range:
x >= 1Required range:
1 <= x <= 100Response
Successful Response
Show child attributes
Show child attributes
What an account gets before it pays, and what stops if it never does.
Every figure here is deployment configuration, so a client that wrote them
into a sentence would describe a different product on every install that
tunes one. They travel on the wire for the same reason
price_per_minute_usd does: what is stated is what is enforced.
Show child attributes
Show child attributes