アカウントと全 Key の残高を照会
Management Key のみ受け付け、アカウント残高の概要と所属 Regular Key のページネーション付き残高リストを返します。
リクエストパラメータ
| パラメータ | 型 | 必須 | デフォルト値 | 説明 |
|---|---|---|---|---|
page | integer | いいえ | 1 | ページ番号、正の整数 |
limit | integer | いいえ | 30 | 1 ページあたりの件数、1〜100 |
key_type | string | いいえ | regular | 空値または regular のみサポート。management は 400 unsupported_key_type を返す |
status | string | いいえ | なし | 状態で絞り込み: 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
}
リストとカウントフィールドの説明
| フィールド | 型 | 説明 |
|---|---|---|
keys | array | 現在のページの Regular Key 残高リスト |
page | integer | 現在のページ番号 |
limit | integer | 現在のページサイズ |
has_more | boolean | 次のページがあるかどうか |
total_keys | integer | 現在の絞り込み条件に一致する Regular Key の総数。ページネーションの影響を受けない |
active_keys | integer | アカウント内の全 active Regular Key の数。status 絞り込みとページネーションの影響を受けない |
disabled_keys | integer | アカウント内の全 disabled Regular Key の数。status 絞り込みとページネーションの影響を受けない |
リストエンドポイントは Key の lifetime 消費とモデル別明細を返しません。明細が必要な場合は、単一 Key 残高エンドポイントを呼び出してください。
total_keys は status などの絞り込み条件の影響を受けますが、active_keys / disabled_keys はアカウント内の全 Regular Key の数を反映し、status 絞り込みとページネーションの影響を受けません。
共通リクエスト仕様、フィールド定義、エラーコードは 残高照会API を参照してください。