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)
响应 Schema
JSON
{
"properties": {
"error": {
"description": "Human-readable error message.",
"type": "string"
}
},
"required": [
"error"
],
"type": "object",
"unevaluatedProperties": false
}
响应示例
JSON
{
"error": "Authentication required"
}
04
HTTP 403错误响应 (403)
响应 Schema
JSON
{
"properties": {
"error": {
"description": "Human-readable error message.",
"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'