Skip to main content

Account

Account answers: is my key working, what has it used, and is the API up?

EndpointReturns
GET /v2/key-statusYour key's status, limits, usage, scopes and billing mode
GET /v2/pingA health check. Needs no API key

Neither has an x402 twin.

Key Status​

GET /v2/key-status: the current status and usage of your API key. No parameters.

{
"success": true,
"data": {
"id": 1,
"key": "string",
"name": "string",
"status": "active",
"dailyRequestLimit": 1,
"monthlyRequestLimit": 1,
"expiresAt": "string",
"createdAt": "string",
"updatedAt": "string",
"requestsPerMinute": 1,
"email": "string",
"project": "string",
"allowOverage": true,
"maxOverage": 1,
"spendCapCredits": 1,
"bonusCredits": 1,
"bonusCreditsExpiresAt": "string",
"userId": 1,
"emailNotificationsEnabled": true,
"lastEmailSentAt": "string",
"lastUsagePercentNotified": 1,
"spendAlertThreshold": "string",
"spendAlertMaxFrequencyHours": 1,
"totalSpendAlerted": "string",
"athenaEnabled": true,
"scopes": ["string"],
"tier": "string",
"depositCredits": 1,
"billingMode": "deposit",
"usage": { "monthly": 1, "daily": 1 },
"limits": { "monthly": 1, "daily": 1 },
"isExpired": true,
"remainingRequests": { "monthly": 1, "daily": 1 }
}
}
curl -H "x-elfa-api-key: $ELFA_API_KEY" \
"https://api.elfa.ai/v2/key-status"

The spec's example uses placeholder values.

FieldTypeMeaning
idnumberKey ID
keystringMasked key: prefix plus the last 4 characters, such as elfak_...245c. The full secret is never returned. Use it only to tell two keys apart
namestringKey name
statusstringactive, revoked, expired or payment_required. See Enums
tierstringThe key's plan tier
billingModestringdeposit or arrears
scopesstring[]Effective scopes, including any enterprise overlay
dailyRequestLimit, monthlyRequestLimitnumberRequest limits
requestsPerMinutenumber or nullPer-minute limit
usage.daily, usage.monthlynumberUsed so far
limits.daily, limits.monthlynumberLimits for each period
remainingRequests.daily, remainingRequests.monthlynumberLeft in each period
depositCreditsnumberDeposit credit balance
bonusCredits, bonusCreditsExpiresAtnumber, string or nullBonus credits and when they expire
allowOverage, maxOverage, spendCapCreditsboolean or null, number or nullOverage settings and spend cap
spendAlertThresholdstring, number or nullSpend alert settings
totalSpendAlertedstring or numberSpend alert settings
spendAlertMaxFrequencyHoursnumberSpend alert settings
emailNotificationsEnabledbooleanUsage email settings
lastEmailSentAtstring (date-time) or nullUsage email settings
lastUsagePercentNotifiednumberUsage email settings
athenaEnabledbooleanWhether the key is provisioned for Auto
expiresAt, isExpiredstring, booleanExpiry
createdAt, updatedAtstringTimestamps
email, projectstring or nullOwner email and project
userIdnumber or nullAccount bookkeeping. Kept for backwards compatibility, not part of the supported surface
ParameterRequiredTypeMeaning
NoneThis endpoint takes no parameters

Scopes Are Not a Full Access Map​

Scopes gate the /v2 data and chat endpoints only. /v2/auto/* is not scope-gated, so you cannot tell from scopes whether a key reaches Auto.

The Authoritative Balance​

Most /v2/* responses report their own cost in the x-elfa-credits header, so you do not need to read key status before and after each call. Streaming responses and charges that finalize after the response is flushed carry only a subtotal in the header. For those, key status is the authoritative balance. See Pricing.

Also via x402: not available.

Ping​

GET /v2/ping: a health check to verify the API is available. Needs no API key and takes no parameters.

{
"success": true,
"data": {
"message": "string"
}
}
curl "https://api.elfa.ai/v2/ping"

The spec's example uses placeholder values.

FieldTypeMeaning
successbooleanAlways true
data.messagestringA status message
ParameterRequiredTypeMeaning
NoneThis endpoint takes no parameters

Also via x402: not available.

Errors​

Key status answers 401 when the key is missing, invalid or expired. Ping needs no key. For the rest, see Enums and Errors.