Account-Endpunkt
Verwenden Sie diesen Endpunkt, um den Status Ihres API-Kontos und eine Nutzungsübersicht einzusehen.
Basispfad:
GET /api/v1/account
GET /api/v1/account
Gibt zurück:
- verbleibende Credits
- Abonnement-Metadaten
- Nutzungsübersicht (letzte 30 Tage)
- Anzahl aktiver API-Schlüssel
Anfrage
curl -X GET "https://armox.ai/api/v1/account" \
-H "Authorization: Bearer sk_live_your_key_here"
Antwort
{
"object": "account",
"user_id": "user_123",
"credits": 8420,
"subscription": "agency",
"usage": {
"credits_used_last_30d": 12480,
"total_requests_last_30d": 931,
"total_jobs": 415
},
"api_keys": {
"active": 3
}
}
Typische Anwendungsfälle
- Credits in Ihrem internen Admin-Panel anzeigen
- 30-Tage-Nutzungstrends überwachen
- Anzahl aktiver Schlüssel für Sicherheitsaudits prüfen
- Warnungen auslösen, wenn Credits niedrig sind
JavaScript-Beispiel
const response = await fetch("https://armox.ai/api/v1/account", {
headers: {
Authorization: "Bearer sk_live_your_key_here",
},
});
const account = await response.json();
console.log(account.credits, account.usage);
Python-Beispiel
Prompt Template
import requests response = requests.get( "https://armox.ai/api/v1/account", headers={"Authorization": "Bearer sk_live_your_key_here"}, ) account = response.json() print(account["credits"]) print(account["usage"])