Regular Key 셀프서비스 조회
Regular Key만 허용하며, 소속 계정의 현재 총 잔액과 현재 Key의 잔액 정보를 반환합니다.
다음 Regular Key 상태에서도 조회가 가능하며 200을 반환합니다:
- 수동 비활성화;
- 만료;
- 한도 소진;
- 구독 적용 대기.
삭제되었거나, 위조되었거나, 인식할 수 없는 Key는 401 invalid_api_key를 반환하고, 계정이 비활성화되면 403 account_disabled를 반환합니다.
요청 파라미터: 없음
응답 예시
{
"object": "self_balance",
"currency": "USD",
"as_of": "2026-08-08T06:30:00Z",
"account": {
"total_balance": "850",
"paid_balance": null,
"free_balance": null,
"breakdown_status": "unavailable"
},
"key": {
"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
}
}
셀프서비스 인터페이스는 다음 민감하거나 관리형 데이터를 반환하지 않습니다:
- 계 정 누적 소비
total_consumed; - Key lifetime 소비
consumed.all_time; - 모델별 소비
consumed.by_model; - 다른 Key의 모든 정보.
Management Key가 본 인터페이스를 호출하면 항상 403 forbidden_scope를 반환합니다.
Key가 수동 비활성화, 만료, 한도 소진 또는 구독 적용 대기 상태라도 자체 잔액을 조회하고 200을 반환할 수 있습니다. 셀프서비스 인터페이스는 계정 누적 소비, Key lifetime 소비, 모델별 소비 및 다른 Key의 정보를 반환하지 않습니다.
공통 요청 규약, 필드 정의 및 오류 코드는 잔액 조회 API 개요를 참조하세요.