Docs/API reference/GET /api/v1/me
GET
/api/v1/me
Returns the authenticated user, key info and credit balance.Authentication required
Request
A single authenticated GET. No body, no query parameters — just your key in the Authorization header.
HTTP
GET https://api.varmir.com/api/v1/me
Authorization: Bearer <YOUR_API_KEY>Response
Returns a JSON object with three keys: user, key, and credits.
{
"user": {
"id": "usr_91",
"email": "[email protected]",
"name": "Oleksandr"
},
"key": {
"id": "key_8f3a",
"name": "Production",
"prefix": "mstk_lfQZYRA"
},
"credits": {
"balance": 982,
"lifetime_purchased": 1000
}
}Response fields
FieldTypeDescription
user.idstringStable user identifier.
user.emailstringAccount email.
user.namestring | nullDisplay name, may be null.
key.idstringIdentifier of the API key that authenticated the request.
credits.balanceintegerRemaining credits across all packs.
credits.lifetime_purchasedintegerTotal credits ever purchased on the account.
Code examples
Read your remaining credit balance in your language of choice.
curl https://api.varmir.com/api/v1/me \
-H "Authorization: Bearer mstk_your_key"