feat: API-Key Health-Check für Anthropic-Keys
- POST /api/admin/api-keys/{keyId}/check Endpoint
- Sendet minimale Anfrage an Anthropic API, liest Rate-Limit-Headers
- Plan-Erkennung: Max (Overage > 0), Pro (kein Fallback-Header), Pro/Max (sonst), API Console
- Budget-Auslastung: 5h + 7d + Overage mit Status-Warnings
- Frontend: Heartbeat-Button zeigt Ergebnis inline unter dem Key-Eintrag
- apiCheckApiKey() API-Funktion
This commit is contained in:
1 parent
fa8deb15b6
commit
8dc52c1337
3 files changed
+186
-1
No files matched your search
@@ -645,6 +645,15 @@ async function apiDeleteApiKey(keyId) {
|
||||
return resp.json();
|
||||
}
|
||||
|
||||
async function apiCheckApiKey(keyId) {
|
||||
const resp = await fetch('/api/admin/api-keys/' + keyId + '/check', { method: 'POST' });
|
||||
if (!resp.ok) {
|
||||
const err = await resp.json().catch(() => ({}));
|
||||
throw new Error(err.error || 'Fehler beim Prüfen');
|
||||
}
|
||||
return resp.json();
|
||||
}
|
||||
|
||||
// ── Krea Image API ──
|
||||
|
||||
async function apiKreaStatus() {
|
||||
|
||||
Reference in new issue
Block a user