Interactive live rooms, built on the calling API
Small interactive live rooms are self-serve today: one host and participants in a real-time room, 2 by default and up to 50 on request. Large-audience broadcast and PK battles are custom packages; restreaming and recording are not offered.
Self-serve today, or delivered by our team
We say exactly which parts you can build alone today, and which our team delivers for you.
Build it yourself today
- Interactive live rooms: a host and participants in one real-time room, with the host role set when the host joins.
- Rooms up to 50 people on request (1:1 by default).
- End, remove and mute for moderation, from the app (the room’s creator) or your server.
- Per-second metering, signed receipts and webhooks, the same as calls.
Available as an integration package
- Large-audience live broadcast: host on stage, viewers watching.
- Co-host and guest seats: invite a viewer on stage, send them back.
- PK battles between two hosts, with a shared timer and score.
- Games on a live stream: the host plays Ludo, Carrom and more with a viewer.
PK battles: host versus host, live
Two hosts, two audiences, one battle. Viewers watch both hosts side by side while a shared countdown runs, and the battle ends with a result.
- Start a PK between two live hosts
- Side-by-side view of both hosts for every viewer
- Shared timer and live score
- Built on the same calling minutes, billed per minute
What teams build with live streaming
Creator lives
Creators go live and bring fans on stage for a moment.
Live classes
A teacher live with a class, bringing a student up to ask a question.
Community events
Talks and AMAs where the audience can step up to speak.
Gifts on Live Streams: viewers send gifts to the host
With the Live Streams API your users watch Titli hosts who are live, inside your app. While they watch they can send gifts: the app sends the gift with your App Key (or your server does), the animation plays in the viewer’s app and the host sees it in her app like any gift. The same gifts work in Live Hosts calls.
How it works, in three steps
- 1
List the gifts
The SDK gets the gift list with your App Key: each gift’s name, icon, animation and your price. (Your server gets the same list with your cost too.)
- 2
Show them in your app, at your prices
The SDK adds a gift button and a gift sheet to the prebuilt call and viewer screens, or build the sheet in your own UI. You collect your price from your user in your app.
- 3
Send from the app
When the user taps a gift, the app sends it in that call or live with your App Key: no backend needed. With production hardening (optional), your server sends it through our API instead. The SDK plays the animation in your app and the host sees the gift in her app.
What you control
Our gift catalog
Gifts come from our catalog only. You cannot upload or add your own gifts. You choose which ones your users see.
On or off
Switch gifts on or off for your whole account with one console switch or the API. While off, the list is empty and sends are refused.
Hide or show any gift
Hide a gift you do not want in your app. It leaves your list and cannot be sent. Show it again whenever you like.
Your own price for each gift
You set what your users pay for each gift. Your price cannot be below the gift list price. You keep the difference.
Receipts, stats and webhooks
Every gift has a signed receipt and shows in your stats and CSV export. One webhook fires when a gift is sent, and another when a pending gift is refused.
Safe to retry
Every send carries a request ID of your own. Sending the same ID again returns the first result and never charges twice.
Gifts follow Live Hosts and Live Streams: invite-only, and switched on per account. Ask us to turn them on for your app.
Your cost, your price, and what you keep
Each gift has a cost to you, shown in your console and the API. You set your price. You keep the difference.
Example: a gift costs you ₹60, you charge ₹150, you keep ₹90.
- Billed when it is sent: the cost comes out of the same prepaid balance as your calls.
- Refunded automatically if it cannot be delivered: the amount goes back to your balance at once.
- If the answer says the gift is pending, it is not confirmed yet. Your cost stays held until it is confirmed or refused; if it is refused, the amount comes back and a webhook tells you.
- If your balance is too low, the gift is not sent and nothing is charged. The call or live goes on.
- We bill only the cost. You collect your own price from your user in your app.
- INR and USD: a rupee account sees and pays ₹, a USD account sees and pays $.
Example only
₹90you keep on a gift you sell for ₹150
- Your cost
- ₹60 per gift, taken from your prepaid balance when it is sent
- Your price
- ₹150: you set it and collect it from your user in your app
- You keep
- ₹90
The numbers are only an example, not a price list. The real cost of every gift is in your console and in the API.
The real endpoints, ready to paste
Gifts API referenceEvery endpoint, field, error code and webhook is in the Gifts API reference.
// Quick mode: no backend needed. After TitliVideo.init(appKey: 'tak_…', userId: …), the prebuilt
// call and viewer screens show the gift button and send gifts themselves: no handler to write.
final call = await TitliVideo.liveHosts.startCall(hostRef: 'any'); // gift sheet included
// Your own UI: list the gifts (your price, never your cost) and send one
final gifts = await TitliVideo.gifts.list();
await TitliVideo.liveHosts.sendGift(call.callId, 'g_rose', count: 1);
// on a Live Stream: TitliVideo.liveStreams.sendGift(streamRef, 'g_rose')
// Gifts on/off, hidden gifts, your prices and stats stay in the console (or on your server).# 1. The gifts your users can send, each with your cost and your price
curl -s "https://api-videosdk.titliapp.com/v1/gifts" -u "$KEY_ID:$KEY_SECRET"
# 2. Set your own price for one gift (it cannot be below the gift list price, min_price)...
curl -s -X PUT https://api-videosdk.titliapp.com/v1/gifts/g_rose -u "$KEY_ID:$KEY_SECRET" -H 'Content-Type: application/json' \
-d '{"price":150}'
# ...or hide it from your app ("hidden":false shows it again)
curl -s -X PUT https://api-videosdk.titliapp.com/v1/gifts/g_rose -u "$KEY_ID:$KEY_SECRET" -H 'Content-Type: application/json' \
-d '{"hidden":true}'
# 3. Switch gifts off (or on) for your whole account
curl -s -X PATCH https://api-videosdk.titliapp.com/v1/gifts/settings -u "$KEY_ID:$KEY_SECRET" -H 'Content-Type: application/json' \
-d '{"enabled":false}'// GET /v1/gifts -> 200 (example numbers, not a price list)
{ "enabled": true, "reason": null, "currency": "INR", "max_count": 99, "version": "9c1f0a2b7d3e4f56",
"gifts": [ { "gift_id": "g_rose", "name": "Rose",
"icon_url": "https://…", "animation_url": "https://…", "category": "popular",
"cost": 60, "price": 150, "you_keep": 90,
"min_price": …, "max_price": …,
"price_source": "own", "price_needs_review": false,
"hidden": false, "currency": "INR" } ] }
// cost = what one gift costs you (taken from your prepaid balance when it is sent)
// price = what you charge your user (show this one in your app)
// you_keep = price - cost
// min_price = the gift list price: your price cannot be below it
// max_count = the most gifts one send may carry
// version = changes when the list or a price changes: use it as your cache key
// "enabled": false with an empty list = gifts are off ("reason": "off_by_you" or "not_available")# A gift in a connected Live Hosts call. The end user is the call's.
# client_request_id: a fresh one for every gift, the same one when you repeat this request.
curl -s https://api-videosdk.titliapp.com/v1/live-hosts/calls/$CALL_ID/gifts -u "$KEY_ID:$KEY_SECRET" -H 'Content-Type: application/json' \
-d '{"gift_id":"g_rose","count":1,"client_request_id":"6f0d2c1e-7a3b-4f1e-9c55-0b1d2e3f4a5b","expected_price":150}'
# -> 201 sent (200 = the same client_request_id again: the first result, nothing charged twice)
{ "id": "…", "object": "gift", "status": "sent", "surface": "call",
"gift_id": "g_rose", "name": "Rose", "count": 1,
"end_user_id": "user_123", "call_id": "…", "host": { "host_ref": "h_9f2a", "name": "Asha" },
"cost": 60, "unit_cost": 60, "price": 150, "unit_price": 150, "you_keep": 90, "currency": "INR",
"client_request_id": "6f0d2c1e-7a3b-4f1e-9c55-0b1d2e3f4a5b", "error": null,
"created_at": "…", "decided_at": "…", "replay": false, "balance": …,
"receipt": { … }, "receipt_signature": "…" }
# -> 202 "status": "pending": not confirmed yet. Your cost stays held until the gift is confirmed
# (webhook gift.sent) or refused (webhook gift.failed with "refunded": true). Nothing is refunded
# just because time passed. Repeating the request with the same client_request_id is always safe.# A gift from a viewer of a live stream: say which end user sends it
curl -s https://api-videosdk.titliapp.com/v1/live-streams/$STREAM_REF/gifts -u "$KEY_ID:$KEY_SECRET" -H 'Content-Type: application/json' \
-d '{"end_user_id":"user_123","gift_id":"g_rose","count":1,"client_request_id":"b1a7c9d2-5e4f-4a6b-8c3d-2e1f0a9b8c7d","expected_price":150}'
# -> 201 sent (200 = the same client_request_id again, 202 = pending: wait for gift.sent or gift.failed)
{ "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": 60, "price": 150, "you_keep": 90, "currency": "INR",
"client_request_id": "b1a7c9d2-5e4f-4a6b-8c3d-2e1f0a9b8c7d", "replay": false, "balance": …,
"receipt": { … }, "receipt_signature": "…" }# These are answers to YOUR SERVER. Pass only code, user_message, user_message_hi and user_code on to your app.
# Balance too low: nothing is sent, nothing is charged
# -> 402
{ "error": { "code": "insufficient_balance", "message": "…", "cost": 60, "balance": 12.5, "currency": "INR",
"user_code": "VB-402", "user_message": "Gifts are unavailable right now. Please try again later. (code VB-402)",
"error_code": "VENDOR_BALANCE_INSUFFICIENT", "docs_url": "https://videosdk.titliapp.com/docs/errors#VENDOR_BALANCE_INSUFFICIENT" } }
# Your price changed since you showed the list (you sent expected_price): nothing is sent
# -> 409
{ "error": { "code": "gift_price_changed", "message": "…", "gift_id": "g_rose", "price": 160, "cost": 60, "currency": "INR",
"user_code": "GF-409", "user_message": "The price of this gift has changed. Please check it and try again." } }
# The gift could not be delivered (the call ended, the host left): your cost is back in your balance
# -> 409
{ "error": { "code": "gift_host_unavailable", "message": "…", "refunded": true, "gift": { … }, "balance": … } }
# A send that was answered 202 "pending" and then refused: webhook gift.failed
{ "event": "gift.failed", "data": { "gift": { "id": "…", "status": "refused", "client_request_id": "…", … }, "refunded": true } }
# Give your user the money back when the answer has "refunded": true, on a 4xx refusal (not 429), or on gift.failed.
# On 429, 5xx without "refunded", a timeout or 202: keep the payment and repeat with the same client_request_id.
# A send is also refused when gifts are switched off, the gift is no longer offered, the user is not in
# that call or live, the request ID was already used for a different gift, or there are too many requests
# (see Errors in the docs for each code).// Your server (Node 20+, Express). Complete on its own: the helper, the list, the send, the webhook.
//
// chargeUser(), keep() and giveBack() are YOUR wallet, keyed by client_request_id:
// chargeUser(user, id, what, amount) takes the amount once per id; answers false when that id
// was already used for another gift, count, session or user
// keep(id) the gift was sent: this payment is final
// giveBack(id) returns a payment that is not final (never one that was kept)
const AUTH = 'Basic ' + Buffer.from(process.env.TITLI_KEY_ID + ':' + process.env.TITLI_KEY_SECRET).toString('base64');
async function titli(path, body) { // throws on a timeout or a network failure: then there is no answer
const r = await fetch('https://api-videosdk.titliapp.com' + path, {
method: body ? 'POST' : 'GET', signal: AbortSignal.timeout(10000),
headers: { Authorization: AUTH, 'Content-Type': 'application/json' }, body: body && JSON.stringify(body),
});
return { status: r.status, data: await r.json().catch(() => ({})) };
}
// The list for your app: your prices only. cost and you_keep are your business figures: keep them here.
app.get('/api/gifts', requireLogin, async (req, res) => {
const { data } = await titli('/v1/gifts');
res.json({ enabled: data.enabled, version: data.version, max_count: data.max_count,
gifts: (data.gifts || []).map((g) => ({ gift_id: g.gift_id, name: g.name, icon_url: g.icon_url,
animation_url: g.animation_url, category: g.category, currency: g.currency, price: g.price })) });
});
// Refusals before any debit: nothing was sent, so the money goes back to your user.
const REFUSED = ['gifts_disabled', 'gift_unavailable', 'gift_price_changed', 'gift_host_unavailable',
'gift_not_in_session', 'gift_idempotency_conflict', 'insufficient_balance', 'invalid_request'];
// The app posts { gift_id, count, client_request_id, expected_price }: a fresh client_request_id
// (a UUID) for every gift, and the SAME one when it repeats a send that got no clear answer.
app.post('/api/calls/:callId/gift', requireLogin, async (req, res) => {
const { gift_id, client_request_id, expected_price } = req.body;
const count = Number(req.body.count ?? 1);
// (check here that this call belongs to req.user)
const list = (await titli('/v1/gifts')).data; // cache it in real code; reload when version changes
const gift = (list.gifts || []).find((g) => g.gift_id === gift_id);
if (!gift) return res.status(400).json({ error: { code: 'gift_unavailable' } });
if (!Number.isInteger(count) || count < 1 || count > list.max_count
|| !/^[A-Za-z0-9_.:-]{1,64}$/.test(client_request_id || '')) {
return res.status(400).json({ error: { code: 'invalid_request' } });
}
// 1. The price is the one in YOUR current list, never a number from the app. If the app showed
// another price, charge nothing: it shows the new price and your user confirms.
const price = gift.price;
if (expected_price != null && Number(expected_price) !== price) {
return res.status(409).json({ error: { code: 'gift_price_changed', price } });
}
// 2. Take your price x count from your user, once per client_request_id.
const what = ['call', req.params.callId, gift_id, count].join('/');
if (!(await chargeUser(req.user.id, client_request_id, what, price * count))) {
return res.status(409).json({ error: { code: 'gift_idempotency_conflict' } });
}
// 3. Send it, always with expected_price = the price you charged.
let r;
try {
r = await titli('/v1/live-hosts/calls/' + req.params.callId + '/gifts',
{ gift_id, count, client_request_id, expected_price: price });
// in a live stream: '/v1/live-streams/' + streamRef + '/gifts', with end_user_id: req.user.id added
} catch {
// No answer (timeout, network): unknown. KEEP the payment; the app repeats with the SAME id.
return res.status(502).json({ error: { code: 'unknown' } });
}
const e = r.data.error;
if (!e) {
if (r.data.status === 'sent') await keep(client_request_id); // 201, or 200 for a repeat
// 202 "pending": your cost stays held. Keep the payment until the webhook below decides.
return res.status(r.data.status === 'pending' ? 202 : 200).json({ id: r.data.id, status: r.data.status });
}
// 4. Give the money back ONLY when the answer says "refunded": true, or it is a refusal before
// any debit. 429 and 5xx without "refunded" decide nothing: the gift may still be delivered
// and billed, so the payment stays and the app repeats with the SAME client_request_id.
const back = e.refunded === true || (r.status >= 400 && r.status < 500 && r.status !== 429 && REFUSED.includes(e.code));
if (back) await giveBack(client_request_id);
res.status(r.status).json({ error: { code: e.code, user_message: e.user_message, user_message_hi: e.user_message_hi, user_code: e.user_code,
...(e.refunded === true ? { refunded: true } : {}),
...(e.code === 'gift_price_changed' ? { price: e.price } : {}) } });
// never pass cost, you_keep or balance on to the app
});
// Your webhook endpoint (verify the Titli-Signature header on the raw body first, see /docs/webhooks)
app.post('/webhooks/titli', async (req, res) => {
const { event, data } = req.body;
if (event === 'gift.sent') await keep(data.gift.client_request_id); // also for a send that was pending
// gift.failed: a pending send was refused and our debit was returned: give your user the money back
if (event === 'gift.failed') await giveBack(data.gift.client_request_id);
res.sendStatus(200);
});
// A payment that stayed open and was never repeated by the app: ask
// GET /v1/gifts/sends?client_request_id=... -> sent: keep · refused: give back · pending: wait ·
// no send at all: the request never reached us and nothing was debited: give back.// Production hardening (optional): give the SDK your gift list and a send function. The prebuilt call and viewer screens then show
// a gift button with a gift sheet and play the animation. The SDK never holds your API key.
// Web / JS
const session = await TitliCall.join(livekitUrl, token, {
container: '#stage',
giftCatalog, // the list from YOUR backend (no cost in it)
onSendGift: (request) => // { gift_id, count, client_request_id, expected_price }; your server
// charges the price of its own list, never the one in this request
fetch('/api/calls/' + callId + '/gift', {
method: 'POST', headers: { 'Content-Type': 'application/json' }, body: JSON.stringify(request),
}).then((r) => r.json()),
onLiveEvent: (e) => { if (e.type === 'gift') console.log(e.gift.name, e.gift.count); },
});
// Flutter: TitliCallScreen(call: call, giftCatalog: catalog, onSendGift: sendGift)
// Android: TitliCallScreen(call = call, giftCatalog = catalog, onSendGift = TitliGiftSender { ... })
// iOS: TitliCallView(url: url, token: token, giftCatalog: catalog, onSendGift: { request in ... })
// React Native: <TitliCallScreen url={url} token={token} giftCatalog={catalog} onSendGift={sendGift} />
// Your own UI: call.gifts has the list and send(gift, count). The gift arrives as a live event
// (onLiveEvent, type "gift"); with raw LiveKit it is a data message on topic "titli.live":
// { "type": "gift", "id": "…", "at": "…", "from": { "role": "partner", "end_user_id": "user_123" },
// "gift": { "gift_id": "g_rose", "name": "Rose", "icon_url": "…", "animation_url": "…", "count": 1 } }Live minutes at the same per-minute prices
The SDK is free. Calls are billed per second while at least two people are connected.
Billed in rupees (INR). Prices shown are what you pay. If GST applies to you, it is shown on your invoice.USD billing is for companies outside India, switched on after a short business check: contact us to pay (USDT/wire). Prices exclude taxes.
Audio
Video
FAQ
What can I build with the live streaming SDK today?
Interactive live rooms with a host and participants, up to 50 people per room on request, with the same SDK and App Key as calls (no backend needed), or the REST API from your server.
Do you support live broadcast with co-hosts and guest seats?
Yes, as an integration package delivered by our team. It is not a self-serve API yet, so there are no public docs for it. Talk to us to scope it.
What is a PK battle?
A live battle between two hosts: viewers watch both side by side while a timer runs, and the battle ends with a result. We deliver PK battles as an integration package.
How are live streams billed?
Per participant-minute: ₹0.05 for audio and ₹0.20 for video, billed per second. Package integration work is quoted separately.
Can I stream to YouTube or other platforms?
Not today. Restreaming to other platforms is not offered.
Can viewers send gifts during a live stream?
Yes. A user who is watching a live can send a gift to the host: the app sends it with your App Key (or your server through our API), the animation plays in the viewer’s app and the host sees the gift in her app. Gifts are switched on per account.
Are the gifts in live streams the same as in host calls?
Yes. The gift list, your prices and the send rules are the same in both, so you set them once. The questions about prices, controls and billing are answered on the Live Hosts API page.
What happens to a gift if the live ends or the viewer is removed?
A gift that cannot reach the host is refunded to your balance automatically, and the API answer says it was refunded. A gift that already reached her stands as sent.
What if a gift send gets no answer?
Repeat the same request with the same request ID: it is never charged twice. If the answer says the gift is pending, it is not confirmed yet: one webhook follows when it goes through, and another if it is refused, with your cost returned.

Free SDK. Pay only for the minutes you use.
Create a free account: it starts with ₹100 welcome credit, about 250 minutes of 1:1 video, so your first call needs no recharge. Questions? Message us on WhatsApp and a person replies.


