Live Streams API Beta

Let your users watch Titli hosts who are live right now, from inside your own app. You do not run hosts, wallets or payouts: your app joins with your App Key, plays the live in viewer mode, and we bill your prepaid balance per second of viewing.

Beta, available on request. Live Streams is off for every account until we switch it on, and it is rolled out account by account. Ask support (console → Support) to enable it. This page covers live video only; audio rooms are not offered yet.

Your user watches, chats and sends gifts; the host sees them in her normal live viewer list. Your app joins a live with your App Key (no backend needed) and plays it with any of our SDKs in viewer mode, and we bill your prepaid balance per second of viewing, plus the gifts your users send. A server with your API key is optional, for production hardening.

Set in your dashboard vs. set in code

SettingWhere
App Key, its bindings (package name, bundle ID, website, signing certificate) and Quick-mode capsDashboard: Console → Projects → Quick mode
Live Streams on for your accountAsk support (console → Support)
Pause Live Streams, gifts off in live streams, a lower viewer limitDashboard: Console → Live streams → Settings
Gifts on or off, gift markup and per-gift pricesDashboard: Console → Gifts (or the server-only gifts settings routes)
Daily spend cap of a projectDashboard: Console → Projects
Who watches (user id, display name)Code: init / setUser in the app, or end_user_id and name when your server joins
Webhook URL and secretDashboard: Console → Projects

Quick mode: watch a live with only your App Key

No backend needed. Your app lists the lives, joins one, plays it, chats, sends gifts and reports with the same App Key it uses for calls.

  1. Get your App Key. In the console, open Projects → Quick mode and add your app's package name, bundle ID or website. Your App Key is shown there. Live Streams must also be switched on for your account (see the note above).
  2. Install the package for your platform, from its public registry (see the Client API (Quick mode)).
  3. Init with the App Key, then list and watch. That is all: no server, no tokens.
lib/lives.dart
// Once, at app start: your App Key and your own user id. No server needed.
await TitliVideo.init(appKey: 'tak_…', userId: 'user-42', userName: 'Asha');

// Lives on air now
final lives = await TitliVideo.liveStreams.list();
final ref = lives['data'][0]['stream_ref'];

// Join and play in viewer mode (no camera or microphone prompt). The gift sheet works without a handler.
final call = await TitliVideo.liveStreams.watch(ref, onLiveEvent: (e) => debugPrint(e.type));
await Navigator.of(context).push(MaterialPageRoute(builder: (_) => TitliCallScreen(call: call)));

// Chat, gifts and report from the app
await TitliVideo.liveStreams.comment(ref, 'Hello!');
await TitliVideo.liveStreams.sendGift(ref, 'g_rose', count: 1);
await TitliVideo.liveStreams.report(ref, 'abuse');
In the app (TitliVideo.liveStreams)What it does
list()The lives on air now.
watch(ref)Joins the live for the signed-in user and plays it in viewer mode. Leaving the screen closes the viewer session and its billing.
token(ref)A fresh 10-minute viewer token for an open session (watch renews for you).
leave(ref)Ends the viewer session and its billing at once.
comments(ref), comment(ref, text)Read the chat (pass the previous cursor as after) and post a message.
sendGift(ref, giftId, count)Sends a gift to the host. The gift list is TitliVideo.gifts.list(); see Gifts in Quick mode.
report(ref, reason)Reports the live to moderation.

Each one calls the matching route below under /v1/client/live-streams with the App Key; the parameters and answers are the same as in the REST reference, the end user is always the signed-in user, and your private money figures (your cost, rates, what you keep) are left out. Viewing and gifts are billed to your prepaid balance exactly as with a server, and your Quick-mode caps (console → Projects → Quick mode) limit how much one app can spend.

Stays on your server only: your rates and free minutes (GET /v1/live-streams/pricing), stats (GET /v1/live-streams/stats) and viewer receipts (GET /v1/live-streams/viewers/:viewer_id/receipt). They carry your prices and costs, which an app must never see, so the App Key cannot reach them. Read them in the console, or with a project key from a server when you add one.

Concepts

TermMeaning
Live streamA Titli host's live video that is on air now. Only free, public lives are offered.
stream_refOpaque, stable ID of one live for your account. Another account gets a different ref for the same live. It stops resolving when the live ends.
host_refOpaque ID of the host for your account (the same reference as in Live Hosts).
End userYour user who watches, identified by your stable end_user_id. name is what the host sees in her viewer list and chat (default "Guest").
Viewer sessionOne end user watching one stream, from join to leave. A renewed token keeps the session.
RoomThe media room your app joins with livekit_url + token. The host appears as the participant ls_host. Other viewers are hidden.

Privacy: you never receive a host's phone number, Titli user ID or any contact detail. The host never sees your company name, only the display name you send. Viewers from other apps watching the same live never see your users, and you never see theirs.

Production hardening (optional): server tokens

You do not need a server to start: Quick mode works with the App Key alone. Add a server when you want strict control over every call (who joins which call, for how long, in which role): keep the project key on your server and mint a short-lived join token per person there. The app uses the same SDK and hands it a token instead of the App Key. Both ways can run side by side.

The steps below do the same as Quick mode from your server, so the key and every decision stay with you.

With a server: list lives and join as a viewer

Base URL https://api-videosdk.titliapp.com. Auth is the same as the rest of /v1: HTTP Basic key_id:key_secret, server to server only (see Authentication).

1. List the lives on air (your server)

terminal
curl -s "$API/v1/live-streams?type=video" -u "$KEY_ID:$KEY_SECRET"

2. Join one for your end user (your server)

Never put the key secret in the app.

terminal
curl -s $API/v1/live-streams/$STREAM_REF/join -u "$KEY_ID:$KEY_SECRET" -H 'Content-Type: application/json' \
  -d '{"end_user_id":"user_123","name":"Rahul"}'

The answer (201) carries livekit_url, token (valid 10 minutes) and room. Send livekit_url and token to your app.

3. Play it in the app

Use the SDK you already use. A viewer token puts the SDK in viewer mode: no camera or microphone prompt, the host's video full screen, chat and gifts as events. See SDK snippets.

4. Renew the token, then leave

Renew every few minutes while your user watches (POST …/token), and call POST …/leave when they close the screen. A user who just disappears is closed for you within about 30 seconds.

5. Listen for webhooks

stream.started, stream.ended, viewer.kicked, viewer.ended, gift.sent and gift.failed (below).

SDK snippets: viewer mode with a server token

No separate SDK or build is needed. The token decides the mode: a viewer token is subscribe-only, so the SDK never asks for the camera or microphone. In the snippets, r is your own backend's answer carrying livekitUrl and token from the join call.

watch.html
<!-- titli-call.js is the browser helper from npm (titli-video-sdk); it opens the viewer screen: no camera or microphone prompt -->
<script src="https://cdn.jsdelivr.net/npm/livekit-client@2.15.6/dist/livekit-client.umd.js"></script>
<script src="https://cdn.jsdelivr.net/npm/titli-video-sdk@0.2.0/titli-call.js"></script>
<div id="stage" style="height:80vh"></div>
<script type="module">
const r = await fetch('/api/watch', { method: 'POST', body: JSON.stringify({ streamRef }) }).then((x) => x.json());
const session = await TitliCall.join(r.livekitUrl, r.token, {
  container: '#stage',
  onLiveEvent: (e) => console.log(e.type, e), // chat, gift, host_away, host_back, viewers, ended, kicked
  onDisconnected: ({ reason }) => console.log('left', reason),
});
</script>

The console has the same snippets with your API base filled in, under Live streams → Quickstart.

REST reference

Errors use the usual shape {"error":{"code","message"}}. Money is in your billing currency (INR or USD), in major units.

These are the server routes (HTTP Basic with a project key). Your app reaches the same routes with the App Key under /v1/client/live-streams, with the same parameters, except pricing, stats and receipts, which stay server-only. Every parameter of every route is in the tables.

List lives

GET/v1/live-streams

Query: type (video; audio and all are reserved for audio rooms, which come later), limit (1–100, default 50).

ParameterTypeRequiredDefaultAllowed valuesWhat it meansExample
typestringoptional (query)allvideo, audio, allWhich lives to list. Audio rooms are not offered yet, so today only video lives come back.video
limitintegeroptional (query)501–100 (a bigger number is treated as 100)How many lives to return at most.20
FieldTypeWhat it means
dataarrayThe lives on air: stream_ref, type, title, viewers, started_at, host { host_ref, name, photo_url, age, languages }.
pausedbooleantrue while Live Streams is paused (the list is then empty).
typestring or nullThe type filter that was used (null = all).
Response
{ "data": [ { "stream_ref": "ls_8fK2…", "type": "video", "title": "Good evening!", "viewers": 41,
              "started_at": "2026-11-27T14:02:11Z",
              "host": { "host_ref": "h_3Qe…", "name": "Riya", "photo_url": "https://…", "age": 24, "languages": ["hi", "en"] } } ],
  "paused": false, "type": "video" }

viewers counts everyone watching (Titli viewers and partner viewers). paused: true means Live Streams is paused right now (by us or by Titli) and the list is empty.

Join as a viewer

POST/v1/live-streams/:stream_ref/join

Body: end_user_id (required, your stable ID, max 128 of A-Z a-z 0-9 _ . : @ -), name (optional, max 40).

ParameterTypeRequiredDefaultAllowed valuesWhat it meansExample
refstringrequired (in the path)–4–64 of <code>A-Z a-z 0-9 _ -</code>The stream_ref of the live, from the list.ls_8fK2a9
end_user_idstringrequired–1–128 of <code>A-Z a-z 0-9 _ . : @ -</code>Your stable ID for the person watching. In Quick mode the SDK fills it with the signed-in user (it must be that user).user_123
namestringoptionalGuestup to 40 characters; control characters and <code>&lt; &gt;</code> are removedThe name the host sees in her viewer list and chat. In Quick mode the SDK sends the user name you gave to init.Rahul
FieldTypeWhat it means
viewer_idstringID of the viewer session (the same one while it stays open).
tokenstringViewer token for the room, valid 10 minutes. Subscribe-only: no camera or microphone.
livekit_urlstringThe media server URL to connect to.
roomstringThe room name.
identitystringThis viewer's identity in the room.
expires_atstring (ISO time)When the token stops working. Renew it before then.
streamobjectstream_ref, status (waiting or live), type, title, host { host_ref, name, photo_url }.
giftsobjectenabled and version of the gift list: show a gift button, refresh a cached list.
Response
{ "viewer_id": "6b0c…", "token": "eyJ…", "livekit_url": "wss://…", "room": "ls_…", "identity": "lv_…",
  "expires_at": "2026-11-27T14:12:11Z",
  "stream": { "stream_ref": "ls_8fK2…", "status": "live", "type": "video", "title": "…",
              "host": { "host_ref": "…", "name": "Riya", "photo_url": "…" } } }
  • stream.status is waiting for a moment after the first viewer joins a live (we are connecting to it), then live.
  • Joining again with the same end_user_id while the session is open returns the same viewer_id and a fresh token.
  • Refused when: the account is not enabled, a kill switch is on, a limit is reached, the balance is zero (unless you have free minutes left), the end user was kicked from this live or blocked by this host, or the live is gone. See Errors.

Renew a token

POST/v1/live-streams/:stream_ref/token

Body: end_user_id. A fresh 10-minute token for an open session (same answer as join). 403 not_viewer if the session has ended.

ParameterTypeRequiredDefaultAllowed valuesWhat it meansExample
refstringrequired (in the path)–4–64 of <code>A-Z a-z 0-9 _ -</code>The stream_ref of the live, from the list.ls_8fK2a9
end_user_idstringrequired–1–128 of <code>A-Z a-z 0-9 _ . : @ -</code>Your stable ID for the person watching. In Quick mode the SDK fills it with the signed-in user (it must be that user).user_123
FieldTypeWhat it means
viewer_idstringID of the viewer session (the same one while it stays open).
tokenstringViewer token for the room, valid 10 minutes. Subscribe-only: no camera or microphone.
livekit_urlstringThe media server URL to connect to.
roomstringThe room name.
identitystringThis viewer's identity in the room.
expires_atstring (ISO time)When the token stops working. Renew it before then.
streamobjectstream_ref, status (waiting or live), type, title, host { host_ref, name, photo_url }.

Leave

POST/v1/live-streams/:stream_ref/leave

Body: end_user_id. Ends the session and its billing at once. Answer: { "ok": true, "viewer": {…} } (viewer is null if there was no open session).

ParameterTypeRequiredDefaultAllowed valuesWhat it meansExample
refstringrequired (in the path)–4–64 of <code>A-Z a-z 0-9 _ -</code>The stream_ref of the live, from the list.ls_8fK2a9
end_user_idstringrequired–1–128 of <code>A-Z a-z 0-9 _ . : @ -</code>Your stable ID for the person watching. In Quick mode the SDK fills it with the signed-in user (it must be that user).user_123
FieldTypeWhat it means
okbooleanAlways true.
viewerobject or nullThe ended viewer session (id, status, joined_at, left_at, billed_seconds, end_reason, …), or null if none was open.

Report a live

POST/v1/live-streams/:stream_ref/report

Body: end_user_id, reason (max 60, e.g. nudity, abuse, minor, spam, other), details (optional, max 1000). It lands in Titli's moderation queue. Answer: { "ok": true }.

ParameterTypeRequiredDefaultAllowed valuesWhat it meansExample
refstringrequired (in the path)–4–64 of <code>A-Z a-z 0-9 _ -</code>The stream_ref of the live, from the list.ls_8fK2a9
end_user_idstringrequired–1–128 of <code>A-Z a-z 0-9 _ . : @ -</code>Your stable ID for the person watching. In Quick mode the SDK fills it with the signed-in user (it must be that user).user_123
reasonstringrequired–up to 60 characters, for example <code>nudity</code>, <code>abuse</code>, <code>minor</code>, <code>spam</code>, <code>other</code>Why the user reports this live.abuse
detailsstringoptionalemptyup to 1000 charactersMore words from your user.Rude language in chat
FieldTypeWhat it means
okbooleanAlways true: the report is in the moderation queue.

Stats

GET/v1/live-streams/stats

Query: group (day, stream, end_user, tier), from, to (ISO, default the last 30 days), limit, format=csv.

ParameterTypeRequiredDefaultAllowed valuesWhat it meansExample
groupstringoptional (query)dayday, stream, end_user, tierWhat one row adds up.stream
fromstring (ISO time)optional (query)to minus 30 daysISO 8601 time, before <code>to</code>Start of the window.2026-11-01T00:00:00Z
tostring (ISO time)optional (query)nowISO 8601 timeEnd of the window.2026-11-30T00:00:00Z
limitintegeroptional (query)1001–1000How many rows at most.50
formatstringoptional (query)JSONcsvSend csv for a CSV file with field-name headers.csv
FieldTypeWhat it means
group, from, tostringWhat you asked for.
dataarrayOne row per key: key, viewers, sessions, minutes, free_seconds, view_spend, gifts, gift_spend, stream_fee, spend, last_at (and streams, peak_viewers for day and stream).
totalsobjectThe rows added up, plus viewers and peak_viewers.
currency, timezonestringYour billing currency and time zone.

Per row: viewers, sessions, minutes, free_seconds, view_spend, gifts, gift_spend, stream_fee, spend, last_at (and streams, peak_viewers for day and stream). totals add up the rows. The console downloads the same as CSV.

Comments

Read the chat

GET/v1/live-streams/:stream_ref/comments

Query: after (the cursor from the previous answer). The first call (no after) returns the recent chat (about the last 30 items). Poll at most once a second; your app gets the same items live as data messages.

ParameterTypeRequiredDefaultAllowed valuesWhat it meansExample
refstringrequired (in the path)–4–64 of <code>A-Z a-z 0-9 _ -</code>The stream_ref of the live, from the list.ls_8fK2a9
afterstringoptional (query)none (the recent chat)up to 200 characters: the <code>cursor</code> of the previous answerReturn only what came after this point.c_19f2
FieldTypeWhat it means
statusstringThe live's state, for example live.
end_reasonstring or nullWhy the live ended, once it has.
viewersintegerEveryone watching now.
host_awaybooleanThe host's video is paused.
cursorstringPass it as after next time.
dataarrayChat and gift items: type, id, at, from { name, role, end_user_id }, text or gift.
Response
{ "status": "live", "end_reason": null, "viewers": 41, "host_away": false, "cursor": "…",
  "data": [ { "type": "chat", "id": "m1", "at": "…", "from": { "name": "Riya", "role": "host" }, "text": "Hi all" },
            { "type": "gift", "id": "g1", "at": "…", "from": { "name": "Rahul", "role": "partner", "end_user_id": "user_123" },
              "gift": { "gift_id": "g_rose", "name": "Rose", "icon_url": "…", "count": 1 } } ] }

from.role is host, viewer (a Titli viewer) or partner (a viewer from a partner app). from.end_user_id is present only for your own end users.

Send a comment

POST/v1/live-streams/:stream_ref/comments

Body: end_user_id, text (1–200 characters), client_id (optional, your message ID). Answer: 201 { "message_id" }.

ParameterTypeRequiredDefaultAllowed valuesWhat it meansExample
refstringrequired (in the path)–4–64 of <code>A-Z a-z 0-9 _ -</code>The stream_ref of the live, from the list.ls_8fK2a9
end_user_idstringrequired–1–128 of <code>A-Z a-z 0-9 _ . : @ -</code>Your stable ID for the person watching. In Quick mode the SDK fills it with the signed-in user (it must be that user).user_123
textstringrequired–1–200 characters (control characters are removed)The chat message.Hello!
client_idstringoptionala new UUIDup to 64 charactersYour own ID for the message.m-1042
FieldTypeWhat it means
message_idstring or nullID of the posted message.

The end user must be watching (403 not_viewer otherwise). Titli's chat filter, mutes and rate limits apply: 403 muted, 429 rate_limited.

Gifts

Viewers can send gifts to the host while they watch. Live Streams uses the same gift catalog, the same prices and the same send rules as Live Hosts calls. This is the short version; the gift list, your own prices, hiding gifts, stats and every error are in the Gifts API reference.

Gift list

GET/v1/gifts

Your gift list: { "enabled", "reason", "currency", "version", "max_count", "gifts": [ { "gift_id", "name", "icon_url", "animation_url", "category", "cost", "price", "you_keep", "min_price", "max_price", "hidden", "currency" } ] }. cost is what one gift costs you, price is what you charge your user, and min_price is the gift list price: your price cannot be below it. GET /v1/live-streams/gifts still answers as an alias.

The same list from the Live Streams path (an alias, which also follows the Live streams gift switch):

ParameterTypeRequiredDefaultAllowed valuesWhat it meansExample
No parameters.
FieldTypeWhat it means
enabledbooleanWhether gifts can be sent now.
reasonstring or nulloff_by_you or not_available when gifts are off, otherwise null.
currencystringYour billing currency.
max_countintegerThe most gifts one send may carry.
versionstring or nullChanges whenever the list or one of your prices changes: your cache key.
giftsarrayThe gifts: gift_id, name, icon_url, animation_url, category, price, hidden, currency, and in server answers also cost, you_keep, min_price, max_price, price_source, price_needs_review.
dataarrayThe same list again (kept for older clients).

Send a gift

POST/v1/live-streams/:stream_ref/gifts

Body: end_user_id, gift_id, count (1 to max_count, 99 by default; default 1), client_request_id (required, your unique ID for this gift, max 64 of A-Z a-z 0-9 _ . : -), expected_price (the price of one gift in your list; optional, but always send it).

ParameterTypeRequiredDefaultAllowed valuesWhat it meansExample
refstringrequired (in the path)–4–64 of <code>A-Z a-z 0-9 _ -</code>The stream_ref of the live, from the list.ls_8fK2a9
end_user_idstringrequired–1–128 of <code>A-Z a-z 0-9 _ . : @ -</code>Your stable ID for the person watching. In Quick mode the SDK fills it with the signed-in user (it must be that user).user_123
gift_idstringrequired–1–80 of <code>A-Z a-z 0-9 _ -</code>, an ID from the gift listWhich gift to send.g_rose
countintegeroptional11 to <code>max_count</code> of the gift list (99 unless set otherwise for your account)How many of this gift to send in one go.1
client_request_idstringrequired–1–64 of <code>A-Z a-z 0-9 _ . : -</code>Your unique ID for this gift. Repeating it never charges twice. The SDKs make one for you.8f1c2f0e-6a5b-4d0e-9a51-0c1e6f4f2b7d
expected_pricenumberoptional–above 0, in your billing currencyThe price of one gift you showed your user. If it is not the current price, nothing is sent (409 gift_price_changed). Always send it.15
FieldTypeWhat it means
idstringID of the send.
objectstringAlways gift.
statusstringsent, pending or refused.
surfacestringcall (a Live Hosts call) or stream (a live stream).
gift_id, name, countstring, string, integerThe gift and how many.
end_user_idstringWho sent it.
call_idstringThe Live Hosts call it was sent in (surface call only).
stream_ref, stream_idstringThe live it was sent in (surface stream only).
hostobjecthost_ref and name of the host who got it.
cost, unit_costnumberYour cost for the send and for one gift (server answers only; left out in Quick mode).
price, unit_price, you_keepnumberYour price for the send and for one gift, and what stays with you (you_keep is left out in Quick mode).
currencystringINR or USD.
client_request_idstringYour ID for this gift, as sent.
errorstring or nullThe refusal code of a refused gift, otherwise null.
created_at, decided_atstring (ISO time)When it was asked for and when it was decided.
replaybooleantrue when this answers a repeat of an earlier client_request_id.
balancenumberYour balance after the send (server answers only).
receipt, receipt_signatureobject, stringThe signed receipt of a sent gift.
Response
{ "id": "…", "object": "gift", "status": "sent", "surface": "stream", "gift_id": "g_rose", "name": "Rose", "count": 1,
  "end_user_id": "user_123", "stream_ref": "ls_8fK2…", "host": { "host_ref": "h_3Qe…", "name": "Riya" },
  "cost": …, "price": …, "you_keep": …, "currency": "INR", "client_request_id": "8f1c…", "replay": false, "balance": …,
  "receipt": { … }, "receipt_signature": "…" }
  • The gift's cost is debited from your balance before the gift is sent. If it cannot be delivered (the user was kicked, the live ended, the gift is no longer offered) you get the error with "refunded": true and the amount goes back to your balance at once.
  • You collect your own price from your user in your app; we bill only the cost. With a server, take the price from your own gift list there, never from the app.
  • Every sent gift carries a signed receipt and receipt_signature.

Idempotency

client_request_id makes a gift safe to retry. Sending the same client_request_id again returns the first result with "replay": true and never charges twice. Reusing it for a different gift is 409 gift_idempotency_conflict.

HTTPMeaning
201Sent.
200Replay of an earlier request with the same client_request_id ("replay": true).
202"status": "pending": the gift is not confirmed yet. We keep asking, and the amount stays held until the gift is confirmed (webhook gift.sent) or definitely refused (webhook gift.failed with "refunded": true, the amount goes back to your balance). Nothing is refunded just because time passed.

Retrying with the same client_request_id is always safe. Generate it once per gift in your app (a UUID is fine) and reuse it for every retry of that gift. After a timeout, a 429 or a 5xx without "refunded": true, keep your user’s payment and repeat the request with the same ID; give the money back only when the answer has "refunded": true, is a 4xx refusal, or gift.failed arrives.

Kick, block and mute

Hosts can kick, block and mute your users exactly as they do Titli viewers.

  • Kick: the host removes the end user from this live. The app gets the kicked data message (reason: "kicked") and is removed from the room; the session ends with end reason kicked; you get the viewer.kicked webhook with action: "kick". Joining the same live again is refused with 403 kicked.
  • Block: the same, with reason: "blocked", end reason blocked and action: "block". Joins to this host's lives are refused with 403 blocked.
  • Mute: the end user keeps watching but cannot chat. Only that end user gets muted / unmuted; a comment sent while muted is 403 muted.
  • A gift sent after a kick is refused and refunded ("refunded": true).

Respect kicked and blocked in your app: close the viewer screen and do not offer that live again to that user.

Pause and kill switch

Live Streams can be switched off at once, for everyone or for one account, by us or by Titli.

  • New joins are refused: 503 kill_switch (switched off for everyone or for your account), 503 partner_paused (Titli has paused Live Streams for now) or 403 calls_disabled (new sessions are switched off for your account).
  • Open sessions end with end reason kill_switch. The app gets the ended data message and the room closes; viewing is billed only up to that moment.
  • The list answers "paused": true with an empty data while Live Streams is paused.

Treat these as temporary: hide the live section while paused is true and retry later. Do not retry a 503 in a tight loop.

Data messages in the app

The SDKs deliver these as live events (onLiveEvent). With raw LiveKit, they are reliable data messages on topic titli.live, JSON:

typeFieldsMeaning
chatid, at, from{name, role, end_user_id?}, textA chat message in the live
giftid, at, from{…}, gift{gift_id, name, icon_url, count}A gift in the live (from anyone)
host_away / host_backThe host's video paused / came back (viewing is not billed while she is away)
viewerscountTotal viewers, at most every 5 seconds
muted / unmutedSent only to the end user the host muted / unmuted
kickedreason (kicked or blocked)Sent only to that end user, who is then removed from the room
endedreasonThe live is over; the room closes

Your app only receives your own end users' details; viewers from other apps appear as plain names.

Webhooks

Delivered to your project's webhook URL with the usual Titli-Signature: t=…,v1=… header. Verification, retries and replay work as for every other event: see Webhooks.

EventPayloadWhen
stream.started{ stream }The first of your viewers' live started playing (media is flowing).
stream.ended{ stream } with stream.end_reason, peak_viewers and the stream fee if you have oneThe live ended, or stopped being offered.
viewer.kicked{ viewer, action: "kick"|"block", receipt, receipt_signature }A host kicked or blocked one of your end users.
viewer.ended{ viewer, receipt, receipt_signature } with viewer.end_reason and end_codeWe ended a viewer's session ourselves: your balance ran out (balance_zero) or Live Streams was switched off for your account (kill_switch). Sessions your user ends, or the host ends, send no webhook.
gift.sent{ gift, receipt, receipt_signature }A gift was sent (including one that was pending).
gift.failed{ gift, refunded: true }A gift that was pending was refused. The amount is back in your balance: give your user the money back.
balance.low, balance.zeroAs for calls (see Webhooks)Your prepaid balance is running low, or is used up.

Billing and receipts

Default prices. Your own price card is in your console (Live streams) and in the pricing endpoint below.

QualityPer viewer-minutePer 1,000 minutesUSD accounts, per 1,000 minutes
Audio room₹0.03₹30$0.32
SD video (up to 480p)₹0.06₹60$0.65
HD video (720p)₹0.12₹120$1.30
Full HD video (1080p)₹0.27₹270$2.92
  • 10,000 free viewer-minutes every month, used before any paid minute.
  • Volume discounts on every quality, by your viewer-minutes in the month: 10% off from 1,00,000, 20% off from 10,00,000, 30% off from 50,00,000.
  • Gifts: each gift has a cost to you, shown in your console and the API. You set your price and you keep the difference (see Gifts).
  • No setup fee, no monthly minimum, no stream fee.

Example: 100 viewers watching for one hour in SD cost 100 × 60 × ₹0.06 = ₹360.

Viewer minutes

  • Viewing is billed at your viewer-minute rate, after your free minutes and volume tiers, per second for each viewer.
  • Quality tiers: audio (audio rooms), sd (video up to 480p), hd (720p), fhd (1080p). Video is delivered today as one mobile-friendly layer, billed as sd; price_card.billed_tier in the pricing endpoint says which tier applies now. A viewer session keeps the tier and rate it started with.
  • Billing runs only while the viewer is in the room and the host's video is flowing. A viewer still connecting, a host who stepped away, and a token that is never used cost nothing.
  • Your balance is debited live every 5 seconds. When it cannot pay for the next few seconds of all your viewers, their sessions end (balance_zero); the balance never goes below zero.
  • A viewer can join with zero balance while you have at least one free minute left.

Stream fee (optional)

Off by default. Accounts that want a predictable bill can have a flat rate per stream-minute while at least one of their viewers watches that stream. If it is on for you, the rate is shown in your console.

Gifts

Each gift has a cost to you, shown in your console and in GET /v1/gifts (cost). It is debited when the gift is sent, and refunded automatically if the gift cannot be delivered. A pending gift stays debited until it is confirmed or refused. You set your own price for your users (it cannot be below the gift list price) and you keep the difference. See Gifts: billing.

Volume discounts and free minutes

Volume discounts are a percentage off every quality once your viewer-minutes in the month pass a threshold (all your viewers together, free minutes included). Monthly free minutes are used first, then any granted free minutes.

Your own switches

In the console (Live streams, Settings) you can pause Live Streams for your app, switch gifts off (the gift list is then empty and sending is refused with 403 gifts_disabled), and set a lower viewer limit than your account's to cap spend. They take effect at once.

Receipts

  • Each ended viewer session and each gift adds a usage line to your ledger and statement, with a signed receipt.
  • The receipt's cost_breakdown shows, for viewing, the free and paid seconds per rate; for gifts, the count and the cost per gift.
  • Receipts are signed with Ed25519, the same key as call receipts.
GET/v1/live-streams/viewers/:viewer_id/receipt

The signed receipt of an ended viewer session.

ParameterTypeRequiredDefaultAllowed valuesWhat it meansExample
idstring (UUID)required (in the path)–a <code>viewer_id</code> of your accountThe viewer session whose receipt you want.6b0c2e7a-1f3d-4c55-9a0e-2b7d9c1e4f60
FieldTypeWhat it means
receiptobjectThe receipt of the ended session, with cost_breakdown.
signaturestringEd25519 signature of the receipt.
algorithmstringAlways Ed25519.
key_idstringThe signing key (see GET /v1/receipts/public-key).

Your rates

GET/v1/live-streams/pricing

Your price card (price_card: a rate per quality tier with its volume discounts, billed_tier, free monthly minutes, whether gifts are on, viewer limit) and status (current rate, minutes used this period, next discount, free minutes left). It also carries your account fields enabled, paused, rates and tier_period (monthly or lifetime: the period your minute discounts count over).

ParameterTypeRequiredDefaultAllowed valuesWhat it meansExample
No parameters.
FieldTypeWhat it means
currencystringYour billing currency.
enabled, paused, self_pausedbooleanLive Streams is on for your account; paused by us; paused by you.
ratesobjectYour rate per viewer-minute (view), per stream-minute (stream) and per quality tier.
rate_view_per_minute, rate_stream_per_minutenumberThe same two rates as plain numbers.
gifts_enabledbooleanWhether gifts are on in Live Streams.
max_viewersintegerYour concurrent viewer limit.
statusobjectperiod, minutes_used, current_rate_per_minute, next_tier, free { monthly_minutes, monthly_left_minutes, grants_left_minutes }.
price_card, tier_periodobject, stringYour price card and the period your discounts count over (when shown for your account).

Limits

  • Concurrent viewers per account: 100 by default (ask support to raise it). Beyond it, joins get 429 capacity.
  • Platform limits, shared by all accounts, may refuse a join with 503 capacity: relayed lives and total partner viewers.
  • One open session per end user per live. Viewer tokens live 10 minutes; renew while watching.
  • Video is a single quality layer (about 500–800 kbps), chosen for mobile viewers.
  • Comments: 1–200 characters, polled at most once a second. Gifts: count 1–99 per request.

Errors

HTTPcodeWhen
400invalid_request / invalid_stream_ref / invalid_client_request_idBad body or query
400gift_unavailableThat gift is not offered, or you hid it
402balance_zeroBalance is zero (join, without free minutes)
402insufficient_balanceYour balance is too low for this gift. Nothing is sent or charged
403live_streams_disabledLive Streams is not enabled for your account
403calls_disabledNew sessions are switched off for your account
403kickedThe host removed this end user from this live (rejoining this live is refused)
403blockedThis host blocked this end user, or the end user is blocked on your account
403not_viewerThe end user is not watching this live (join first)
403gift_not_in_sessionA gift from an end user who is not watching this live (join first)
403mutedThe host muted this end user's chat
403gifts_disabledGifts are switched off for your account (by us, or by you in the console)
409stream_unavailableThe live has ended or is no longer offered
409gift_idempotency_conflictclient_request_id was used for a different gift
409gift_price_changed / gift_host_unavailableYour price changed since you showed it (with expected_price), or the host cannot receive the gift. See Gifts: errors
409no_receiptThe viewer session is still open, or it never connected, so there is no receipt yet
429capacityYour account's concurrent viewer limit (default 100)
429rate_limitedToo many requests or messages
503capacityOur relay or total viewer capacity is full right now; retry in a minute
503kill_switchLive Streams is switched off right now (for everyone or for your account)
503partner_pausedTitli has paused Live Streams for now
503partner_unavailableA dependency did not answer; retry in a few seconds

End reasons

Scopeend_reason
Viewer sessionleft, left_room (left the room and did not come back within 30 s), never_connected (a token never used within 2 minutes), kicked, blocked, removed (Titli removed the viewer), balance_zero, kill_switch, and every stream end reason.
Streamhost_ended, admin_terminated, unavailable (the live stopped qualifying, for example a PK battle or paid entry started), pool_off, vendor_off, host_excluded, host_gone (the host's video stopped for a minute), no_viewers, relay_failed, operator_ended, vendor_ended (you ended it for your app), kill_switch, error.

Content rules

These are part of your agreement.

  • 18+ only. Gate Live Streams behind your own age check.
  • No recording, restreaming or redistribution of any stream, in whole or in part, by you or your users. Viewer tokens are personal to one end user; never share them or use them server side to capture media. Every view is logged with your account, the end user and the times.
  • Report and block are required. Your app must let users report a live (POST …/report) and stop seeing a host. Keep the host's and other viewers' names as we send them; do not add your own overlays over the host's video that hide the "Titli" mark of the SDK viewer screen.
  • You are responsible for your app's store policies on user-generated live content. See also Acceptable use.
Start free