Namespaces
Beyond chat, streaming,
realtime, and RAG, the client exposes several
more namespaces. Each is lazily initialized — accessing client.user, for
example, constructs that namespace on first use.
client.user — the signed-in user’s account surface.
| Sub-namespace | Methods | Purpose |
|---|---|---|
user.balance | get() | Current wallet balance. |
user.payment | listMethods(), deposit(body), getTransactions(range?) | Payment methods and history. |
user.preferences.audio | get(), update(prefs) | Audio tool preferences. |
user.savedReleases | get(), add(releaseId), remove(releaseId) | Bookmarked Releases. |
const balance = await client.user.balance.get();await client.user.savedReleases.add("rel_abc123");API keys
Section titled “API keys”client.apiKeys — manage workspace-scoped API keys from the client.
create(params, body), list(params?), get(params), update(params, body),
delete(params), rotate(params), listUsers(params).
const created = await client.apiKeys.create({ workspaceId: "ws_123" }, { name: "CI key" });BYOK (bring your own key)
Section titled “BYOK (bring your own key)”client.byok — register and rotate your own model-provider credentials.
create(params, body), list(params?), get(params), updateMeta(params, body),
rotate(params, body), delete(params).
client.audio — upload and manage audio transcripts, and turn them into RAG or
fine-tune material.
Top-level: upload, uploadFromUrl, list, get, update, generateRagFile,
generateFineTuneFile, delete. Plus audio.voiceprints and audio.bulk
sub-namespaces.
const transcript = await client.audio.uploadFromUrl( { workspaceId: "ws_123" }, { url: "https://example.com/call.mp3" },);client.arena — model A/B comparison. Enable/disable, fetch results, select
chat/transcript variants, regenerate a variant, run tests, and estimate cost.
Presets live under client.arena.presets. See the
server Arena page for the full conceptual model.
Fine-tune
Section titled “Fine-tune”client.fineTune — create and manage fine-tunes and their training files from
the client. create, list, get, update, fork, delete, plus
fineTune.files (upload, list, get, getContents, delete).
Style patterns
Section titled “Style patterns”client.stylePattern — manage tone/style rewrite rules: list active and proposed
rules, test a rewrite, approve/reject proposals, toggle rules, and read the audit
log.
Notifications
Section titled “Notifications”client.notifications — per-workspace notification feed.
list, get, markAsRead, setTags, getCounts, getTags, plus
sub-namespaces: notes(...) for annotation, channels(...) for email/webhook
delivery, triggers(...) for tag-routing rules, and flaggers(...) for
custom LLM-driven notifications.
const counts = await client.notifications.getCounts({ workspaceId: "ws_123" });See Notifications, Analytics & Metrics for the full custom-notification pipeline (flagger → trigger → channel), product analytics, and pipeline-metrics alerting.
Analytics & Metrics
Section titled “Analytics & Metrics”client.analytics — product analytics (metrics, trends, experiments, funnel,
trackEvents ingestion). client.metrics — pipeline telemetry + custom alert
configs. Both documented on the
observability page.
Public / gated chat
Section titled “Public / gated chat”Two namespaces power unauthenticated, gated chat experiences:
client.homepageChat— Turnstile-gated email verification then send:verifyEmail(email, turnstileToken),confirmEmail(email, code),send(prompt).client.freeChatGate— the configurable free-chat gate (captcha / OTP / magic-link) with language support:start(args),verifyOtp(args),state(),send(prompt),submitFeedback(...), plus token and transcript helpers.
These back the Embed script and Divinci’s own landing pages.