curl --request GET \
--url https://app.gc.ai/api/external/v1/credit-usage \
--header 'Authorization: <api-key>'import requests
url = "https://app.gc.ai/api/external/v1/credit-usage"
headers = {"Authorization": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: '<api-key>'}};
fetch('https://app.gc.ai/api/external/v1/credit-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://app.gc.ai/api/external/v1/credit-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: <api-key>"
],
]);
$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://app.gc.ai/api/external/v1/credit-usage"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://app.gc.ai/api/external/v1/credit-usage")
.header("Authorization", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.gc.ai/api/external/v1/credit-usage")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"start_date": "<string>",
"end_date": "<string>",
"timezone": "<string>",
"pricing_available": true,
"total_credits": 123,
"lines": [
{
"api": "chat:completions",
"requests": 123,
"unit": "<string>",
"credits_per_unit": 123,
"credits": 123
}
],
"daily": [
{
"date": "2026-06-01T00:00:00.000Z",
"usage": {}
}
]
}{
"error": "<string>",
"code": "<string>",
"message": "<string>",
"details": {}
}{
"error": "<string>",
"code": "<string>",
"message": "<string>",
"details": {}
}{
"error": "<string>",
"code": "<string>",
"message": "<string>",
"details": {}
}{
"error": "<string>",
"code": "<string>",
"message": "<string>",
"details": {}
}{
"error": "<string>",
"code": "<string>",
"message": "<string>",
"details": {}
}{
"error": "<string>",
"code": "<string>",
"message": "<string>",
"details": {}
}Get Credit Usage
Billing view of the organization’s credit consumption, broken down by billable operation and by day, with rate-card pricing.
Requires an org-scoped API key: credit usage is an organization-level concern. User-scoped keys receive a 403.
If rate-card pricing can’t be resolved for every observed operation, pricing_available is false and all credit fields are null; raw request counts are still returned.
curl --request GET \
--url https://app.gc.ai/api/external/v1/credit-usage \
--header 'Authorization: <api-key>'import requests
url = "https://app.gc.ai/api/external/v1/credit-usage"
headers = {"Authorization": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: '<api-key>'}};
fetch('https://app.gc.ai/api/external/v1/credit-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://app.gc.ai/api/external/v1/credit-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: <api-key>"
],
]);
$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://app.gc.ai/api/external/v1/credit-usage"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://app.gc.ai/api/external/v1/credit-usage")
.header("Authorization", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.gc.ai/api/external/v1/credit-usage")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"start_date": "<string>",
"end_date": "<string>",
"timezone": "<string>",
"pricing_available": true,
"total_credits": 123,
"lines": [
{
"api": "chat:completions",
"requests": 123,
"unit": "<string>",
"credits_per_unit": 123,
"credits": 123
}
],
"daily": [
{
"date": "2026-06-01T00:00:00.000Z",
"usage": {}
}
]
}{
"error": "<string>",
"code": "<string>",
"message": "<string>",
"details": {}
}{
"error": "<string>",
"code": "<string>",
"message": "<string>",
"details": {}
}{
"error": "<string>",
"code": "<string>",
"message": "<string>",
"details": {}
}{
"error": "<string>",
"code": "<string>",
"message": "<string>",
"details": {}
}{
"error": "<string>",
"code": "<string>",
"message": "<string>",
"details": {}
}{
"error": "<string>",
"code": "<string>",
"message": "<string>",
"details": {}
}Authorizations
API key for authentication. Format: gcai_xxxxxxxxx
Create API keys in the GC AI app under Settings → API.
Query Parameters
Inclusive range start (YYYY-MM-DD).
^\d{4}-\d{2}-\d{2}$"2026-06-01T00:00:00.000Z"
Inclusive range end (YYYY-MM-DD).
^\d{4}-\d{2}-\d{2}$"2026-06-30T00:00:00.000Z"
IANA timezone for day boundaries (default UTC), e.g. America/New_York.
Response
Credit usage for the requested range
Inclusive range start.
Inclusive range end.
IANA timezone used for day boundaries.
Whether rate-card pricing could be resolved for every observed operation. When false, all credit fields are null and only raw request counts are returned.
Total credits across all operations over the range. Null when pricing is unavailable.
Per-operation usage and credit totals over the range.
Show child attributes
Show child attributes
Daily usage buckets across the full range (days with no usage have an empty usage object).
Show child attributes
Show child attributes
Was this page helpful?