Skip to main content
POST
/
api
/
v1
/
GetTeamCreditBalance
Get Team Credit Balance
curl --request POST \
  --url https://server.codeium.com/api/v1/GetTeamCreditBalance \
  --header 'Content-Type: application/json' \
  --data '
{
  "service_key": "<string>"
}
'
{
  "promptCreditsPerSeat": 123,
  "numSeats": 123,
  "addOnCreditsAvailable": 123,
  "addOnCreditsUsed": 123,
  "billingCycleStart": "<string>",
  "billingCycleEnd": "<string>"
}

Overview

Retrieve the current credit balance information for your team. This includes prompt credits allocated per seat, the number of seats, add-on credit usage, and billing cycle dates.
This endpoint only reflects the current billing cycle. It does not return historical usage from previous cycles.In particular, addOnCreditsAvailable is not a lifetime total — it is recomputed at the start of every billing cycle based on what was consumed in the previous cycle, so the value you see will change month over month. If your team used add-on credits last cycle, addOnCreditsAvailable at the start of this cycle will be lower than the amount you originally purchased.

Request

service_key
string
required
Your service key with “Billing Read” permissions

Example Request

curl -X POST --header "Content-Type: application/json" \
--data '{
  "service_key": "your_service_key_here"
}' \
https://server.codeium.com/api/v1/GetTeamCreditBalance

Response

promptCreditsPerSeat
integer
Number of prompt credits allocated per seat for the current billing cycle
numSeats
integer
Number of seats on the team
addOnCreditsAvailable
integer
Add-on credits available to the team for the current billing cycle only. This value is recomputed at the start of each billing cycle based on usage from the previous cycle, so it changes month over month and is not a lifetime total of purchased add-on credits.
addOnCreditsUsed
integer
Add-on credits consumed so far in the current billing cycle only. This counter resets at the start of each new cycle and does not include usage from previous cycles.
billingCycleStart
string
Start of the current billing cycle (ISO 8601 timestamp)
billingCycleEnd
string
End of the current billing cycle (ISO 8601 timestamp)

Example Response

{
  "promptCreditsPerSeat": 500,
  "numSeats": 50,
  "addOnCreditsAvailable": 10000,
  "addOnCreditsUsed": 3500,
  "billingCycleStart": "2026-01-01T00:00:00Z",
  "billingCycleEnd": "2026-02-01T00:00:00Z"
}

Error Responses

Common error scenarios:
  • Invalid service key or insufficient permissions
  • Feature not available for your plan (requires enterprise tier)
  • Rate limit exceeded