https://syvon.ai/api/*.
Account
portal.account() → Account
GET /api/user/account — the authenticated user.
Workspaces
portal.listWorkspaces() → WorkspaceListItem[]
GET /api/workspaces — membership-scoped. Non-enterprise users see only their active workspace; the synthetic catalog workspace is surfaced to admins.
portal.getWorkspace(id) → Workspace
GET /api/workspaces/:id — must be a member. The server returns { workspace }; the SDK unwraps it.
portal.createWorkspace(name) → creation result
POST /api/workspaces — create and activate an empty workspace. Plan-gated: 402 over limit. Body { name }. Returns the new workspace including its prefix.
portal.updateWorkspace(id, input) → Workspace
PATCH /api/workspaces/:id — owner/admin only.
portal.deleteWorkspace(id) → { deleted: boolean }
DELETE /api/workspaces/:id — owner/admin only. Permanent: deletes every R2 object under the workspace prefix and all database rows. There is no undo.
portal.activateWorkspace(id) → unknown
POST /api/workspaces/:id/activate — set as the caller’s active workspace.
Members
portal.listMembers(workspaceId) → WorkspaceMember[]
GET /api/workspaces/:id/members — must be a member. User details (email, name, image) are joined from the core database.
Brands
portal.listBrands(workspaceId) → CloudBrand[]
GET /api/workspaces/:id/brands — database-authoritative brand list. palette and fontFamily are best-effort reads of the free-form brand visual JSON.
API keys
portal.listApiKeys(workspaceId) → ApiKeyMetadata[]
GET /api/workspaces/:id/keys — metadata only. Raw keys are never returned.
portal.mintApiKey(workspaceId, { name, rateLimit? }) → MintedApiKey
POST /api/workspaces/:id/keys — owner/admin plus a multi-workspace plan (otherwise 402, code API_KEYS_NOT_AVAILABLE). Returns the raw key once.
portal.revokeApiKey(workspaceId, keyId) → unknown
DELETE /api/workspaces/:id/keys/:keyId — revoke a key.
Credits
Credits fund AI generation (renders, voice, LLM) across the platform. The balance is per account, not per workspace, and is reported in both credits and USD cents.portal.creditBalance() → CreditBalance
GET /api/credits/balance.
held = credits locked by in-flight operations. available = total - held.
portal.creditHistory(params?) → CreditHistory
GET /api/credits/history?limit=&offset=&type=.
amountCredits is signed: positive = grant or top-up, negative = spend. refType is the spend category (render, voice, llm, topup, …).
Workflows / flows
portal.listFlows(workspaceId) → WorkflowSummary[]
GET /api/workspaces/:id/flows.
Files
portal.listFiles(workspaceId, prefix?) → { key, size?, mimeType? }[]
GET /api/workspaces/:id/files?prefix= — the workspace’s file index, with workspace-relative R2 keys. To read a file’s bytes, use brain.streamR2File.