/v1/auth/registerOpen an account, with its credit account and a first API key.
PublicRUNToken GATEWAY
OpenAI-compatible model calls, plus RunToken’s own APIs for accounts, billing, channels and the model catalog.
https://api.ontosphere.aiInference and the model catalog use an API key: Authorization: Bearer rt-.... Keys issued under the interim sk- prefix keep working. A key is shown once, when it is created, and can never be read again. Revoking or disabling it takes effect on its next request. Account management uses the JWT returned by registration or sign-in. Registration and sign-in need no credential of their own, and the billing webhook is verified by the provider’s signature.
/v1/auth/registerOpen an account, with its credit account and a first API key.
Public/v1/auth/loginExchange email and password for a JWT.
Public/v1/meRead the current account: {user, orgs:[{orgId,name,role}]}.
/v1/keys?orgId=…List personal API keys, or an organization’s with orgId.
/v1/keysCreate keys with {name, orgId?, expiresAt?, monthlyQuotaCredits?, allowedModels?, quantity?}. A key belongs to the personal account by default; name an organization and its usage is charged to that organization’s shared balance. allowedModels takes exact catalog model ids and vendor/* wildcards (omit it, or pass ["*"], for every model); any other model is refused with 403 model_not_allowed. A quantity above one returns {data:[…]}. This response is the only time a key’s secret is shown.
/v1/keys/:idRename, disable or re-enable a key, or change its expiry, quota or allowed models.
JWT/v1/keys/:idRevoke one of the caller’s API keys.
JWTEvery user has a personal account. Organizations are optional: members share the organization’s own balance, quota, usage and invoices. Without an orgId, keys and billing act on the personal account.
/v1/orgsCreate an organization with {name}; the creator becomes its owner.
/v1/orgsList the organizations the caller belongs to, with their role.
JWT/v1/orgs/:orgId/membersList an organization’s members; the caller must be one.
JWT/v1/orgs/:orgId/membersAdd an existing user with {email, role}; owner or admin only.
/v1/modelsList the enabled models this key may call, their providers and customer prices.
API Key/v1/catalogThe same catalog for a signed-in session, which the console browses.
JWT/v1/chat/completionsCreate an OpenAI-style chat completion, streaming over SSE if asked.
API Key/v1/billing/topupCreate a top-up intent with {amount, currency?, orgId?}; the personal account by default.
/v1/billing/webhookReceive the billing provider’s callback.
Signature/v1/billing/balance?orgId=…Read the personal balance. A JWT may pass orgId for an organization’s; an organization’s API key reads its own.
/v1/billing/usage?from=…&to=…&orgId=…Summarize usage over a period, for the personal account or an organization.
JWT/v1/billing/invoices?orgId=…List invoices, personal or for an organization.
JWT/v1/billing/invoicesGenerate an invoice for a period with {from, to, orgId?}.
Apply to become a reseller; a RunToken administrator approves the application and sets the commission rate, a share of RunToken’s markup on referred usage. A user is attributed to a reseller when their account is created: pass referralCode to /v1/auth/register, or start Google sign-in at /v1/auth/google/start?ref=CODE. Attribution is permanent, and a reseller never earns commission on their own usage.
/v1/resellersApply to become a reseller; the application starts pending.
JWT/v1/resellers/referralsCreate a referral code (approved resellers): 4–32 letters, digits, - or _, unique regardless of case.
/v1/resellers/referralsList the caller’s codes and how many users each referred.
JWT/v1/resellers/commissionsList accrued or paid commissions.
JWT/v1/resellers/summaryStatus, rate, referred users and commission totals.
JWT/v1/admin/resellers?status=…List resellers with their referrals and commission.
Platform-admin JWT/v1/admin/resellers/:resellerIdApprove, suspend or reject, and set the rate: {status?, commissionPct?}.
/v1/admin/resellers/:resellerId/payoutsRecord that the accrued commission was paid: Idempotency-Key header, {amountCredits, reference?}.
/v1/admin/resellers/:resellerId/payoutsList a reseller’s payouts and who recorded them.
Platform-admin JWTEvery /v1/admin/* endpoint requires a platform-admin JWT. A user becomes isPlatformAdmin through PLATFORM_ADMIN_EMAILS.
/v1/admin/providersCreate a provider.
Platform-admin JWT/v1/admin/providersList providers.
Platform-admin JWT/v1/admin/providersUpdate a provider.
Platform-admin JWT/v1/admin/modelsCreate a model.
Platform-admin JWT/v1/admin/modelsList models.
Platform-admin JWT/v1/admin/modelsUpdate a model.
Platform-admin JWT/v1/admin/models/:id/deploymentsAttach a provider deployment to a model.
Platform-admin JWT/v1/admin/models/:id/deploymentsList a model’s deployments.
Platform-admin JWT/v1/admin/models/:id/pricingAdd a pricing period for a model.
Platform-admin JWT/v1/admin/models/:id/pricingList a model’s pricing periods.
Platform-admin JWT/v1/admin/users?limit=…&offset=…&q=…Search and paginate platform users.
Platform-admin JWT/v1/admin/users/:userIdSet a user’s status: {status:"active"|"suspended"}.
/v1/admin/users/:userId/creditsAdjust a user’s credits: {amount, reason?}.
/v1/admin/orgsList every organization.
Platform-admin JWT/v1/admin/orgs/:orgIdEnable or disable an organization: {status:"active"|"disabled"}. A disabled organization’s keys are refused and it cannot be managed.
/v1/admin/orgs/:orgId/creditsAdjust an organization’s shared credits: {amount, reason?}.
/v1/admin/stats?days=…Platform statistics over a number of days.
Platform-admin JWT/v1/admin/invoices?status=…List invoices, optionally filtered by status.
Platform-admin JWT/v1/admin/receivablesReceivables, totalled per user.
Platform-admin JWT