Balance and API keys. Returns the credit balance and a summary of the account API keys. Never returns a full key.
GET https://YOUR_API_HOST/v1/account
Credits
Free. This endpoint never spends credits.
Example request
curl https://YOUR_API_HOST/v1/account \
-H "Authorization: Bearer $LOOKVALID_API_KEY"
const response = await fetch("https://YOUR_API_HOST/v1/account", {
headers: { Authorization: `Bearer ${process.env.LOOKVALID_API_KEY}` },
});
console.log(await response.json());
import os
import requests
response = requests.get(
"https://YOUR_API_HOST/v1/account",
headers={"Authorization": f"Bearer {os.environ['LOOKVALID_API_KEY']}"},
timeout=30,
)
print(response.json())
Response
| Field | Type | Notes |
|---|---|---|
account | object | - |
account.id | string | - |
account.name | string | - |
account.created_at | string | Format: date-time. |
balance | object | - |
balance.granted | integer | - |
balance.spent | integer | - |
balance.reserved | integer | Credits held by lookups still in flight. |
balance.available | integer | Credits you can spend now. |
keys | array of object | - |
keys[].id | string | Public key id. The key itself is never returned. |
keys[].prefix | string | - |
keys[].name | string | - |
keys[].created_at | string | Format: date-time. |
keys[].revoked | boolean | - |
keys[].revoked_at | string or null | Format: date-time. |
Response shape
Each value is a stand-in that shows the field type.
{
"account": {
"id": "string",
"name": "string",
"created_at": "string"
},
"balance": {
"granted": 0,
"spent": 0,
"reserved": 0,
"available": 0
},
"keys": [
{
"id": "string",
"prefix": "string",
"name": "string",
"created_at": "string",
"revoked": false,
"revoked_at": "string"
}
]
}
Errors
401unauthorized: The API key is missing, malformed, revoked or unknown.429rate_limited: Too many requests for this API key.