Skip to main content
POST
https://server.codeium.com
/
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.

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
Total add-on credits available for the team
addOnCreditsUsed
integer
Add-on credits consumed so far in the current billing cycle
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