Account API

Provision keys, groups, budgets and customer plans with a provisioning key.

Provisioning keys

A provisioning key is an xpl_ key with the is_provisioning flag. It does everything an inference key does, plus everything an org admin can do on groups (identities), model access, budgets, keys, members, guardrails, spend alerts and named aliases, and the per-key usage routes on this page. An inference key gets 403 ("A provisioning key is required for this action") on all of them, reads included. How groups, budgets and keys fit together: Groups, budgets and model access. Only an org admin can create the first one, in the dashboard (the keys list marks it Provisioning); it can then mint further keys over the API. Keep it server-side and do not serve inference with it.

RuleDetail
Path org_idMust be the key's own org (GET /api/whoami); another org answers 404
Business refusal{"error": ...}
Bad request shape{"detail": [{"loc", "msg", "type"}]}; detail[0].loc[-1] names the field
AuditEvery write is logged with the key as the actor (actor_kind = api_key)
GET/api/whoami
curl https://api.experientiallabs.ai/api/whoami \
  -H "Authorization: Bearer <YOUR_API_KEY>"
# {"org_id": "...", "identity_id": null, "customer_plan_identity_id": null, "is_provisioning": true, ...}

Plan usage

GET /api/v1/credits answers how much you have left, with any xpl_ key: your credit balance and, in data.plan, what your plan still covers before usage draws from it. A key reads only its own organization. total_credits and total_usage keep their OpenRouter-compatible shape; plan is additive.

FieldMeaning
plan.tierfree, pro, max or ultra
plan.allowancePaid plans: the free-model allowance in credits (1 credit = 1 cent). today is the limit that applies and resets at 00:00 UTC; billing_cycle is the plan's monthly amount over your billing period, for reference. Each has used_credits, limit_credits, remaining_credits, resets_at. null on Free
plan.included_modelsPaid plans: models your plan includes (slug, name), each with token windows (5h, day, week, month) of used_tokens, limit_tokens, remaining_tokens, resets_at. Empty when none
plan.free_coreFree plan, while the Free core models serve your account: models, today (shared input + output tokens, resets 00:00 UTC) and continue_on_credits. null otherwise
plan.retiring_benefitsPlan benefits new subscribers no longer get that your account keeps on its plan until a date: each with slug, name, plan, percent_off (100 = free) and ends_at (when you lose it). Empty when none
plan: nullThe plan read is temporarily unavailable. The balance still answers; retry shortly

Past your plan allowance, usage draws from your credit balance at list price. With Keep going on credits off (Credits page), models your plan makes free pause until the reset instead.

GET/api/v1/credits
curl https://api.experientiallabs.ai/api/v1/credits \
  -H "Authorization: Bearer <YOUR_API_KEY>"
{
  "data": {
    "total_credits": 45,
    "total_usage": 12.5,
    "plan": {
      "tier": "pro",
      "allowance": {
        "today": {"used_credits": 150, "limit_credits": 700, "remaining_credits": 550, "resets_at": "2026-11-22T00:00:00Z"},
        "billing_cycle": {"used_credits": 1200, "limit_credits": 2000, "remaining_credits": 800, "resets_at": "2026-12-03T00:00:00Z"}
      },
      "included_models": [],
      "free_core": null,
      "retiring_benefits": []
    }
  }
}

Manage keys

The {hash} in the path is the key's hash field (its row id from list or create), never the secret. The plaintext key is returned once, at creation. identity_id must be an active group of your org (404 unknown, 409 disabled); omitted, the default group is used. provisioning: true mints another provisioning key. disabled: true revokes for good. On list objects usage is null: read spend from GET /api/v1/key (the presented key) or GET /api/v1/usage.

FieldOn createOn PATCH
limit, limit_resetUSD per UTC window (daily by default, weekly, monthly, yearly); creates a shared budget named after the key, reported as budget_idChanges the key's budget when the key is its only member (409 budget_shared when other keys share it: change the budget itself); limit: null detaches the key
identity_idThe key's groupMoves the key to another group
budget_idDraw from an existing shared budget (not with limit)Attach to a shared budget; null detaches
identity, budget, rate_limits, ip_rules, expires_in_daysSame as POST /api/orgs/{org_id}/keys: a new group, a new budget, rate windows, IP rules, expiryUse PATCH /api/orgs/{org_id}/keys/{key_id}
POST/api/v1/keysGET/api/v1/keysPATCH/api/v1/keys/{hash}DELETE/api/v1/keys/{hash}
curl https://api.experientiallabs.ai/api/v1/keys \
  -H "Authorization: Bearer <YOUR_API_KEY>" \
  -H "Content-Type: application/json" \
  -d '{"name": "cust_8842", "limit": 25, "limit_reset": "monthly"}'
# {"data": {"hash": "<id>", ...}, "key": "xpl_..."}

Identities and budgets

An identity is what the dashboard calls a group: a named spend bucket (coding, product, a customer). Every key hangs off one, so usage rolls up per identity; groups nest, and a monthly budget can cap a group, the organization or a model, while a shared budget caps any set of keys. The full model and recipes: Groups, budgets and model access. identity_id starts with a letter, then lowercase letters or digits in groups joined by ., - or _; it never starts with org- and is unique across the platform: a taken id answers 409 identity_id_unavailable with details.suggested_id (reuse it if it is in your own list). limit_nano_usd is integer nano-USD ($1 = 1,000,000,000); 0 is a hard $0 cap, and deleting the budget lifts it. period is "*" (every month) or one YYYY-MM; reads take a month.

POST/api/orgs/{org_id}/identitiesPATCH/api/orgs/{org_id}/identities/{identity_id}POST/api/orgs/{org_id}/keysPUT/api/orgs/{org_id}/budgetsDELETE/api/orgs/{org_id}/budgets/{budget_id}
curl -X PUT https://api.experientiallabs.ai/api/orgs/ORG_ID/budgets \
  -H "Authorization: Bearer <YOUR_API_KEY>" \
  -H "Content-Type: application/json" \
  -d '{"period": "*", "scope_kind": "identity", "identity_id": "acme-support",
       "limit_nano_usd": 50000000000}'

Spend per key and per identity

Both are live summaries (report_kind: "live_usage_summary"), not frozen reports: USD display fields plus exact decimal-string paid_nano_usd, byok_nano_usd, free_nano_usd and spend_nano_usd. Unknown usage is not reported, not zero. Only keys with traffic in the window are listed; the row with identity_id: null is traffic of deleted keys. A read over 10,000 key and model cells or 32 MiB answers 422 usage_summary_too_large: use the Spend API.

GET/api/orgs/{org_id}/usage/by-keyGET/api/orgs/{org_id}/usage/by-identity
curl "https://api.experientiallabs.ai/api/orgs/ORG_ID/usage/by-identity?window=30d" \
  -H "Authorization: Bearer <YOUR_API_KEY>"

Customer plans

A customer plan caps what one identity (your end customer) may spend per period, per group of models and in total, separately from your own Free or Pro plan. All keys of the identity share it, including rotated keys; request labels such as safety_identifier or metadata.plan never grant access. Admins author model groups and plans and delegate plans to a provisioning key with a signed-in session; a delegated key may assign only those plans. Plans and groups are immutable versions. Where enforcement is not enabled, assignment answers 409 customer_plans_inactive.

SettingBehavior
aggregate_limit_nano_usdShared cap across the identity's groups; null means none, 0 denies
Group limit_nano_usd0 is a hard zero; both limits must admit a request
on_exhausteddeny (default), or next_model to move on along the server's model chain
effectivenext_month (default) or immediate; counters carry across revisions
budget_period{"kind": "calendar_month_utc"} (default) or an explicit [start, end) source period, which needs immediate

A plan-bound inference key cannot provision identities or keys, change plans, read the org balance, or change BYOK, provider policy or prompt capture; its usage reads stay scoped to its identity. To onboard a customer, create the identity, assign its plan, then mint its keys. Revoke every key of an identity before removing its plan (dashboard only).

PUT/api/orgs/{org_id}/identities/{identity_id}/customer-planGET/api/orgs/{org_id}/identities/{identity_id}/allowances
curl -X PUT https://api.experientiallabs.ai/api/orgs/ORG_ID/identities/acme-support/customer-plan \
  -H "Authorization: Bearer <YOUR_API_KEY>" \
  -H "Content-Type: application/json" \
  -d '{"plan_key": "starter", "plan_version": 2, "expected_revision": 0, "effective": "next_month"}'
# 409 on a stale expected_revision: read GET .../customer-plan and retry

Read the counters with Customer-plan allowances.

A key per end customer

Instead of tagging requests with safety_identifier (one key, a label per request; see Resellers), mint one inference key per end customer: usage is isolated per key, each can be revoked alone, and each carries its own spend cap. The two combine.

One key + safety_identifierKey per customer
SetupNoneMint and store a key each
Revoke one customerNot per keyDELETE /api/v1/keys/{hash}
Spend cap per customerBudgets per identitylimit on the key (its own shared budget)