본문으로 건너뛰기
API 레퍼런스
API 레퍼런스

잔액 가져오기

남은 유료 잔액 및 보너스 잔액과 현재 사용량 합계를 가져옵니다.

남은 유료 잔액 및 보너스 잔액과 현재 사용량 합계를 가져옵니다.

엔드포인트

GET /api/v1/me/balance
Base URL
https://runapi.ai
API 버전
v1
인증
Authorization: Bearer YOUR_API_KEY
Authorization
제시된 표준 API 키에 연결된 계정의 잔액을 반환합니다.
02

성공 응답

HTTP 200

GET /api/v1/me/balance

JSON
{
  "balance_cents": 1200,
  "bonus_balance_cents": 200,
  "paid_balance_cents": 1000,
  "spent_cents_today": 75,
  "spent_cents_total": 4300
}
03

오류 응답 (401)

HTTP 401
응답 스키마
JSON
{
  "properties": {
    "error": {
      "description": "사람이 읽을 수 있는 오류 메시지.",
      "type": "string"
    }
  },
  "required": [
    "error"
  ],
  "type": "object",
  "unevaluatedProperties": false
}

응답 예시

JSON
{
  "error": "Authentication required"
}
04

오류 응답 (403)

HTTP 403
응답 스키마
JSON
{
  "properties": {
    "error": {
      "description": "사람이 읽을 수 있는 오류 메시지.",
      "type": "string"
    }
  },
  "required": [
    "error"
  ],
  "type": "object",
  "unevaluatedProperties": false
}

응답 예시

JSON
{
  "error": "Standard API key required"
}
05

cURL 예시

CURL
curl -X GET https://runapi.ai/api/v1/me/balance \
  -H 'Authorization: Bearer YOUR_API_KEY'