Skip to main content
GET
/
credit-usage
Get credit usage
curl --request GET \
  --url https://app.gc.ai/api/external/v1/credit-usage \
  --header 'Authorization: <api-key>'
{
  "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": {}
    }
  ]
}

Authorizations

Authorization
string
header
required

API key for authentication. Format: gcai_xxxxxxxxx

Create API keys in the GC AI app under Settings → API.

Query Parameters

start_date
string
required

Inclusive range start (YYYY-MM-DD).

Pattern: ^\d{4}-\d{2}-\d{2}$
Example:

"2026-06-01T00:00:00.000Z"

end_date
string
required

Inclusive range end (YYYY-MM-DD).

Pattern: ^\d{4}-\d{2}-\d{2}$
Example:

"2026-06-30T00:00:00.000Z"

timezone
string
default:UTC

IANA timezone for day boundaries (default UTC), e.g. America/New_York.

Response

Credit usage for the requested range

start_date
string
required

Inclusive range start.

end_date
string
required

Inclusive range end.

timezone
string
required

IANA timezone used for day boundaries.

pricing_available
boolean
required

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
number | null
required

Total credits across all operations over the range. Null when pricing is unavailable.

lines
object[]
required

Per-operation usage and credit totals over the range.

daily
object[]
required

Daily usage buckets across the full range (days with no usage have an empty usage object).