GET /account/me

Returns a snapshot of the account authenticated by the API key: user identity, prefix of the presented API key, current balance (amount and currency) and aggregated usage. The balance.limit field appears only if a limit is set on the account or key. No request body or parameters. Authentication via X-API-Key or Authorization: Bearer (both headers are equivalent).

GET /account/me

Request body

The following parameters can be included in the request body:

Parameters

Successful response

The following fields are returned in a successful response:

Response fields

user
object
Required

Information about the authenticated user.

api_key
object
Required

Metadata of the API key used for the request.

balance
object
Required

Current account balance; the limit field appears only if a limit is set.

usage
object
Required

Aggregated account usage.

Examples

Code examples for using this endpoint:

curl
curl -sS https://api-endpoints.alphaedge-ai.com/account/me \
  -H "X-API-Key: sk_ai_VOTRE_CLE"
python
import httpx
r = httpx.get(
    "https://api-endpoints.alphaedge-ai.com/account/me",
    headers={"X-API-Key": "sk_ai_VOTRE_CLE"},
)
print(r.json())
typescript
const res = await fetch("https://api-endpoints.alphaedge-ai.com/account/me", {
  headers: { "X-API-Key": "sk_ai_VOTRE_CLE" },
});
console.log(await res.json());

Response

Sample API response:

json
{
  "user":    { "full_name": "KotiK" },
  "api_key": { "prefix": "sk_ai_173M…" },
  "balance": { "amount": 2570.49, "currency": "EUR" },
  "usage":   { "total_requests": 0 }
}