Account API
curl --request GET \
--url https://api.apisale.ai/v1/account \
--header 'Authorization: <api-key>'import requests
url = "https://api.apisale.ai/v1/account"
headers = {"Authorization": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: '<api-key>'}};
fetch('https://api.apisale.ai/v1/account', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"organization_id": "<string>",
"api_key_id": "<string>",
"environment": "<string>",
"identity": {},
"identity.organization": {},
"identity.api_key": {},
"identity.customer": {},
"wallet": {},
"wallet.balance_usd": "<string>",
"wallet.reserved_usd": "<string>",
"wallet.available_usd": "<string>",
"wallet.total_spent_usd": "<string>",
"concurrency": {},
"concurrency.limit": 123,
"concurrency.in_flight": 123,
"concurrency.available": 123,
"concurrency.tier": "<string>",
"api_key_concurrency": {},
"rate_limit": {}
}Get Started
Account API
Query wallet, identity, and concurrency with your API key — same key as inference.
GET
/
v1
/
account
Account API
curl --request GET \
--url https://api.apisale.ai/v1/account \
--header 'Authorization: <api-key>'import requests
url = "https://api.apisale.ai/v1/account"
headers = {"Authorization": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: '<api-key>'}};
fetch('https://api.apisale.ai/v1/account', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"organization_id": "<string>",
"api_key_id": "<string>",
"environment": "<string>",
"identity": {},
"identity.organization": {},
"identity.api_key": {},
"identity.customer": {},
"wallet": {},
"wallet.balance_usd": "<string>",
"wallet.reserved_usd": "<string>",
"wallet.available_usd": "<string>",
"wallet.total_spent_usd": "<string>",
"concurrency": {},
"concurrency.limit": 123,
"concurrency.in_flight": 123,
"concurrency.available": 123,
"concurrency.tier": "<string>",
"api_key_concurrency": {},
"rate_limit": {}
}Use
OpenAI / Gemini SDKs may use
GET /v1/account from production workers, autoscaling, or dashboards. Authenticate with the same API key you use for POST /v1/run/....
This is the only account endpoint you need for server integrations. No Console login or JWT required.
Authentication
Authorization: Key sk-xxxxxxxx
Bearer with the same key value.
In the Try it playground, paste your key — Mintlify adds the Key prefix automatically.
GET /v1/account
Response fields
string
required
Organization that owns this API key.
string
required
ID of the key used for this request.
string
required
live or test.object
required
Human-readable org / key / customer info for your integration UI.
object
required
{ id, name } — organization display name.object
{ id, name, prefix, scopes } — key metadata (secret is never returned).object
{ id, email, name } — account owner tied to the organization.object
required
USD wallet balances (strings with 6 decimal places).
string
required
Total wallet balance in USD.
string
required
Pre-held for in-flight runs.
string
required
Spendable now = balance − reserved.
string
required
Lifetime spend for this organization.
object
required
Organization-wide parallel run limits.
number
required
Max parallel runs for the org (tier-based).
number
required
Runs currently using slots.
number
required
Remaining slots before 429. Backoff when 0.
string
required
Volume tier name, e.g.
starter, scale.object
Limits for this API key only.
object
Only present when an admin has set a per-key HTTP cap. Default: unlimited.
Full example
{
"organization_id": "org_abc123",
"api_key_id": "key_xyz789",
"environment": "live",
"identity": {
"organization": { "id": "org_abc123", "name": "Acme Studio" },
"api_key": {
"id": "key_xyz789",
"name": "Production",
"prefix": "sk-a1b2c3d4",
"scopes": ["runs:read", "runs:write"]
},
"customer": {
"id": "cus_001",
"email": "you@company.com",
"name": "Jane"
}
},
"wallet": {
"balance_usd": "12.500000",
"reserved_usd": "0.800000",
"available_usd": "11.700000",
"total_spent_usd": "48.200000",
"currency": "usd"
},
"concurrency": {
"tier": "starter",
"mode": "auto",
"limit": 10,
"in_flight": 3,
"available": 7,
"utilization": 0.3,
"by_status": { "queued": 1, "processing": 2 }
},
"api_key_concurrency": {
"limit": 10,
"in_flight": 2,
"available": 8
}
}
curl
curl "https://api.apisale.ai/v1/account" \
-H "Authorization: Key $APISALE_API_KEY"
GET /v1/account/keys
Per-key concurrency for all active keys in the organization:curl "https://api.apisale.ai/v1/account/keys" \
-H "Authorization: Key $APISALE_API_KEY"
{
"api_keys": [
{
"apiKeyId": "key_xyz789",
"name": "Production",
"keyPrefix": "sk-a1b2c3",
"limit": 10,
"inFlight": 2,
"available": 8
}
]
}
When to poll
| Use case | Interval |
|---|---|
| Dashboard balance | 15–30 s |
| Before burst submit | Check wallet.available_usd and concurrency.available |
| Low balance | Top up at Console → Billing |
