Your server starts the session with your key. The browser joins with a short-lived token that works for that one session. When the conversation ends, a signed webhook tells your server how it went.
const session = await joinSession(data, { video })→ the avatar plays in your <video>, with the transcript
3 · your webhook
POST /hooks/zentiq X-Zentiq-Event: session.ended→ { "sessionId": "sess_…", "durationSeconds": 412 }
Base URL
https://app.zentiqai.com/v1
Keys
zq_live_…, with scopes
Browser SDK
@zentiq/client
Plans
Monthly and Pay as you go
From key to conversation.
01 · Make a key
In the console, open API Keys and make one. It starts with zq_live_ and you see it once, so put it in an environment variable on your server. Give it only what it needs: a preset like Website assistant, or single scopes such as sessions:write.
# Returns your organization and what this key may docurlhttps://app.zentiqai.com/v1/me \ -H "Authorization: Bearer $ZENTIQ_API_KEY"
02 · Start the session on your server
Send POST /v1/sessions/tokens with a personaId. Back comes a short-lived sessionToken, the url to join and the persona's name. Getting an avatar ready can take up to a minute, so give the request a long timeout.
The answer also carries disclosure. Show its text for the whole session. required is always true.
You can also pass identity (your own user id), language, and overrides for a different prompt, greeting or {{variables}} in this one session.
server.ts
// On your server. The key never reaches the browser.const res = await fetch("https://app.zentiqai.com/v1/sessions/tokens", { method: "POST", headers: { Authorization: `Bearer ${process.env.ZENTIQ_API_KEY}`,"Content-Type": "application/json", }, body: JSON.stringify({ personaId: "pa_…", identity: "user_42" }),});const { data } = await res.json();// Send `data` to the browser.
response.json
{"data": {"sessionId": "sess_…","sessionToken": "…", // short-lived, this session only"url": "…", // the WebRTC address"room": "…","persona": { "id": "pa_…", "name": "Emma" },"cc": true,"disclosure": {"required": true,"text": "You're speaking with an AI avatar." } },"error": null,"requestId": "…"}
03 · Join from the browser
Give @zentiq/client the whole answer from step 2. It plays the avatar in a video element and tells you what's said and who's talking. In a duo, each line comes with the speaker's name.
It's on npm as @zentiq/client. Underneath it's plain WebRTC, so your own client can join the url with the token.
browser.ts
import { joinSession } from"@zentiq/client";// `data` from your serverconst token = await fetch("/api/zentiq-session", { method: "POST" }).then((r) => r.json());if (token.disclosure?.required) banner.textContent = token.disclosure.text;const session = await joinSession(token, { video: document.querySelector("#avatar"), onTranscript: (t) => console.log(t.role, t.text, t.final), onSpeaking: (who) => console.log(who), // "avatar" | "user" | "none"});// Leaves the room. Your server ends the session: POST /v1/sessions/{id}/endsession.end();
The API comes with the plan.
It's included with Monthly and Pay as you go. It isn't on Free. A session you start with the API counts the same as one started in the console.
Talking isn't counted. Each live session takes one of your sessions, so add sessions for more people at once. A conversation runs for up to 60 minutes; after that, start another.
Pay as you go
Each minute uses a credit, 10¢ a minute, down to 5¢ the more you buy. Credits never expire. Run as many conversations at once as you like.
The rest of the API.
JSON in and out, prefixed ids, one error format. The reference has every call and an OpenAPI file.
Personas
Who your users talk to: face, voice, personality, greeting.
/personas/personas/{id}
Avatars
The built-in cast, or a face from your own image, with the consent of the person in it.
/avatars/avatars/{id}/preview
Voices
Studio voices, or a cloned voice with permission. Every voice speaks every supported language.
/voices/languages
Knowledge
Files, web pages or plain text the avatar answers from. Searchable.
/knowledge/bases/knowledge/bases/{id}/search
Live sessions
Start one, steer it while it runs, have the avatar say exact words, end it.
/sessions/tokens/sessions/{id}/say
Transcripts
Every turn, the duration, talk share, and the report's summary and score when there is one.
/sessions/{id}/transcript/sessions/{id}/analytics
Webhooks
Signed events to your server, and a log of every delivery.
/webhooks/webhooks/deliveries
Usage and keys
What you've used, and keys that carry only the scopes they need.
/usage/keys
Portals
Build one from a template and publish it. To sign your own users in, your backend asks for a five-minute, single-use embed token after your sign-in, and the portal opens in an iframe as that user.
/portals/portals/{id}/embed-tokens
Setup
Describe the job in a sentence. You get back the right template, a name and who it's for.
/setup/plan/portals/templates
Case links, chat handoffs and more.
Each one stays off until an owner or admin switches it on for the organization. The right scope alone won't do it. Every change is in the changelog.
Case links
Your CRM or helpdesk makes a personal link about one customer's order, claim, appointment or ticket. The avatar greets them about it. Your actions get the customer's id and the case reference.
cases:write, on a key an owner or admin makes. Never through a connected app or MCP.
Your chat's server sends the conversation so far and gets back a link to one face-to-face talk with the website avatar. It opens with a recap. The outcome arrives as escalation.completed.
escalations:write. Intercom and Zendesk connect in the console instead.
An AI assistant asks a business's public website avatar one question and gets a written answer, marked aiGenerated. Same rules as a typed conversation on that page.
No key. Only for public pages the business opted in, with limits per caller, page and organization.
The address comes back in this answer and nowhere else, so send it by email or text right away. We keep a hash of the link, not the link. The case details are never in the address. When the customer starts talking from it,case_link.opened tells your system.
case-link.ts
// Your CRM, on your server, with a cases:write keyconst res = await fetch(`https://app.zentiqai.com/v1/portals/${portalId}/case-links`, { method: "POST", headers: { Authorization: `Bearer ${process.env.ZENTIQ_CASES_KEY}`,"Content-Type": "application/json","Idempotency-Key": `case-link-${ticket.id}`, }, body: JSON.stringify({ customerId: "cus_4821", reference: "10423", kind: "order", firstName: "Sam", summary: "Out for delivery, due Tuesday.", }),});const { data } = await res.json(); // data.url: email or text it now
Hear about it when it happens.
Register a URL with POST /v1/webhooks and pick events, or "*" for all of them. Each delivery is signed with your secret. If your server doesn't answer, we try again later.
A candidate's events never carry names, contact details, answers, scores or transcripts. The reference lists every event.
session.ended.json
// POST to your URL, with X-Zentiq-Event: session.ended{"id": "evt_…","type": "session.ended","apiVersion": "2026-10-01","organizationId": "org_…","createdAt": "2026-10-01T14:05:12.000Z","data": {"sessionId": "sess_…","personaId": "pa_…","durationSeconds": 412,"billedMinutes": 7 }}
verify.ts
// Check it came from us (Node)const expected = "sha256=" + crypto .createHmac("sha256", WEBHOOK_SECRET) .update(`${req.headers["x-zentiq-timestamp"]}.${rawBody}`) .digest("hex");// Compare with X-Zentiq-Signature. Turn away old timestamps.
Every avatar is shown as an AI.
Europe's AI Act (Article 50) says people must be told when they're talking to an AI. On our own pages and in the website widget, an AI label stays on screen and a notice opens every conversation. In your app the screen is yours, so every session you start tells you what to show. Ask the avatar and it says it's an AI.
01Read it from the sessionEvery POST /v1/sessions/tokens answer has disclosure, with the persona's own wording in text.
02Keep it on screenShow it while the conversation runs. required is always true. No persona can turn it off.
03It's on the recordWhat we sent is stored with the session and comes back in GET /v1/sessions/{id}/analytics.
Start your first session today.
Make a key, start a session, join it. The quickstart has every line, in Node and in the browser.