メインコンテンツへスキップ

アカウントと全 Key の残高を照会

Management Key のみ受け付け、アカウント残高の概要と所属 Regular Key のページネーション付き残高リストを返します。

リクエストパラメータ

パラメータ型必須デフォルト値説明
pageintegerいいえ1ページ番号、正の整数
limitintegerいいえ301 ページあたりの件数、1〜100
key_typestringいいえregular空値または regular のみサポート。management は 400 unsupported_key_type を返す
statusstringいいえなし状態で絞り込み: active または disabled

レスポンス例

{
"object": "balance",
"currency": "USD",
"as_of": "2026-08-08T06:30:00Z",
"account": {
"total_balance": "850",
"paid_balance": null,
"free_balance": null,
"total_consumed": "150",
"paid_consumed": null,
"free_consumed": null,
"breakdown_status": "unavailable"
},
"keys": [
{
"id": "key_01JPRODUCTION",
"name": "Production Server",
"key_type": "regular",
"disabled": false,
"manually_disabled": false,
"limit": "200",
"limit_reset": "monthly",
"quota_scope": "usage",
"period": {
"start": "2026-07-21T08:30:00Z",
"end_exclusive": "2026-08-21T08:30:00Z"
},
"consumed_this_period": "85.5",
"consumed_today": "2.3",
"key_limit_remaining": "114.5",
"remaining": "114.5",
"effective_remaining": "114.5",
"usage_pct": "42.75",
"status": "active",
"status_reason": null
}
],
"page": 1,
"limit": 30,
"has_more": false,
"total_keys": 1,
"active_keys": 1,
"disabled_keys": 0
}

リストとカウントフィールドの説明

フィールド型説明
keysarray現在のページの Regular Key 残高リスト
pageinteger現在のページ番号
limitinteger現在のページサイズ
has_moreboolean次のページがあるかどうか
total_keysinteger現在の絞り込み条件に一致する Regular Key の総数。ページネーションの影響を受けない
active_keysintegerアカウント内の全 active Regular Key の数。status 絞り込みとページネーションの影響を受けない
disabled_keysintegerアカウント内の全 disabled Regular Key の数。status 絞り込みとページネーションの影響を受けない

リストエンドポイントは Key の lifetime 消費とモデル別明細を返しません。明細が必要な場合は、単一 Key 残高エンドポイントを呼び出してください。

カウントの意味

total_keys は status などの絞り込み条件の影響を受けますが、active_keys / disabled_keys はアカウント内の全 Regular Key の数を反映し、status 絞り込みとページネーションの影響を受けません。

関連エンドポイント

共通リクエスト仕様、フィールド定義、エラーコードは 残高照会API を参照してください。

オンラインサポート