Skip to Content

LIVE Transcription Events

The events of your organization's LIVE transcription sessions, as they happen, over one HTTP connection that stays open (Server-Sent Events, text/event-stream). One connection carries every session of the organization; session_id keeps the events of one.

eventdataWhen
startedsession_id, status, started_atThe session starts listening
finalsession_id and a final sentence (LiveTranscriptSegment)A sentence is complete: it will not change
partialsession_id, text, startThe sentence being said changed (sessions started with include_partials)
endedsession_id, status, end_reason, error, duration_seconds, segments_count, ended_atThe session is over
id: 4821
event: final
data: {"session_id":"3f0c1c1e-7a52-4d0e-9a3b-0d2f8c1b7e55","seq":57,"start":103.29,"end":104.88,"text":"I'm from Gambia.","language":"en","timestamp":"2026-12-03T11:20:03.290Z"}

Resuming. Every event except partial has an id, a number that grows by one with each event of your organization. When the connection is cut, reconnect with the last id you received in the Last-Event-ID header (an EventSource does it by itself) or in after: the stream resumes with the event that followed, so no final sentence is lost. Without either, the stream starts with the events to come; when session_id names a session that is already over, it starts with that session's ended event. The stream opens with the id it starts after and a retry delay, so a connection cut before any event still resumes where it should. The events of a session are kept until 24 hours after it ends. A partial has no id and is not replayed.

A comment line (: keep-alive) is sent every 15 seconds when there is nothing else to send. Connections are closed from time to time (deployments): reconnect with the last id.

GET
/tiktok/live/transcribe/events

Receive each sentence of your LIVE transcription sessions as it is said, over one HTTP connection that stays open.

This endpoint is a stream that stays open, so it has no playground. Try it with curl -N, as below.

Overview

The answer is a stream of Server-Sent Events (text/event-stream).

  • One connection carries every session of your organization. Pass session_id to receive the events of one session only.
  • Every event except partial has an id, a number that grows by one with each event of your organization. Reconnect with the last id you received and the stream resumes with the event that followed: no final sentence is lost.
  • Without Last-Event-ID or after, the stream starts with the events to come. When session_id names a session that is already over, it starts with that session's ended event, so a reader waiting for the end is told at once.
  • The events of a session are kept until 24 hours after it ends.
  • A comment line (: keep-alive) is sent every 15 seconds when there is nothing else to send.
  • The server closes the connection from time to time (deployments). This is expected: reconnect with the last id.
  • An open stream keeps its sessions going. Closing it does not stop them, but a session nobody follows for 2 minutes (no stream, no read, no webhook) stops by itself with end_reason: "no_reader": reconnect promptly, or stop the sessions you leave.

Reading the stream costs nothing.

Request Parameters

ParameterInRequiredDescription
session_idqueryNoKeep the events of this session only.
afterqueryNoResume after this event id. 0 replays every event still kept.
Last-Event-IDheaderNoThe same as after, the way browsers' EventSource and most Server-Sent Events clients send it when they reconnect.

Example Usage

# -N turns off curl's buffering, so each event prints as it arrives
curl -N "https://api.vidnavigator.com/v1/tiktok/live/transcribe/events?session_id=3f0c1c1e-7a52-4d0e-9a3b-0d2f8c1b7e55" \
  -H "X-API-Key: YOUR_API_KEY"

The Stream

retry: 3000

id: 4820
event: started
data: {"session_id":"3f0c1c1e-7a52-4d0e-9a3b-0d2f8c1b7e55","status":"listening","started_at":"2026-12-03T11:18:20.031Z"}

event: partial
data: {"session_id":"3f0c1c1e-7a52-4d0e-9a3b-0d2f8c1b7e55","text":"I'm from","start":103.29}

id: 4821
event: final
data: {"session_id":"3f0c1c1e-7a52-4d0e-9a3b-0d2f8c1b7e55","seq":57,"start":103.29,"end":104.88,"text":"I'm from Gambia.","language":"en","timestamp":"2026-12-03T11:20:03.290Z"}

: keep-alive

id: 4822
event: ended
data: {"session_id":"3f0c1c1e-7a52-4d0e-9a3b-0d2f8c1b7e55","status":"ended","end_reason":"live_ended","error":null,"duration_seconds":1830.4,"segments_count":412,"ended_at":"2026-12-03T11:48:50.512Z"}

Each event has an event line (its type) and one data line: a JSON object that always carries session_id. Events are separated by an empty line.

eventdataWhen
startedsession_id, status, started_atThe session starts listening
finalsession_id and a final sentence: seq, start, end, text, language, timestamp, and speaker with include_speakersA sentence is complete: it will not change
partialsession_id, text, startThe sentence being said changed (sessions started with include_partials)
endedsession_id, status, end_reason, error, duration_seconds, segments_count, ended_atThe session is over
  • A final sentence has the fields of a sentence. Its seq counts the sentences of its session, from 1, without gaps.
  • A partial is updated several times a second and can still change. It has no id and is not replayed: the final sentence that follows replaces it.
  • On ended, status is ended (see end_reason) or failed (see error). The values are those of the session.
  • The stream opens with a block that holds no event: retry, how many milliseconds Server-Sent Events clients wait before they reconnect, and id, the number the stream starts after. Keep that id like any other: a connection cut before the first event then resumes where it should. Lines that start with : are comments: ignore them.

Resuming

Keep the id of the last event you handled. When the connection is cut, or when your own process restarts, connect again with that id:

curl -N "https://api.vidnavigator.com/v1/tiktok/live/transcribe/events" \
  -H "X-API-Key: YOUR_API_KEY" \
  -H "Last-Event-ID: 4821"

The stream resumes with event 4822. after=0 replays every event still kept, then goes on with the new ones.

  • The id counts the events of your organization, every session together, so one number resumes a connection that carries several sessions. With session_id, the ids you receive can skip numbers: the events of your other sessions took them.
  • The events of a session are no longer replayed once it ended more than 24 hours ago. Until then, the sentences of a session can also be read in pages with GET /tiktok/live/transcribe/{session_id}.
  • The Python and JavaScript SDKs reconnect by themselves with the last id. A reconnect loop over plain HTTP is in the guide: Transcribing a TikTok LIVE in Real Time.

Error Cases

Errors are answered as JSON, before the stream starts.

StatuserrorWhen
400invalid_parameterafter (or Last-Event-ID) is not an event id
403access_deniedLIVE transcription is not enabled for your organization
404session_not_foundNo session with this session_id in your organization, or it ended more than 24 hours ago

API reference

Authorization

ApiKeyAuth
headerX-API-Key<token>

API key authentication. Include your VidNavigator API key in the X-API-Key header.

Query Parameters

session_id?string

Keep the events of this session only.

Formatuuid
after?integer

Resume after this event id (same as the Last-Event-ID header). 0 replays every event still kept.

Range0 <= value

Header Parameters

Last-Event-ID?integer

The id of the last event received on a previous connection.

Range0 <= value

Response Body

The stream of events. It stays open until you close it.

response?stringtext/event-stream

Server-Sent Events: id, event and data lines, data being one JSON object.

Example Request
curl -X GET 'https://api.vidnavigator.com/v1/tiktok/live/transcribe/events'
Example Response
"string"

On this page