APIリファレンス
残高を取得する
残りの有料残高とボーナス残高、および現在の使用合計を取得します。
残りの有料残高とボーナス残高、および現在の使用合計を取得します。
エンドポイント
- ベースURL
https://runapi.ai- API バージョン
v1- 認証
Authorization: Bearer YOUR_API_KEY
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
HTTP 401エラーレスポンス (401)
レスポンススキーマ
JSON
{
"properties": {
"error": {
"description": "人が読めるエラーメッセージ。",
"type": "string"
}
},
"required": [
"error"
],
"type": "object",
"unevaluatedProperties": false
}
レスポンス例
JSON
{
"error": "Authentication required"
}
04
HTTP 403エラーレスポンス (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'