Properties

account: AccountApi
apiClient: ApiClient
chat: ChatApi

Chat surfaces.

  • chat.completions.create — socket-native chat completion.
  • chat.hosted.create — hosted REST chat completion (synchronous).
  • chat.runs.{create, get, cancel, streamEvents} — durable hosted chat runs that survive client disconnect, browser close, network drop, and API worker restart. See /v1/chat/runs REST surface.
  • chat.tools.execute* — execute Sogni platform tools surfaced by the chat completion (image / video / music generation).
projects: ProjectsApi
replay: ReplayApi

Replay records (/v1/replay/records). Writes one RunRecord per chat / harness turn and exposes list + get for the replay viewer. Per-owner isolation is enforced server-side via the SDK auth identity.

stats: StatsApi

Durable creative workflows (/v1/creative-agent/workflows). Submit an explicit step sequence and follow its progress without keeping the client connected.

Accessors

Methods

  • When using cookie authentication, client has no way to detect if the user is authenticated or not. This method can be used to check if the user is authenticated and populate the currentAccount.

    Returns Promise<boolean>

  • Dispose of this client instance, disconnecting the socket and cleaning up resources. After calling this method, the instance should not be used.

    Returns void

  • Update WebSocket event subscriptions for this live client.

    This is useful when a process needs the initial model availability snapshot for startup, but does not need ongoing worker count updates afterward.

    Returns Promise<void>

  • When using token authentication, this method can be used to set the tokens. This is useful when the tokens are stored in a secure location and you want to resume the session.

    Parameters

    Returns Promise<void>