メインコンテンツへスキップ
POST
/
api
/
v1
/
GetTeamCreditBalance
チームのクレジット残高を取得
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>"
}

概要

チームの現在のクレジット残高情報を取得します。これには、席ごとに割り当てられたプロンプトクレジット、席数、アドオンのクレジット使用量、請求サイクル期間の日付が含まれます。

リクエスト

service_key
string
必須
「Billing Read」権限を持つサービスキー

リクエスト例

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

レスポンス

promptCreditsPerSeat
integer
現在の請求サイクルでの 1 シートあたりに割り当てられたプロンプトクレジット数
numSeats
integer
チームのシート数
addOnCreditsAvailable
integer
チームで利用可能なアドオン用クレジットの合計数
addOnCreditsUsed
integer
現在の請求サイクルでこれまでに使用されたアドオン用クレジット数
billingCycleStart
string
現在の請求サイクルの開始時刻(ISO 8601 タイムスタンプ)
billingCycleEnd
string
現在の請求サイクルの終了時刻(ISO 8601 タイムスタンプ)

レスポンス例

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

エラー応答

よくあるエラー例:
  • 無効なサービスキー、または権限不足
  • 利用中のプランでは利用できない機能(Enterprise プランが必要)
  • レート制限の上限を超過