チームのクレジット残高を取得
curl --request POST \
--url https://server.codeium.com/api/v1/GetTeamCreditBalance \
--header 'Content-Type: application/json' \
--data '
{
"service_key": "<string>"
}
'import requests
url = "https://server.codeium.com/api/v1/GetTeamCreditBalance"
payload = { "service_key": "<string>" }
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({service_key: '<string>'})
};
fetch('https://server.codeium.com/api/v1/GetTeamCreditBalance', 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://server.codeium.com/api/v1/GetTeamCreditBalance",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'service_key' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://server.codeium.com/api/v1/GetTeamCreditBalance"
payload := strings.NewReader("{\n \"service_key\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://server.codeium.com/api/v1/GetTeamCreditBalance")
.header("Content-Type", "application/json")
.body("{\n \"service_key\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://server.codeium.com/api/v1/GetTeamCreditBalance")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"service_key\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"promptCreditsPerSeat": 123,
"numSeats": 123,
"addOnCreditsAvailable": 123,
"addOnCreditsUsed": 123,
"billingCycleStart": "<string>",
"billingCycleEnd": "<string>"
}利用状況 API
チームのクレジット残高を取得
シートごとのプロンプトクレジット、アドオンのクレジット、および請求サイクル情報を含む、チームの現在のクレジット残高を取得します。
POST
/
api
/
v1
/
GetTeamCreditBalance
チームのクレジット残高を取得
curl --request POST \
--url https://server.codeium.com/api/v1/GetTeamCreditBalance \
--header 'Content-Type: application/json' \
--data '
{
"service_key": "<string>"
}
'import requests
url = "https://server.codeium.com/api/v1/GetTeamCreditBalance"
payload = { "service_key": "<string>" }
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({service_key: '<string>'})
};
fetch('https://server.codeium.com/api/v1/GetTeamCreditBalance', 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://server.codeium.com/api/v1/GetTeamCreditBalance",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'service_key' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://server.codeium.com/api/v1/GetTeamCreditBalance"
payload := strings.NewReader("{\n \"service_key\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://server.codeium.com/api/v1/GetTeamCreditBalance")
.header("Content-Type", "application/json")
.body("{\n \"service_key\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://server.codeium.com/api/v1/GetTeamCreditBalance")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"service_key\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"promptCreditsPerSeat": 123,
"numSeats": 123,
"addOnCreditsAvailable": 123,
"addOnCreditsUsed": 123,
"billingCycleStart": "<string>",
"billingCycleEnd": "<string>"
}概要
リクエスト
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
レスポンス
integer
現在の請求サイクルでの 1 シートあたりに割り当てられたプロンプトクレジット数
integer
チームのシート数
integer
チームで利用可能なアドオン用クレジットの合計数
integer
現在の請求サイクルでこれまでに使用されたアドオン用クレジット数
string
現在の請求サイクルの開始時刻(ISO 8601 タイムスタンプ)
string
現在の請求サイクルの終了時刻(ISO 8601 タイムスタンプ)
レスポンス例
{
"promptCreditsPerSeat": 500,
"numSeats": 50,
"addOnCreditsAvailable": 10000,
"addOnCreditsUsed": 3500,
"billingCycleStart": "2026-01-01T00:00:00Z",
"billingCycleEnd": "2026-02-01T00:00:00Z"
}
エラー応答
- 無効なサービスキー、または権限不足
- 利用中のプランでは利用できない機能(Enterprise プランが必要)
- レート制限の上限を超過
⌘I