API reference
Account
Returns the paying account behind the API key. For team members this is the team owner, whose credits the key spends.
GET/v1/account
Scope: readReturns 200
Plan, balance, limits (including any raise for this account), how many API jobs are running right now, and the calling key’s own settings. Use it to show a balance in your product, check entitlement, or pace a batch against limits.concurrent_jobs − usage_now.active_jobs.
No parameters
Errors
| Code | When |
|---|---|
PLAN_REQUIRED | The paying account is no longer on Influencer or Agency. |
ACCOUNT_SUSPENDED | The account is suspended. |
Request
curl https://api.oriorai.com/v1/account \
-H "Authorization: Bearer $ORIOR_API_KEY"const response = await fetch('https://api.oriorai.com/v1/account', {
headers: {
Authorization: `Bearer ${process.env.ORIOR_API_KEY}`,
},
})
const data = await response.json()
if (!response.ok) throw new Error(`${data.error.code}: ${data.error.message}`)import os
import requests
response = requests.get(
"https://api.oriorai.com/v1/account",
headers={"Authorization": f"Bearer {os.environ['ORIOR_API_KEY']}"},
timeout=60,
)
response.raise_for_status()
data = response.json()Response · 200
Response
{
"object": "account",
"plan": "agency",
"credits": {
"total": 1240,
"subscription": 750,
"purchased": 490
},
"pricing": {
"api_credit_multiplier": 2
},
"limits": {
"requests_per_minute": 240,
"concurrent_jobs": 20,
"images_per_minute": 10,
"api_keys": 20,
"webhooks": 20,
"included_social_accounts": 15
},
"usage_now": {
"active_jobs": 3
},
"key": {
"id": "key_8Hq2Lw0Pz4Nc1Xy7",
"prefix": "orior_live_AbC1",
"scopes": [
"generate",
"social",
"read",
"webhooks"
],
"monthly_credit_cap": 5000
},
"team_billing": false
}