Every method of @dtelecom/server-sdk-js 4.x on one page.
The Cloud API is available in @dtelecom/server-sdk-js 4.2.1 and later. Version 4.4.0 adds ranked signaling URLs and supports Node.js 20.18.0 and later. The quickstart uses Node.js 22. The source is on GitHub, in the default branch v4.
Go has its own server SDK, dTelecom/server-sdk-go v1.3.0, package github.com/dtelecom/server-sdk-go/cloud. When the Go process joins a room, pass the token response’s FallbackURLs to ConnectToRoomWithToken. Go room example
From other languages, use the HTTP API that this SDK wraps and the OpenAPI specification at https://cloud.dtelecom.org/v1/openapi.json.
Adds time to a session. additional is seconds or a string such as '30m'. Call it before expiresAt: a participant whose token expired is removed about a minute later, and after that the call throws 409 session_not_extendable. Keeps the name, metadata, grants and webhook URLs.
cloud.adminToken(room)
{ token, apiUrls, expiresAt }
10-minute room admin token and the nodes hosting the room. Used internally by roomService().
cloud.getSession(sessionId)
SessionCharge
A session of the project (a participant or a service session) and its charge in chargedMicrocredits and chargedUsd. The charge is set when the session ends: check final.
cloud.listSessions(room, { since?, limit? })
{ sessions, totalMicrocredits, totalUsd }
A room’s participant sessions and the service sessions linked to them, newest first. Pass since for one call when a room name is reused. HTTP API
Forward token, wsUrl and fallbackUrls to the client. The list starts with wsUrl and preserves Cloud’s preferred order. When a response omits the list, SDK 4.4.0 returns [wsUrl]. After Cloud records a participant on an alternate node, extendToken returns that node first. The browser connection example uses the same token for each candidate.
The SDK has no client for the streaming protocols. For streaming from JavaScript use DtelecomSTT and DtelecomTTS from @dtelecom/agents-js/providers; they work without a voice agent too.
{ id, kind, status, chargedMicrocredits, result? }, status is 'running' or 'completed'. A failed request throws CloudApiError.
Job (TranscriptionJob, WavJob)
{ id, status, result?, error? }, status is 'uploading', 'queued', 'running', 'completed', 'failed', 'cancelled' or 'deleted'.
Durations
A number of seconds, or a string with a unit: '90s', '30m', '12h', '1d'. From 1 minute to 24 hours, rounded up to whole minutes: '90s' becomes 2 minutes. ttl in createToken defaults to 6 hours.
Responses are camelCase and use Date for times. Charges are microcredits as decimal strings.