Riferimento API
Recupera il saldo
Recupera il saldo residuo a pagamento e bonus, oltre ai totali di utilizzo correnti.
Recupera il saldo residuo a pagamento e bonus, oltre ai totali di utilizzo correnti.
Endpoint
- URL di base
https://runapi.ai- Versione API
v1- Autenticazione
Authorization: Bearer YOUR_API_KEY
02
HTTP 200Risposta di successo
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 401Risposta di errore (401)
Schema della risposta
JSON
{
"properties": {
"error": {
"description": "Messaggio di errore leggibile.",
"type": "string"
}
},
"required": [
"error"
],
"type": "object",
"unevaluatedProperties": false
}
Esempio di risposta
JSON
{
"error": "Authentication required"
}
04
HTTP 403Risposta di errore (403)
Schema della risposta
JSON
{
"properties": {
"error": {
"description": "Messaggio di errore leggibile.",
"type": "string"
}
},
"required": [
"error"
],
"type": "object",
"unevaluatedProperties": false
}
Esempio di risposta
JSON
{
"error": "Standard API key required"
}
05
Esempio cURL
CURL
curl -X GET https://runapi.ai/api/v1/me/balance \
-H 'Authorization: Bearer YOUR_API_KEY'