Utility API
Get Balance
Check your current diamond balance using your API key.
Endpoint
GET https://open.eternalai.org/v1/balance
Authentication
Provide your API key using one of the following methods:
| Method | Header |
|---|---|
| API Key | x-api-key: <your_api_key> |
Request Examples
Using x-api-key:
curl --request GET \
--location 'https://open.eternalai.org/v1/balance' \
--header 'x-api-key: sa_your_api_key_here'
Responses
200 OK
{
"api_key": "sa_your_api_key_here",
"diamond_balance": 2205.861643999995
}
| Field | Type | Description |
|---|---|---|
api_key | string | The API key used for the request |
diamond_balance | number | Current diamond balance of the account |
401 Unauthorized — Missing authentication
{
"error": "Missing authentication",
"detail": "Provide either x-api-key header or Authorization: Bearer <api_key>"
}
401 Unauthorized — Invalid API key
{
"error": "Invalid API key",
"detail": "..."
}