> ## Documentation Index
> Fetch the complete documentation index at: https://docs.vidnavigator.com/llms.txt
> Use this file to discover all available pages before exploring further.

# TikTok LIVE Room

> Get one TikTok LIVE room, synchronously: by `room_id`, by streamer (`username`), or by LIVE URL. Send exactly one of the three.

The room comes with its current state: whether it is live or has ended (and when), viewers now and since the start, followers gained during the LIVE, the streamer's bio, whether chat is on or the LIVE is for subscribers only, the number of products on sale, and playback URLs. A `username` returns the streamer's current LIVE, or their last one when they are offline (`status: "ended"`).

With `include_comments: true`, the response also has the latest comments (up to 50, newest first), the pinned comment, the LIVE's intro text and its top viewers. TikTok only keeps the latest ~50 comments of a LIVE available: earlier ones cannot be retrieved. A room that has ended returns no comments.

The likes, comment count and share count of a room are not available here: `POST /tiktok/live/search` returns them for each room it finds.

Usually answers in 1-5 s, sometimes up to ~30 s; allow a client timeout of 120 s.

Get one TikTok LIVE room right away, by room ID, by streamer or by LIVE URL, with its latest comments on request.

## Overview

This endpoint is **synchronous**: it answers with the room, no task to poll. Use it to:

* check whether a streamer is live right now, and with how many viewers;
* follow a room found by [TikTok LIVE Search](https://docs.vidnavigator.com/api-reference/endpoint/tiktok-live-search.md): is it still live, when did it end;
* read a LIVE's latest comments, its pinned comment and its top viewers.

The room comes with the fields of a LIVE search room (title, streamer, category, hashtags, stream URLs, ...) plus its status (`live` or `ended`), the time it ended, the followers the streamer gained during the LIVE, the streamer's bio, whether chat is on or the LIVE is for subscribers only, and the number of products on sale.

* A `username` returns the streamer's **current** LIVE, or their **last** one when they are offline (`status: "ended"`).
* It usually answers in 1 to 5 seconds, sometimes up to \~30 seconds. Allow a client timeout of 120 seconds.

> [!NOTE]
>
> **Comments:** TikTok only keeps the **latest \~50 comments** of a LIVE available. Earlier comments cannot be retrieved, by this endpoint or any other. A room that has ended returns no comments.

> [!NOTE]
>
> **Likes, comment count and share count** are not part of a single room: TikTok does not provide them there. [TikTok LIVE Search](https://docs.vidnavigator.com/api-reference/endpoint/tiktok-live-search.md) returns them for each room it finds.

## Billing

* **1 `residential_request` per room**, **2 with `include_comments`**.
* When the room has ended, the comments are not billed (1 in total).
* A room or account that does not exist (`404 live_not_found`) and a failed lookup (`502 live_room_unavailable`) are **not billed**.
* Pass `include_usage: true` to get the `usage` block in the response.

## Request Parameters

Send **exactly one** of `room_id`, `username` or `url`.

| Parameter | Type | Required | Description |
| - | - | - | - |
| `room_id` | string | One of three | A LIVE room ID, e.g. the `id` of a [LIVE search](https://docs.vidnavigator.com/api-reference/endpoint/tiktok-live-search.md) room. Send it as a **string**: room IDs have more digits than a JavaScript number holds. |
| `username` | string | One of three | The streamer's TikTok username, with or without `@`. |
| `url` | string | One of three | A LIVE URL (`https://www.tiktok.com/@username/live`), a profile URL (`https://www.tiktok.com/@username`), or a room's `share_url` (`https://m.tiktok.com/share/live/<room_id>`). Short `vm.tiktok.com` links are not accepted. |
| `include_comments` | boolean | No | Default `false`. Also return the latest comments, the pinned comment, the intro and the top viewers. Bills a second `residential_request`. |
| `comments_limit` | integer | No | Maximum comments returned with `include_comments`, from `1` to `50`. Default `50`. |
| `include_stream_urls` | boolean | No | Default `true`: the room carries its `stream_urls`. Pass `false` to leave them out. |
| `include_usage` | boolean | No | Default `false`. Add the `usage` block (charges of this request) to the response. |

## Example Usage

```bash cURL theme={null}
curl -X POST "https://api.vidnavigator.com/v1/tiktok/live/room" \
  -H "X-API-Key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "username": "creator",
    "include_comments": true,
    "comments_limit": 20
  }'
```

```python Python theme={null}
from vidnavigator import VidNavigatorClient

client = VidNavigatorClient(api_key="YOUR_API_KEY")
resp = client.get_tiktok_live_room(username="creator", include_comments=True, comments_limit=20)

room = resp.data.room
print(room.status, room.title, room.stats.viewers)
for comment in resp.data.comments or []:
    print(comment.created_at, comment.author.unique_id, comment.text)
```

```javascript JavaScript theme={null}
import { VidNavigatorClient } from 'vidnavigator';

const vn = new VidNavigatorClient({ apiKey: 'YOUR_API_KEY' });
const { room, comments } = await vn.getTikTokLiveRoom({ username: 'creator', include_comments: true, comments_limit: 20 });

console.log(room.status, room.title, room.stats?.viewers);
for (const c of comments ?? []) console.log(c.created_at, c.author?.unique_id, c.text);
```

## Success Response (200)

```json theme={null}
{
  "status": "success",
  "data": {
    "room": {
      "id": "7705498471838665494",
      "title": "Late night Q&A",
      "url": "https://www.tiktok.com/@creator/live",
      "status": "live",
      "ended_at": null,
      "share_url": "https://m.tiktok.com/share/live/7705498471838665494",
      "started_at": "2026-11-07T20:12:05Z",
      "author": {
        "id": "6628548115959152646",
        "unique_id": "creator",
        "nickname": "Creator",
        "sec_uid": "MS4wLjABAAAA...",
        "followers": 18867,
        "avatar_url": "https://p16-common-sign.tiktokcdn-eu.com/...",
        "bio": "Live every night at 9",
        "following": 312
      },
      "stats": {
        "viewers": 936,
        "total_viewers": 4005,
        "new_followers": 12
      },
      "hashtags": [],
      "category": null,
      "game_tags": [],
      "cover_url": "https://p16-common-sign.tiktokcdn-eu.com/...",
      "stream_urls": {
        "default_quality": "hd",
        "flv": { "hd": "https://pull-f5-tt03.tiktokcdn.com/stage/stream-123_hd.flv?expire=1795089584&sign=..." },
        "hls": { "hd": "https://pull-hls-f16-tt03.tiktokcdn.com/stage/stream-123_hd/index.m3u8?expire=1795089584&sign=..." },
        "audio_only": "https://pull-f5-tt03.tiktokcdn.com/stage/stream-123.flv?expire=1795089584&sign=...&only_audio=1",
        "expires_at": "2026-11-21T20:12:05Z"
      },
      "age_restricted": false,
      "subscribers_only": false,
      "chat_enabled": true,
      "products": 0
    },
    "comments": [
      {
        "id": "7705553654292319009",
        "text": "Where was this filmed?",
        "language": "en",
        "created_at": "2026-11-07T22:03:40.989Z",
        "author": {
          "id": "7272313064443167776",
          "unique_id": "viewer_one",
          "nickname": "Viewer One",
          "sec_uid": "MS4wLjABAAAA...",
          "followers": 831,
          "avatar_url": "https://p16-common-sign.tiktokcdn-eu.com/..."
        },
        "author_is_follower": true,
        "author_is_moderator": false,
        "author_is_subscriber": false
      }
    ],
    "pinned_comment": {
      "id": "7705548209969220385",
      "text": "Questions in the chat, answers live!",
      "language": "en",
      "created_at": "2026-11-07T21:42:35.069Z",
      "author": { "unique_id": "creator", "nickname": "Creator", "followers": 18867 },
      "author_is_follower": false,
      "author_is_moderator": false,
      "author_is_subscriber": false
    },
    "intro": "Every night: your questions, my answers.",
    "top_viewers": [
      { "rank": 1, "score": 300, "user": { "unique_id": "viewer_two", "nickname": "Viewer Two", "followers": 120 } }
    ]
  },
  "usage": {
    "charges": [
      { "service_type": "residential_request", "quantity": 2, "credits": 0.01 }
    ],
    "total_credits": 0.01
  }
}
```

`comments`, `pinned_comment`, `intro` and `top_viewers` are present only with `include_comments: true`; `usage` only with `include_usage: true`.

## Understanding the Response

#### `room`

The fields of a [LIVE search room](https://docs.vidnavigator.com/api-reference/endpoint/tiktok-live-search.md#results), plus:

| Field | Description |
| - | - |
| `status` | `live` while broadcasting, `ended` once finished |
| `ended_at` | When the LIVE ended (UTC, ISO 8601); `null` while it is live |
| `share_url` | The room's share link. It can be passed back as `url`. |
| `author.bio` | The streamer's bio |
| `author.following` | Accounts the streamer follows |
| `stats` | `viewers` (watching now, `0` once ended), `total_viewers` (since the LIVE started), `new_followers` (followers gained during this LIVE). No `likes`, `comments` or `shares`: see the note above. |
| `age_restricted` | The LIVE is restricted to adult viewers |
| `subscribers_only` | Only the streamer's paying subscribers can watch |
| `chat_enabled` | Viewers can comment |
| `products` | Number of products on sale in the LIVE (`0` when none) |

#### `comments`

The latest comments, **newest first**, at most `comments_limit`.

| Field | Description |
| - | - |
| `id` | Comment ID |
| `text` | The comment |
| `language` | Language TikTok detected (ISO 639-1), or `null` |
| `created_at` | When it was posted (UTC, ISO 8601, milliseconds) |
| `author` | `id`, `unique_id`, `nickname`, `sec_uid`, `followers`, `avatar_url` |
| `author_is_follower` | The author follows the streamer |
| `author_is_moderator` | The author moderates this LIVE |
| `author_is_subscriber` | The author is a paying subscriber of the streamer |

#### `pinned_comment`, `intro`, `top_viewers`

* `pinned_comment`: the comment the streamer pinned, same shape as a comment, or `null`.
* `intro`: the LIVE's intro text, if the streamer set one.
* `top_viewers`: the LIVE's top viewers by gifts sent (`rank`, `score`, `user`), when TikTok shows them. Can be empty.

## Error Cases

| Status | `error` | When |
| - | - | - |
| `400` | `request_body_required` | No JSON body |
| `400` | `invalid_parameter` | None, or more than one, of `room_id`, `username`, `url` |
| `400` | `invalid_room_id` / `invalid_username` / `invalid_url` | The room ID, username or URL is malformed |
| `400` | `invalid_include_comments` / `invalid_comments_limit` / `invalid_include_stream_urls` | Wrong type, or `comments_limit` outside 1-50 |
| `402` | `limit_exceeded` | Not enough credits (checked before TikTok is contacted) |
| `404` | `live_not_found` | The room ID does not exist, or the account does not exist or has never gone LIVE. Not billed. |
| `502` | `live_room_unavailable` | TikTok did not serve the room. Retry in a moment. Not billed. |

## Tips

* To follow a LIVE over time, call this endpoint again with the same `room_id`: each call is a fresh snapshot.
* Calling with `username` is the simplest way to know whether a creator is live now: `status` tells you, and `ended_at` when their last LIVE ended.
* Likes, comment counts and share counts come with [LIVE search](https://docs.vidnavigator.com/api-reference/endpoint/tiktok-live-search.md) results: keep them from the search that found the room.


## OpenAPI

````yaml POST /tiktok/live/room
openapi: 3.0.3
info:
  title: VidNavigator Developer API
  description: >-
    The VidNavigator Developer API provides programmatic access to video
    analysis, transcription, and search capabilities.


    ## Authentication

    All endpoints require API key authentication via the `X-API-Key` header:

    ```

    X-API-Key: YOUR_API_KEY

    ```


    ## Rate Limits

    Check the documentation for the rate limits for each endpoint.


    ## Long videos and async jobs

    The speech-to-text endpoints (`/transcribe`, `/extract/video` with
    `transcribe=true`, `/tweet/statement`) run for as long as the media is long.
    A synchronous request holds the HTTP connection open for the whole download
    and transcription, which is reliable for short clips and not for long ones —
    clients, reverse proxies and marketplace gateways all time out.


    **For media longer than ~10 minutes, use the async twin of the endpoint:**


    | Synchronous | Async submit | Poll |

    |---|---|---|

    | `POST /transcribe` | `POST /transcribe/async` | `GET
    /transcribe/{task_id}` |

    | `POST /extract/video` | `POST /extract/video/async` | `GET
    /extract/video/{task_id}` |

    | `POST /tweet/statement` | `POST /tweet/statement/async` | `GET
    /tweet/statement/{task_id}` |


    The async endpoint returns `202` with a `task_id` immediately. Poll the
    `check_status_url` until `task_status` is `completed` or `failed`; results
    are retained for 1 hour after the job finishes. Polling is free.


    The synchronous endpoints enforce a **10-minute** limit, rejecting longer
    media with `video_too_long` (HTTP 400).


    Past ten minutes a single HTTP connection is not a reliable way to deliver a
    transcription, so send long media to the async endpoints — they have no
    duration cap. See https://docs.vidnavigator.com/guides/async-jobs.


    ## Webhooks

    Rather than polling, an async job can call you back. Pass `webhook_url` on
    the submit request, or configure an account-level default in Studio → API;
    the per-request value wins, and passing `"webhook_url": ""` opts a single
    job out of the default.


    Deliveries are signed with HMAC-SHA256 in the `X-VidNavigator-Signature`
    header (`t=<unix_ts>,v1=<hex>`, computed over `"{t}.{raw_body}"` using your
    signing secret). Delivery is at-least-once and best effort — five attempts
    backing off over ~13 minutes — so make your receiver idempotent on
    `X-VidNavigator-Delivery` and treat polling as the source of truth.


    **Auto-disable:** an account-level default endpoint that fails 20 deliveries
    in a row over more than 72 hours is switched off automatically, and the
    owner is notified in Studio. Both conditions must hold, so a busy afternoon
    of failures will not disable a healthy endpoint and neither will two
    failures a week apart; a single successful delivery resets the run. While
    disabled, jobs still run and results are still available by polling — only
    the callback stops. Re-enable it in Studio → API once the receiver is fixed.
    A per-request `webhook_url` is never auto-disabled, because it is not
    stored. Full contract: https://docs.vidnavigator.com/guides/webhooks


    ## Error Handling

    The API uses standard HTTP status codes and returns error responses in JSON
    format:

    ```json

    {
      "status": "error",
      "error": "error_type",
      "message": "Human readable error message"
    }

    ```

    Actionable errors also carry a `docs_url`. Error reference:
    https://docs.vidnavigator.com/reference/errors
  version: 1.0.0
  contact:
    name: VidNavigator Support
    url: https://vidnavigator.com/support
    email: support@vidnavigator.com
  license:
    name: Proprietary
    url: https://vidnavigator.com/terms
servers:
  - url: https://api.vidnavigator.com/v1
    description: Production server
security:
  - ApiKeyAuth: []
tags:
  - name: Transcripts
    description: Extract transcripts from online videos
  - name: TikTok
    description: Scrape TikTok profiles, and search TikTok videos and LIVE rooms by keyword
  - name: Files
    description: Manage uploaded audio/video files
  - name: Analysis
    description: AI-powered content analysis
  - name: Extraction
    description: >-
      Extract structured data from video and file transcripts using custom
      schemas
  - name: Namespaces
    description: Organize uploaded files into namespaces (folders)
  - name: Search
    description: Search videos and files using AI
  - name: System
    description: System health and information
  - name: Tweet Analysis
    description: Extract structured claims and metadata from X/Twitter tweets
  - name: Webhooks
    description: >-
      Callbacks for async jobs. Configure an account-level default endpoint and
      signing secret in Studio → API, or pass `webhook_url` per request. The
      `WebhookEvent` schema documents the payload and signature. Full contract:
      https://docs.vidnavigator.com/guides/webhooks A default endpoint that
      fails 20 deliveries in a row over more than 72 hours is disabled
      automatically and the owner notified; polling is unaffected.
paths:
  /tiktok/live/room:
    post:
      tags:
        - TikTok
      summary: Get one TikTok LIVE room (sync)
      description: >-
        Get one TikTok LIVE room, synchronously: by `room_id`, by streamer
        (`username`), or by LIVE URL. Send exactly one of the three.


        The room comes with its current state: whether it is live or has ended
        (and when), viewers now and since the start, followers gained during the
        LIVE, the streamer's bio, whether chat is on or the LIVE is for
        subscribers only, the number of products on sale, and playback URLs. A
        `username` returns the streamer's current LIVE, or their last one when
        they are offline (`status: "ended"`).


        With `include_comments: true`, the response also has the latest comments
        (up to 50, newest first), the pinned comment, the LIVE's intro text and
        its top viewers. TikTok only keeps the latest ~50 comments of a LIVE
        available: earlier ones cannot be retrieved. A room that has ended
        returns no comments.


        The likes, comment count and share count of a room are not available
        here: `POST /tiktok/live/search` returns them for each room it finds.


        Usually answers in 1-5 s, sometimes up to ~30 s; allow a client timeout
        of 120 s.
      operationId: getTikTokLiveRoom
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              description: Exactly one of `room_id`, `username` or `url`.
              properties:
                room_id:
                  type: string
                  pattern: ^[0-9]{1,25}$
                  description: >-
                    A LIVE room ID, as a string (it has more digits than a
                    JavaScript number holds), e.g. the `id` of a `POST
                    /tiktok/live/search` result.
                  example: '7705498471838665494'
                username:
                  type: string
                  description: The streamer's TikTok username, with or without `@`.
                  example: tiktok
                url:
                  type: string
                  description: >-
                    A LIVE URL (`https://www.tiktok.com/@username/live`), a
                    profile URL (`https://www.tiktok.com/@username`), or a
                    room's `share_url`
                    (`https://m.tiktok.com/share/live/<room_id>`). Short
                    `vm.tiktok.com` links are not accepted.
                  example: https://www.tiktok.com/@tiktok/live
                include_comments:
                  type: boolean
                  default: false
                  description: >-
                    Also return the latest comments, the pinned comment, the
                    intro and the top viewers.
                comments_limit:
                  type: integer
                  minimum: 1
                  maximum: 50
                  default: 50
                  description: Maximum comments returned with `include_comments`.
                include_stream_urls:
                  type: boolean
                  default: true
                  description: Include the room's playback URLs (`room.stream_urls`).
                include_usage:
                  type: boolean
                  default: false
                  description: >-
                    When true, the response includes the `usage` block of this
                    request.
      responses:
        '200':
          description: The room.
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - success
                  data:
                    type: object
                    properties:
                      room:
                        $ref: '#/components/schemas/TikTokLiveRoomDetail'
                      comments:
                        type: array
                        items:
                          $ref: '#/components/schemas/TikTokLiveComment'
                        description: >-
                          Latest comments, newest first. Only with
                          `include_comments`.
                      pinned_comment:
                        allOf:
                          - $ref: '#/components/schemas/TikTokLiveComment'
                        nullable: true
                        description: >-
                          The comment the streamer pinned, if any. Only with
                          `include_comments`.
                      intro:
                        type: string
                        nullable: true
                        description: >-
                          The LIVE's intro text, if the streamer set one. Only
                          with `include_comments`.
                      top_viewers:
                        type: array
                        items:
                          $ref: '#/components/schemas/TikTokLiveTopViewer'
                        description: >-
                          Top viewers by gifts sent, when TikTok shows them.
                          Only with `include_comments`.
                  usage:
                    $ref: '#/components/schemas/UsageBlock'
        '400':
          $ref: '#/components/responses/BadRequest'
        '402':
          $ref: '#/components/responses/PaymentRequired'
        '404':
          description: >-
            No such LIVE room: the room ID does not exist, or the account does
            not exist or has never gone LIVE.
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  error:
                    type: string
                    enum:
                      - live_not_found
                  message:
                    type: string
                  usage:
                    $ref: '#/components/schemas/UsageBlock'
        '429':
          $ref: '#/components/responses/RateLimitExceeded'
        '500':
          $ref: '#/components/responses/InternalServerError'
        '502':
          description: TikTok did not serve the room. Retry later.
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  error:
                    type: string
                    enum:
                      - live_room_unavailable
                  message:
                    type: string
                  usage:
                    $ref: '#/components/schemas/UsageBlock'
components:
  schemas:
    TikTokLiveRoomDetail:
      type: object
      description: >-
        A TikTok LIVE room as `POST /tiktok/live/room` returns it: the fields of
        a LIVE search room, plus its status and details. `stats` has no `likes`,
        `comments` or `shares`: TikTok gives those to LIVE search only.
      properties:
        id:
          type: string
          description: LIVE room ID.
          example: '7704440240265644830'
        title:
          type: string
          nullable: true
          example: 'Ranked grind #fortnite'
        url:
          type: string
          format: uri
          nullable: true
          example: https://www.tiktok.com/@creator/live
        status:
          type: string
          enum:
            - live
            - ended
            - unknown
          description: '`live` while broadcasting, `ended` once finished.'
        ended_at:
          type: string
          format: date-time
          nullable: true
          description: When the LIVE ended (UTC, ISO 8601); null while it is live.
        share_url:
          type: string
          format: uri
          nullable: true
          description: The room's share link. It can be passed back as `url`.
          example: https://m.tiktok.com/share/live/7705498471838665494
        started_at:
          type: string
          format: date-time
          nullable: true
          description: When the LIVE started (UTC, ISO 8601).
        author:
          type: object
          properties:
            id:
              type: string
              nullable: true
            unique_id:
              type: string
              nullable: true
              description: Username, without @.
            nickname:
              type: string
              nullable: true
            sec_uid:
              type: string
              nullable: true
            followers:
              type: integer
              nullable: true
            avatar_url:
              type: string
              format: uri
              nullable: true
            bio:
              type: string
              nullable: true
              description: The streamer's bio.
            following:
              type: integer
              nullable: true
              description: Accounts the streamer follows.
        stats:
          type: object
          properties:
            viewers:
              type: integer
              nullable: true
              description: Viewers watching now (0 once the LIVE has ended).
            total_viewers:
              type: integer
              nullable: true
              description: Viewers since the LIVE started.
            new_followers:
              type: integer
              nullable: true
              description: Followers the streamer gained during this LIVE.
        hashtags:
          type: array
          items:
            type: string
          description: Hashtags written in the title, without `#`.
          example:
            - fortnite
        category:
          type: string
          nullable: true
          description: The LIVE's category on TikTok.
          example: Gaming
        game_tags:
          type: array
          items:
            type: string
          example:
            - Fortnite
        cover_url:
          type: string
          format: uri
          nullable: true
        stream_urls:
          type: object
          description: >-
            Playback URLs, omitted when `include_stream_urls` is `false`. They
            play while the LIVE is on, and stop when it ends.
          properties:
            default_quality:
              type: string
              nullable: true
              description: The quality TikTok plays by default.
              example: hd
            flv:
              type: object
              additionalProperties:
                type: string
                format: uri
              description: >-
                HTTP-FLV URLs keyed by quality: `origin`, `uhd`, `hd`, `sd`,
                `ld` (only those the LIVE offers).
              example:
                hd: >-
                  https://pull-f5-tt01.tiktokcdn-us.com/game/stream-123_hd.flv?expire=1795089584&sign=...
            hls:
              type: object
              additionalProperties:
                type: string
                format: uri
              description: >-
                HLS (`.m3u8`) URLs keyed by quality, when TikTok provides them.
                Can be empty.
              example:
                hd: >-
                  https://pull-hls-f16-tt01.tiktokcdn-us.com/game/stream-123_hd/index.m3u8?expire=1795089584&sign=...
            audio_only:
              type: string
              format: uri
              nullable: true
              description: HTTP-FLV URL of the audio-only stream.
            expires_at:
              type: string
              format: date-time
              nullable: true
              description: Expiry of the URL signatures. The LIVE ending stops them sooner.
        age_restricted:
          type: boolean
          description: The LIVE is restricted to adult viewers.
        subscribers_only:
          type: boolean
          description: Only the streamer's paying subscribers can watch.
        chat_enabled:
          type: boolean
          description: Viewers can comment.
        products:
          type: integer
          description: Number of products on sale in the LIVE (0 when none).
    TikTokLiveComment:
      type: object
      description: A comment posted in a LIVE's chat.
      properties:
        id:
          type: string
          nullable: true
          example: '7705553654292319009'
        text:
          type: string
          example: Where was this filmed?
        language:
          type: string
          nullable: true
          description: Language TikTok detected for the comment (ISO 639-1), or null.
          example: fr
        created_at:
          type: string
          format: date-time
          nullable: true
          description: When the comment was posted (UTC, ISO 8601, milliseconds).
        author:
          $ref: '#/components/schemas/TikTokLiveUser'
        author_is_follower:
          type: boolean
          description: The author follows the streamer.
        author_is_moderator:
          type: boolean
          description: The author moderates this LIVE.
        author_is_subscriber:
          type: boolean
          description: The author is a paying subscriber of the streamer.
    TikTokLiveTopViewer:
      type: object
      description: One of the LIVE's top viewers, ranked by the gifts they sent.
      properties:
        rank:
          type: integer
          nullable: true
          example: 1
        score:
          type: integer
          nullable: true
          description: TikTok's gift score for this viewer.
        user:
          $ref: '#/components/schemas/TikTokLiveUser'
    UsageBlock:
      type: object
      description: >-
        Per-call usage, returned only when the request sets
        `include_usage=true`: the charges of this request, one entry per
        `service_type`, and the total credits deducted. A waived charge carries
        `waived: true` and `credits_saved`, with a top-level
        `waived.credits_saved` summary.


        For endpoints that run an AI analysis (`/extract/video`,
        `/extract/file`, `/analyze/video`, `/analyze/file`, `/youtube/search`),
        the `analysis_request` entry carries a nested `tokens` object with the
        request's token counts.
      properties:
        charges:
          type: array
          description: >-
            The charges of this request, one entry per `service_type`. A charge
            reversed within the request is left out.
          items:
            type: object
            properties:
              service_type:
                type: string
                enum:
                  - standard_request
                  - residential_request
                  - transcription_hour
                  - analysis_request
                  - search_request
                  - scene_analysis_hour
                description: The kind of charge.
              quantity:
                type: number
                description: Net units consumed (hours for `transcription_hour`).
              credits:
                type: number
                description: Net credits deducted for this charge; 0 when it was waived.
              waived:
                type: boolean
                description: True when this charge was waived.
              credits_saved:
                type: number
                description: >-
                  When waived=true, the credits that would have been charged
                  otherwise.
              tokens:
                type: object
                description: >-
                  Only on the `analysis_request` entry of endpoints that run an
                  AI analysis: the request's total token counts.
                properties:
                  prompt_tokens:
                    type: integer
                    description: Total input tokens.
                  completion_tokens:
                    type: integer
                    description: Total output tokens.
                  total_tokens:
                    type: integer
                    description: Sum of `prompt_tokens` + `completion_tokens`.
        total_credits:
          type: number
          description: >-
            Net credits deducted by this request (sum of all
            `charges[].credits`).
        waived:
          type: object
          description: Present only when one or more charges in this request were waived.
          properties:
            credits_saved:
              type: number
              description: Total credits waived on this request.
    TikTokLiveUser:
      type: object
      description: A TikTok user.
      properties:
        id:
          type: string
          nullable: true
        unique_id:
          type: string
          nullable: true
          description: Username, without @.
        nickname:
          type: string
          nullable: true
        sec_uid:
          type: string
          nullable: true
        followers:
          type: integer
          nullable: true
        avatar_url:
          type: string
          format: uri
          nullable: true
  responses:
    BadRequest:
      description: >-
        Bad request - invalid parameters. On /transcribe the `error` field may
        be `missing_parameter`, `unsupported_platform`, `unsupported_url`,
        `invalid_url`, `request_body_required`, `video_too_long`, or
        `no_videos_found` (the post carries no video).
      content:
        application/json:
          schema:
            type: object
            properties:
              status:
                type: string
                enum:
                  - error
              error:
                type: string
              message:
                type: string
    PaymentRequired:
      description: Usage limit exceeded - upgrade required
      content:
        application/json:
          schema:
            type: object
            properties:
              status:
                type: string
                enum:
                  - error
              error:
                type: string
                enum:
                  - limit_exceeded
              message:
                type: string
    RateLimitExceeded:
      description: Rate limit exceeded
      content:
        application/json:
          schema:
            type: object
            properties:
              status:
                type: string
                enum:
                  - error
              error:
                type: string
                enum:
                  - limit_exceeded
              message:
                type: string
              usage:
                type: integer
              limit:
                type: integer
    InternalServerError:
      description: Internal server error
      content:
        application/json:
          schema:
            type: object
            properties:
              status:
                type: string
                enum:
                  - error
              error:
                type: string
                enum:
                  - metadata_fetch_failed
                  - audio_extraction_failed
                  - transcription_failed
                  - internal_server_error
              message:
                type: string
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: X-API-Key
      description: >-
        API key authentication. Include your VidNavigator API key in the
        X-API-Key header.

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.