TikTok LIVE Transcription API
Know what a LIVE says while it is on air. Start a session on a room and receive each sentence, typically one to two seconds after it is said, across many rooms at once, without watching any of them.
- What is the TikTok LIVE Transcription API?
- The TikTok LIVE Transcription API is a set of REST endpoints that transcribe a TikTok LIVE room in real time. You start a session on a room that is on air, then read each sentence, typically one to two seconds after it is said, over an event stream, by polling or on a webhook.
Why the TikTok LIVE Transcription API?
A recorded video can be transcribed whenever you want. A LIVE cannot: it lasts for hours, many rooms are on air at the same time, and once a room ends there is nothing left to download. If what is said on LIVE matters to you, the only moment to read it is while it is said. This API does that: one call starts listening to a room, and the sentences arrive as text.
- Sentences as They Are Said. A final sentence is delivered typically one to two seconds after it was said. It has a number (
seq), its start and end in the session and its language, and it never changes. - Partial Text When You Display It. With
include_partials, the sentence being said is streamed too, updated several times a second, until the final sentence replaces it. - One Stream for All Your Rooms. One Server-Sent Events connection carries every session of your organization. After a cut, it resumes from the last event you received, so no final sentence is lost.
- Languages and Voices. The language is detected sentence by sentence, so a LIVE can mix languages.
include_speakersadds a label (A, B...) that tells voices apart; it does not identify people. - Sessions That End by Themselves. A session runs until the LIVE ends, you stop it, or
max_duration_minutesis reached, up to 24 hours. Its sentences stay readable for 24 hours after the end. - Nothing to Operate. No TikTok account, no login, no browser, nothing to install. You send a room and read JSON.
How It Works
POST /v1/tiktok/live/search returns the rooms on air for a keyword, in one country. Or target one streamer by username. POST /v1/tiktok/live/room gives the state of a room, its viewers and its chat.
POST the room_id, the username or the LIVE URL to /v1/tiktok/live/transcribe. The answer is a session with its id, at once. Starting a room you already transcribe returns the running session.
Open the event stream, poll the session with after_seq, or receive a webhook. Each final sentence arrives once, numbered, with its start and end in seconds from the start of the session.
The session ends with the LIVE, or when max_duration_minutes is reached. DELETE /v1/tiktok/live/transcribe/{session_id} stops it earlier. The transcript stays readable for 24 hours.
Finding rooms is the job of the TikTok LIVE search: the rooms on air for a keyword, in 113 countries, with their viewers.
Request Parameters
| Parameter | Behavior |
|---|---|
| room_id / username / url | Required, exactly one of the three. A room id as a string of digits (the id of a LIVE search result), the username of the streamer with or without @, or a LIVE URL such as https://www.tiktok.com/@username/live. |
| language | The language spoken, as a two-letter code (en, fr, ar...), when you know it. Left out, the language is detected sentence by sentence. |
| max_duration_minutes | 1 to 1440, 60 by default. The session stops by itself once this many minutes of the LIVE were transcribed. |
| include_partials | Default false. Also deliver the sentence being said, as partial events on the event stream and as partial on the polling call. |
| include_speakers | Default false. Add a speaker label (A, B...) to each final sentence. |
| webhook_url | An https URL that receives the final sentences as they come, and the end of the session. It must be given in the request: the default webhook of the account is not used. |
Final Sentences, and the Sentence Being Said
The transcript is made of final sentences. A final sentence is delivered once, typically one to two seconds after it was said, and it never changes. It carries its number in the session (seq, from 1, without gaps), its start and end in seconds, its language and its time in UTC.
With include_partials, the stream also carries the sentence being said, as partial events updated several times a second. A partial can still change, has no id, and is replaced by the final sentence. Ask for partials when you display the text live. Leave them out when you store or analyze it.
The stream has four events: started, final, partial and ended. Each one is a JSON object that carries its session_id. A comment line, : keep-alive, is sent every 15 seconds when there is nothing else to send.
The values on the right are placeholders that show the shape of a stream. They are not the transcript of a real room.
Three Ways to Read the Transcript
The three can be combined. Reading the same sentence twice is harmless: a final sentence is identified by its session_id and its seq.
| How | Call | Best for |
|---|---|---|
| Event stream | GET /v1/tiktok/live/transcribe/events | Receiving each sentence as it is said, over one connection for all your sessions. |
| Polling | GET /v1/tiktok/live/transcribe/{session_id}?after_seq=N | Simple integrations, and catching up after an interruption. |
| Webhook | webhook_url in the start request | Servers that prefer to be called. |
Event stream
Server-Sent Events over one HTTP connection. It carries all the sessions of your organization; session_id keeps one. Every event except a partial has an id: reconnect with the last one in Last-Event-ID or in after, and the stream resumes where it stopped.
Polling
One GET returns the session and a page of its final sentences. Pass pagination.next_after_seq as after_seq of the next call to receive only what was said since.
Webhook
tiktok_live_transcribe.segments carries the final sentences since the previous delivery, at most one delivery every two seconds. tiktok_live_transcribe.ended is sent once, at the end. Deliveries are signed like the other webhooks.
What Comes Back
| Field | Content |
|---|---|
| session.id | The id of the session. It is the session_id of every later call and of every event. |
| session.status | starting, then listening a second or two later, then ended or failed. |
| session.end_reason | Why the session ended: live_ended, stopped, max_duration_reached or insufficient_credits. |
| seq | The number of a final sentence in its session, from 1, without gaps. |
| start / end | Seconds from the start of the session to the start and to the end of the sentence. |
| text / language | The sentence, and the language detected for it as a two-letter code. |
| speaker | With include_speakers only: the label of the voice (A, B...). |
| timestamp | When the sentence started, in UTC. |
Built for Teams That Follow LIVE at Scale
Trust & Safety
Follow the rooms your policies care about and run your own rules on each sentence as it arrives. A reviewer opens a room with the sentence and its second, without watching hours of LIVE.
Brand & Compliance Monitoring
On a LIVE, a product claim or a required disclosure is said aloud, not written. Search the sentences for the names and the phrases you track, in the rooms a keyword search returns.
Fraud Detection
A LIVE leaves nothing to review afterwards. Match each sentence against your patterns while the room is still on air, and keep the transcript with its timestamps as a record.
Social Listening
Read what is said about a topic across many rooms at once. Each sentence comes with its language, and LIVE search gives the viewers of each room, so you can weigh what you hear.
Media Monitoring
Follow a newsroom, a press conference or a creator who went LIVE, and receive the words as text while the broadcast goes on.
AI Agents
Feed the final sentences to an agent as they arrive. It summarizes the room, answers questions about what was just said, or decides when a person should look.
Quickstart
Start a session, read its sentences, stop it. The examples use plain HTTP. The event stream needs the X-API-Key header, so in JavaScript it is read with fetch: a browser EventSource cannot send that header.
The Python and JavaScript SDKs, from version 3.5.0, have methods for these calls.
POST /v1/tiktok/live/transcribe: start a sessionGET /v1/tiktok/live/transcribe/events: the event streamGET /v1/tiktok/live/transcribe/{session_id}: a session and its sentencesGET /v1/tiktok/live/transcribe: your sessions, in progress or allDELETE /v1/tiktok/live/transcribe/{session_id}: stop a session
Transcribing a TikTok LIVE: the guide, with every parameter and error
When a Session Does Not Start
The start call says why, with an error_code your code can act on. A start is never put on hold: when the service cannot take one more room, it says so at once.
| Answer | Meaning |
|---|---|
| 403 access_denied | LIVE transcription is not enabled for the organization of the API key. Contact us. |
| 404 live_not_found | No such room, or the account does not exist or has never gone LIVE. |
| 409 live_ended | The LIVE is not on air: it has ended, or the streamer is offline. |
| 429 too_many_active_sessions | Your organization has its own limit of rooms at once and has reached it. Stop a session or wait for one to end. |
| 502 live_room_unavailable | TikTok did not serve the room. Retry later. |
| 503 system_overload | The service cannot take one more room right now. Nothing was started: retry after retry_after_seconds. |
Pricing
Real-time LIVE transcription is available on every plan. It is billed by the time transcribed: 1 credit = 30 minutes of LIVE.
The pricing page shows what a credit is, and the usage costs page of the documentation holds the billing rules.