synth_ai.research.account
client.research.account — org account, billing, usage, and BYOK reads.
These backend routes live under /api/v1 (and /api/members), not under
/smr, so this namespace calls them through the session client’s internal
_request_json layer, which applies the same base URL and
Authorization: Bearer <api_key> header as every other SDK call.
Mutations are limited to BYOK key management and subscription.cancel.
Classes
AccountBalance
Typed BalanceResponse (org_id, balance_cents, balance_dollars).
Methods:
from_wire
AccountTierLimits
Typed TierLimitsResponse (tier name plus its limits payload).
Methods:
from_wire
AccountByokStatus
Typed BYOK status (byok_enabled, plan_type, provider key coverage).
Methods:
from_wire
AccountReadinessCta
Typed AccountReadinessCta (call-to-action for a failing check).
Methods:
from_wire
AccountReadinessCheck
Typed AccountReadinessCheck (one readiness gate with optional CTA).
Methods:
from_wire
AccountReadiness
Typed AccountReadinessResponse (org-level launch readiness with CTAs).
Methods:
from_wire
AccountIdentity
Typed MeResponse (org and user resolution for the API key).
Methods:
from_wire
ResearchAccountBalanceAPI
Org credit balance and usage summary.
Methods:
get
GET /api/v1/balance/current.
usage
GET /api/v1/balance/usage.
ResearchAccountCreditsAPI
Credits ledger reads.
Methods:
transactions
GET /api/v1/credits/transactions (query cursor, limit).
ResearchAccountTiersAPI
Default rate limits per subscription tier.
Methods:
list
GET /api/v1/usage/tiers.
get
GET /api/v1/usage/tiers/{tier}.
ResearchAccountByokAPI
Bring-your-own-key provider key management.
Methods:
list
GET /api/v1/byok/keys.
create
crypto.public_key).
Backend route: POST /api/v1/byok/keys.
get
GET /api/v1/byok/keys/{provider}.
delete
DELETE /api/v1/byok/keys/{provider}.
validate
POST /api/v1/byok/keys/{provider}/validate.
status
GET /api/v1/byok/status.
ApiKeyRedactedRow
Typed redacted key row (prefix + last4 only; never the secret).
Methods:
from_wire
MintedApiKey
ONE-TIME mint/rotate result.
key is the full sk_synth_user_... secret and is shown exactly
once — the backend never returns it again (listings are redacted).
Store it immediately; treat this object as sensitive material.
Methods:
from_wire
ApiKeyDeactivated
Typed delete result (soft deactivation; the row is kept inactive).
Methods:
from_wire
ResearchAccountKeysAPI
Synth API-key lifecycle (list redacted, mint, rotate, deactivate).
Requires backend routes /api/v1/auth/keys (backend PR
feat/api-key-lifecycle-routes-20260720); the caller’s API key is the
principal, and every operation is scoped to that key’s (user, org).
Methods:
list
GET /api/v1/auth/keys.
create
POST /api/v1/auth/keys. Returns 409 if an active
key already exists (use :meth:rotate). name is refused by the
backend today (no name column); pass it only once naming ships.
rotate
key_id and mint a replacement.
The old secret stops validating within the backend auth-cache TTL.
Backend route: POST /api/v1/auth/keys/{key_id}/rotate. The new
secret is returned exactly once.
delete
key_id (soft delete; the backend keeps the row inactive).
Backend route: DELETE /api/v1/auth/keys/{key_id}.
ResearchAccountMembersAPI
Org member listing.
Methods:
list
GET /api/members (mounted with the /api prefix,
not /api/v1; query limit, offset).
ResearchAccountSubscriptionAPI
Subscription lifecycle (cancel only).
Methods:
cancel
POST /api/v1/subscription/cancel.
ResearchAccountCryptoAPI
Public-key material for client-side key encryption.
Methods:
public_key
GET /api/v1/crypto/public-key.
ResearchAccountAPI
Org account namespace: balance, credits, usage, BYOK, members, identity.
Methods:
balance
credits
tiers
byok
keys
members
subscription
crypto
usage
GET /api/v1/usage.
user_limits
GET /api/v1/usage/user-limits.
overview
GET /api/v1/usage/overview (query days 1-365,
include_projects).
readiness
GET /api/v1/account/readiness.
me
GET /api/v1/me.