{
  "openapi": "3.0.3",
  "info": {
    "title": "NetShort & TikTok PineDrama - Native Reverse Engineered API Specification",
    "description": "# Tài Liệu Kỹ Thuật API Gốc (Raw / Native APIs)\n\nTài liệu này đặc tả trực tiếp giao thức mạng, cấu trúc request/response, thuật toán mã hóa bất đối xứng, và các endpoints **GỐC (ORIGINAL)** được gọi từ ứng dụng Android của hai nền tảng:\n\n1. **NetShort** (`com.netshort.app` / `appsecapi.netshort.com`)\n2. **Pine Drama (TikTok Mini Drama)** (`com.ss.android.ttmd.video` / `api.tiktokv.com` & `api-va.tiktokv.com` - ByteDance)\n\n---\n\n## 🔐 GIAO THỨC MÃ HÓA CỦA NETSHORT (Hybrid RSA-2048 + AES-128-ECB PKCS7)\n\nMọi request gửi lên `appsecapi.netshort.com` đều phải tuân theo chuẩn mã hóa 2 lớp:\n1. Client sinh ra chuỗi **AES Key** ngẫu nhiên 32 ký tự (chữ thường + số).\n2. Mã hóa JSON payload bằng **AES/ECB/PKCS7Padding** với AES Key vừa sinh, sau đó Base64 encode -> đặt vào `HTTP Body`.\n3. Base64 encode chuỗi AES Key -> mã hóa bằng **RSA Public Key (2048-bit)** của Server với padding `PKCS1v15` -> Base64 encode -> gửi qua Header `encrypt-key`.\n4. Khi Server trả lời: Server gửi kèm header `encrypt-key`. Client dùng **Client RSA Private Key** (đã reverse trích xuất từ APK) để giải mã RSA lấy lại AES Key của server, sau đó dùng AES/ECB/PKCS7 giải mã Body ra JSON gốc.\n\n### Bảng Khóa Mã Hóa Trích Xuất:\n- **Server RSA Public Key (Client -> Server)**:\n  ```text\n  MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA2poXMstZ8NCWE7915MXzDWC5/t+oB2waGfskPqSZwLqxd4ZBR0H1\n  cb1tAZRZcV7P+LmOd6SYNxhnELaWuKTD+D3xkz8Tt1L5j/ynGqVt1MDbiQIEzXQKUkNDSH6T0A+Xzo/67/8QOQXlVJfW06re\n  sbaeNvibfx6Qc78j96bCIPlxPrtieilVTBHUFOXjirxK/ki/mO8P2smRbpt73fsQWdGmTGMfYGvfPApGyxbxLkL/qrBjU25X\n  pM8a0MBqzFWUAchHmqSBJ6Mbfam1SSgf3b2U28s67nOW+JiOrhd6iVLcsLFxXA54HX+Zbej3AbOB6jKaEmp/bz1amneE1NYX\n  wwIDAQAB\n  ```\n- **Client RSA Private Key (Giải mã Response)**:\n  ```text\n  MIIEvQIBADANBgkqhkiG9w0BAQEFAASCBKcwggSjAgEAAoIBAQCK0Tl1pd7bjTRU93bWoHW1hLCDj2+9bg1MgY8j5C7xXaw6\n  bJfToXhWbH1fXNbnFFVqxyYNErcuOUwJZxyDgcxUXM4yWnRseb2GF97GOicAQ2keDzVYmwky4lrSRwvcXutJRLPUCRQNfc6u\n  pfk2G5TKh6/CcP4TV1eXTF7+vdEw2SHxAOITKbSfcaZXr/hVs6a1aRHsBF+7RG99ebwZIP6/AgIyqX9RbDVN6ixi1v2G3/bw\n  AULHLSqGdSaqij/ca17fbFGITaeCeEaZ6d/P4ZuOK+PEPdbPQt6SbY4lZaYwRvdrpH73kigPITgDzIDONFybJ1m7wRKlq1wx\n  WHwbimptAgMBAAECggEAPz3cYJXFtt5YphDrahJGLgEabYVOUc2ub1li/eX54OpdCWzpqneYnD7myyg/m5zu4SuDUVdibsOZ\n  uXrpSZw7m3+ATP5apgS8bDe5vTNHC16qqBAjrI9NHIp09/F4HNh9dq6/Am10XkUfgP+KTrU4DyDL2NijV+pltD8N1B5kDE1i\n  gokVcsavhnu2INoMRXYE78Wq6urNECuFWw9hldv81M9m2w56t1CQOUukpo4mfmLjZRe2s+kwtcBVefGHP8Cj0OeH2dGltjl2\n  YSQMRBFUCVoixYpOrcjIHoqzWri8IfUZ2tW+nUvHl5IZ9RVxefnFaLGnxiXd2sk6Sn4aD/l9YQKBgQDVv3HaOZxHRqlNSPrN\n  GqplGhE066HnDsq6MlPukiovxE43CRBmpTnk9zDCqrDh9t2HbJuao7nSq5WlBERWgwqXU/qDpH43W7Y/lJfHkDv6A2m0viJa\n  0a9x8+CJpNnCDu1ATo4/IQKwoXYice6JKnUyXgkGKn+HipiN6tO0EtWHlQKBgQCmQfklKFtXtm/FZ6NIMs+d+EyvaE5xNLKG\n  YQxmiCR10WGYd8ZV+K0Q6qXHS+a32TirWB9F3TqPOklTytMrfPZB3BCXj4weEldb8W716G8FYf7LLhaT+MdpF7KDcruObwoQ\n  AvKV3N4eX6tUEMmdrx9hpCmmIU5EeXUkhGdmwk7BeQKBgAIXMkThJV8pGMTRvuo8pYgBnkN3PoklAuSZU2rU8Sawc9dj9k4a\n  tZtAs7BjvQEoyffmHwt/KHUgCoGnrgdulq7uOlgJRtbBxeGPUYC5L2z9lY4YAfwDawThTsPp4dtdDAMCAbAqYX1axu4FUUD0\n  MltAwjPWPJMVzvIsZs+vE3mVAoGAJPja3OaCmZjadj2709xoyypic0dw2j/ry3JdfZec9A5h87P/CTNJ2U81GoLIhe3qakAo\n  hDLUSPGfSOD74NnjMXYswmeLs0xE3Q9tq4XK2pmWPby8DJ/wSHCapByplN0gkbr2E1mQk5SW1xT8oPJGukH1eRpC+3s/D6Xa\n  EMH5HZECgYEAigoX5l39LDsCgeaUcI4S9grkaas/WsKv37eqo3oD9Qk6VFiMM5L5Zig6aXJxuAPLVjb38caJRPmPmOXLT2kE\n  P1E1h6OJOhEhETwVIUtcBzsK25ju9LqL89bC+W0uS7BPvk6Tcws/tXHCkQCTgb9jVXceZ2ox+6axvlW/5WgHt5Q=\n  ```\n\n---\n\n## 📱 GIAO THỨC CỦA BYTEDANCE PINEDRAMA (TTNet & Cronet Architecture)\n\nMọi request gửi lên `api.tiktokv.com` hoặc `api-va.tiktokv.com` yêu cầu bộ tham số thiết bị chuẩn của ByteDance TTNet SDK:\n- **App ID (`aid`)**: `845221`\n- **App Name**: `tiktok_drama`\n- **Version**: `47.4.3` (`version_code=470403`, `manifest_version_code=2024704030`)\n- **Device ID (`device_id`)**: `7587243284403439111`\n- **Install ID (`iid`)**: `7699439076206675720`\n- **User-Agent**: `com.ss.android.ttmd.video/2024704030 (Linux; U; Android 14; vi_VN; SM-A525F; Build/UP1A.231005.007; Cronet/TTNetVersion:5d8bb63a 2024-08-01 QuicVersion:4678b87e 2024-06-25)`",
    "version": "1.0.0-native",
    "contact": {
      "name": "RoShort Architecture & RE Team",
      "url": "https://roshort.pages.dev"
    }
  },
  "servers": [
    {
      "url": "https://appsecapi.netshort.com/prod-app-api",
      "description": "NetShort Official Production Gateway (HTTPS, Hybrid RSA+AES WAF)"
    },
    {
      "url": "https://api.tiktokv.com",
      "description": "ByteDance TikTok Mini Drama Main API (Catalog, Episode Panel & Search)"
    },
    {
      "url": "https://api-va.tiktokv.com",
      "description": "ByteDance TikTok Mini Drama Virginia Cluster (Direct Video Feed & Streaming CDN)"
    }
  ],
  "tags": [
    {
      "name": "NetShort Native Auth",
      "description": "Xác thực danh tính thiết bị và phiên làm việc gốc của NetShort"
    },
    {
      "name": "NetShort Native Theater",
      "description": "Cấu trúc rạp chiếu, cây danh mục và phân bổ nguồn phim theo kênh"
    },
    {
      "name": "NetShort Native Playback",
      "description": "Chi tiết phim, danh sách tập, Play Voucher và giải mã stream HLS"
    },
    {
      "name": "NetShort Native Search & Wallet",
      "description": "Tìm kiếm phim, từ khóa hot và bảng giá In-App Purchase SKUs"
    },
    {
      "name": "ByteDance Native Catalog",
      "description": "Khám phá kho phim, thể loại và bảng xếp hạng từ ByteDance TikTok Drama Center"
    },
    {
      "name": "ByteDance Native Episodes & Stream",
      "description": "Lấy danh sách tập phim và trích xuất direct video MP4 từ TikTok CDN"
    },
    {
      "name": "ByteDance Native Search",
      "description": "Tìm kiếm thời gian thực trong kho dữ liệu TikTok Mini Drama"
    }
  ],
  "paths": {
    "/auth/login": {
      "post": {
        "tags": ["NetShort Native Auth"],
        "summary": "NetShort Visitor Login (Đăng nhập Khách / Thiết bị)",
        "description": "Gửi thông tin phần cứng thiết bị Android để nhận JWT token và định danh người dùng. Body và Response đều được mã hóa bằng AES-128-ECB PKCS7.",
        "parameters": [
          {
            "$ref": "#/components/parameters/NetShortHeader_EncryptKey"
          },
          {
            "$ref": "#/components/parameters/NetShortHeader_DeviceCode"
          },
          {
            "$ref": "#/components/parameters/NetShortHeader_OS"
          },
          {
            "$ref": "#/components/parameters/NetShortHeader_Version"
          },
          {
            "$ref": "#/components/parameters/NetShortHeader_VersionCode"
          },
          {
            "$ref": "#/components/parameters/NetShortHeader_Model"
          },
          {
            "$ref": "#/components/parameters/NetShortHeader_Canary"
          },
          {
            "$ref": "#/components/parameters/NetShortHeader_Timestamp"
          }
        ],
        "requestBody": {
          "required": true,
          "description": "Payload trước khi mã hóa AES: `{\"source\":\"visitor\",\"deviceCode\":\"...\",\"model\":\"SM-S908N\",\"os\":\"android\",\"osVer\":\"14\",\"appVer\":\"2.3.3\"}`. Sau khi mã hóa đặt vào raw string.",
          "content": {
            "application/json": {
              "schema": {
                "type": "string",
                "example": "BASE64_AES_ENCRYPTED_BODY_STRING"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Đăng nhập thành công (kèm header `encrypt-key` trả về)",
            "headers": {
              "encrypt-key": {
                "schema": {
                  "type": "string"
                },
                "description": "RSA-encrypted key của Server dùng giải mã Body"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NetShortRawResponse"
                },
                "example": {
                  "code": 200,
                  "msg": "success",
                  "data": {
                    "token": "eyJhbGciOiJIUzUxMiJ9...",
                    "loginUser": {
                      "userId": "1948839211029",
                      "goldCoinPrice": 120,
                      "businessId": "netshort_global"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/video/shortPlay/theater/home/info": {
      "post": {
        "tags": ["NetShort Native Theater"],
        "summary": "Lấy Cấu Trúc Rạp Chiếu & Kênh Phân Phối (Theater Info)",
        "description": "Lấy danh sách các rạp chiếu, cây danh mục con (Explore, Popular, Drama) và param `jsonParam` cần thiết cho các request tiếp theo.",
        "parameters": [
          {
            "$ref": "#/components/parameters/NetShortHeader_EncryptKey"
          },
          {
            "$ref": "#/components/parameters/NetShortHeader_Auth"
          },
          {
            "$ref": "#/components/parameters/NetShortHeader_DeviceCode"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "string",
                "example": "BASE64_AES_ENCRYPTED_EMPTY_JSON"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Dữ liệu cấu trúc rạp chiếu",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NetShortRawResponse"
                }
              }
            }
          }
        }
      }
    },
    "/video/shortPlay/theater/home/channel-video": {
      "post": {
        "tags": ["NetShort Native Theater"],
        "summary": "Lấy Danh Sách Cột Phim Theo Channel ID",
        "description": "Lấy toàn bộ các cột phim (Column) và danh sách phim thịnh hành, phim mới, đề xuất của 1 kênh phân phối cụ thể.",
        "parameters": [
          {
            "$ref": "#/components/parameters/NetShortHeader_EncryptKey"
          },
          {
            "$ref": "#/components/parameters/NetShortHeader_Auth"
          }
        ],
        "requestBody": {
          "required": true,
          "description": "Payload gốc: `{\"theaterId\":1,\"channelId\":444,\"newUser\":false,\"codec\":\"h264\",\"playClarity\":\"720p\",\"jsonParam\":\"...\"}`",
          "content": {
            "application/json": {
              "schema": {
                "type": "string",
                "example": "BASE64_AES_ENCRYPTED_PAYLOAD"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Danh sách các cột nội dung và thẻ phim",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NetShortRawResponse"
                }
              }
            }
          }
        }
      }
    },
    "/video/shortPlay/base/detail_info/V2": {
      "post": {
        "tags": ["NetShort Native Playback"],
        "summary": "Chi Tiết Phim & Danh Sách Tập V2",
        "description": "Trả về chi tiết metadata phim, tổng số tập, điểm bắt đầu tính phí (Pay Point), giá mở khóa mỗi tập và danh sách Play Vouchers cho từng tập.",
        "parameters": [
          {
            "$ref": "#/components/parameters/NetShortHeader_EncryptKey"
          },
          {
            "$ref": "#/components/parameters/NetShortHeader_Auth"
          }
        ],
        "requestBody": {
          "required": true,
          "description": "Payload gốc: `{\"shortPlayId\":\"928174\",\"codec\":\"h264\",\"playClarity\":\"720p\",\"isRequestReserve\":false}`",
          "content": {
            "application/json": {
              "schema": {
                "type": "string",
                "example": "BASE64_AES_ENCRYPTED_PAYLOAD"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Chi tiết phim và danh sách tập phim",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NetShortRawResponse"
                }
              }
            }
          }
        }
      }
    },
    "/video/shortPlay/base/play_info": {
      "post": {
        "tags": ["NetShort Native Playback"],
        "summary": "Giải Mã Play Voucher Thành Direct Video Stream",
        "description": "Chuyển đổi `playVoucher` hoặc `sdkVid` thành link stream trực tiếp `.m3u8` hoặc `.mp4` đa độ phân giải kèm phụ đề.",
        "parameters": [
          {
            "$ref": "#/components/parameters/NetShortHeader_EncryptKey"
          },
          {
            "$ref": "#/components/parameters/NetShortHeader_Auth"
          }
        ],
        "requestBody": {
          "required": true,
          "description": "Payload gốc: `{\"shortPlayId\":\"928174\",\"episodeNo\":1,\"codec\":\"h264\",\"playClarity\":\"720p\"}`",
          "content": {
            "application/json": {
              "schema": {
                "type": "string",
                "example": "BASE64_AES_ENCRYPTED_PAYLOAD"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Direct stream URLs và phụ đề",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NetShortRawResponse"
                }
              }
            }
          }
        }
      }
    },
    "/video/shortPlay/search/query": {
      "post": {
        "tags": ["NetShort Native Search & Wallet"],
        "summary": "Tìm Kiếm Phim Gốc NetShort",
        "description": "Tìm kiếm theo từ khóa trong kho phim bản quyền của NetShort.",
        "parameters": [
          {
            "$ref": "#/components/parameters/NetShortHeader_EncryptKey"
          },
          {
            "$ref": "#/components/parameters/NetShortHeader_Auth"
          }
        ],
        "requestBody": {
          "required": true,
          "description": "Payload gốc: `{\"keyword\":\"Tổng Tài\",\"page\":1,\"pageSize\":20}`",
          "content": {
            "application/json": {
              "schema": {
                "type": "string"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Kết quả tìm kiếm",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NetShortRawResponse"
                }
              }
            }
          }
        }
      }
    },
    "/base/checkstand/fullV2": {
      "post": {
        "tags": ["NetShort Native Search & Wallet"],
        "summary": "Bảng Giá Gói Nạp Coin & VIP In-App Purchase SKUs",
        "description": "Lấy bảng giá nạp tiền xu và gói hội viên VIP, bao gồm mã Google Play Billing SKU (`androidInsideId`).",
        "parameters": [
          {
            "$ref": "#/components/parameters/NetShortHeader_EncryptKey"
          },
          {
            "$ref": "#/components/parameters/NetShortHeader_Auth"
          }
        ],
        "requestBody": {
          "required": true,
          "description": "Payload gốc: `{\"showPage\":1,\"reportedStrategyFlag\":0,\"countryCode\":\"US\",\"checkstandScene\":\"video_play\"}`",
          "content": {
            "application/json": {
              "schema": {
                "type": "string"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Danh sách gói nạp và SKU Google Play",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NetShortRawResponse"
                }
              }
            }
          }
        }
      }
    },
    "/tiktok/md/mini_drama_center/v1/": {
      "get": {
        "tags": ["ByteDance Native Catalog"],
        "summary": "ByteDance Drama Center (Khám Phá & Danh Mục Gốc)",
        "description": "Lấy danh sách các bộ phim ngắn thuộc TikTok Drama Center dựa theo scene (1: Phổ biến, 2: Bảng xếp hạng, 6: Phim mới).",
        "parameters": [
          {
            "name": "scene",
            "in": "query",
            "required": true,
            "schema": {
              "type": "integer",
              "enum": [1, 2, 6],
              "default": 1
            },
            "description": "1: Thịnh hành/Dành cho bạn, 2: Bảng xếp hạng Hot, 6: Mới phát hành"
          },
          {
            "name": "count",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "default": 30
            },
            "description": "Số lượng phim mỗi trang"
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "default": ""
            },
            "description": "Con trỏ phân trang"
          },
          {
            "$ref": "#/components/parameters/ByteDance_aid"
          },
          {
            "$ref": "#/components/parameters/ByteDance_device_platform"
          },
          {
            "$ref": "#/components/parameters/ByteDance_version_code"
          },
          {
            "$ref": "#/components/parameters/ByteDance_language"
          },
          {
            "$ref": "#/components/parameters/ByteDance_region"
          },
          {
            "$ref": "#/components/parameters/ByteDance_device_id"
          },
          {
            "$ref": "#/components/parameters/ByteDance_iid"
          }
        ],
        "responses": {
          "200": {
            "description": "Danh sách bộ sưu tập phim mini drama",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ByteDanceDramaCenterResponse"
                }
              }
            }
          }
        }
      }
    },
    "/tiktok/md/collection/episode_panel/v1/": {
      "get": {
        "tags": ["ByteDance Native Episodes & Stream"],
        "summary": "Lấy Danh Sách Toàn Bộ Tập Phim (Episode Panel)",
        "description": "Trả về danh sách tất cả các tập của 1 collection_id, bao gồm video_id, số thứ tự tập, trạng thái khóa tập.",
        "parameters": [
          {
            "name": "collection_id",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "example": "7483920194827182910"
            },
            "description": "ID bộ phim gốc từ ByteDance"
          },
          {
            "name": "count",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "default": 100
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "default": "0"
            }
          },
          {
            "$ref": "#/components/parameters/ByteDance_aid"
          },
          {
            "$ref": "#/components/parameters/ByteDance_device_id"
          }
        ],
        "responses": {
          "200": {
            "description": "Danh sách các tập phim",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ByteDanceEpisodePanelResponse"
                }
              }
            }
          }
        }
      }
    },
    "/tiktok/md/mini_drama/feed/v1/": {
      "get": {
        "tags": ["ByteDance Native Episodes & Stream"],
        "summary": "Trích Xuất Direct MP4 Stream URLs (TTVideoEngine Feed)",
        "description": "Truy vấn cụm máy chủ Virginia (`api-va.tiktokv.com`) để lấy direct MP4 CDN links phát trực tiếp với độ phân giải Full HD 1080P/720P từ `*.tiktokcdn.com`.",
        "parameters": [
          {
            "name": "landing_collection_id",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "example": "7483920194827182910"
            },
            "description": "Collection ID cần trích xuất stream"
          },
          {
            "name": "inner_feed_collection_id",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "example": "7483920194827182910"
            }
          },
          {
            "name": "count",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "default": 10
            }
          },
          {
            "$ref": "#/components/parameters/ByteDance_aid"
          },
          {
            "$ref": "#/components/parameters/ByteDance_device_id"
          }
        ],
        "responses": {
          "200": {
            "description": "Protobuf / JSON stream manifest chứa URLs dạng `https://v45.tiktokcdn.com/.../video/tos/.../?a=845221&mime_type=video_mp4`",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          }
        }
      }
    },
    "/tiktok/md/collection/search/v1/": {
      "get": {
        "tags": ["ByteDance Native Search"],
        "summary": "Tìm Kiếm Thời Gian Thực Trong TikTok Mini Drama",
        "description": "Tìm kiếm phim theo từ khóa tiếng Việt hoặc tiếng Anh trực tiếp vào công cụ tìm kiếm của ByteDance.",
        "parameters": [
          {
            "name": "keyword",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "example": "Tổng Tài"
            },
            "description": "Từ khóa tìm kiếm"
          },
          {
            "name": "count",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "default": 20
            }
          },
          {
            "$ref": "#/components/parameters/ByteDance_aid"
          },
          {
            "$ref": "#/components/parameters/ByteDance_device_id"
          }
        ],
        "responses": {
          "200": {
            "description": "Danh sách phim tìm thấy từ TikTok Mini Drama",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ByteDanceDramaCenterResponse"
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "parameters": {
      "NetShortHeader_EncryptKey": {
        "name": "encrypt-key",
        "in": "header",
        "required": true,
        "schema": {
          "type": "string"
        },
        "description": "Khóa AES ngẫu nhiên 32 ký tự được mã hóa bằng RSA Public Key của Server (Base64)"
      },
      "NetShortHeader_Auth": {
        "name": "Authorization",
        "in": "header",
        "required": false,
        "schema": {
          "type": "string",
          "example": "Bearer eyJhbGciOiJIUzUxMiJ9..."
        },
        "description": "JWT Token nhận từ API `/auth/login`"
      },
      "NetShortHeader_DeviceCode": {
        "name": "Device-Code",
        "in": "header",
        "required": true,
        "schema": {
          "type": "string",
          "default": "edd17e9795baf7ab"
        },
        "description": "Hardware device fingerprint"
      },
      "NetShortHeader_OS": {
        "name": "os",
        "in": "header",
        "required": true,
        "schema": {
          "type": "string",
          "default": "1"
        },
        "description": "1: Android, 2: iOS"
      },
      "NetShortHeader_Version": {
        "name": "version",
        "in": "header",
        "required": true,
        "schema": {
          "type": "string",
          "default": "2.3.3"
        }
      },
      "NetShortHeader_VersionCode": {
        "name": "versionCode",
        "in": "header",
        "required": true,
        "schema": {
          "type": "string",
          "default": "245"
        }
      },
      "NetShortHeader_Model": {
        "name": "model",
        "in": "header",
        "required": true,
        "schema": {
          "type": "string",
          "default": "samsung SM-S908N"
        }
      },
      "NetShortHeader_Canary": {
        "name": "canary",
        "in": "header",
        "required": true,
        "schema": {
          "type": "string",
          "default": "v2"
        }
      },
      "NetShortHeader_Timestamp": {
        "name": "timestamp",
        "in": "header",
        "required": true,
        "schema": {
          "type": "string"
        },
        "description": "Unix timestamp in milliseconds"
      },
      "ByteDance_aid": {
        "name": "aid",
        "in": "query",
        "required": true,
        "schema": {
          "type": "string",
          "default": "845221"
        },
        "description": "ByteDance App ID của PineDrama (TikTok Drama)"
      },
      "ByteDance_device_platform": {
        "name": "device_platform",
        "in": "query",
        "required": true,
        "schema": {
          "type": "string",
          "default": "android"
        }
      },
      "ByteDance_version_code": {
        "name": "version_code",
        "in": "query",
        "required": true,
        "schema": {
          "type": "string",
          "default": "470403"
        }
      },
      "ByteDance_language": {
        "name": "language",
        "in": "query",
        "required": true,
        "schema": {
          "type": "string",
          "default": "vi"
        }
      },
      "ByteDance_region": {
        "name": "region",
        "in": "query",
        "required": true,
        "schema": {
          "type": "string",
          "default": "VN"
        }
      },
      "ByteDance_device_id": {
        "name": "device_id",
        "in": "query",
        "required": true,
        "schema": {
          "type": "string",
          "default": "7587243284403439111"
        },
        "description": "TikTok Client Device ID"
      },
      "ByteDance_iid": {
        "name": "iid",
        "in": "query",
        "required": true,
        "schema": {
          "type": "string",
          "default": "7699439076206675720"
        },
        "description": "TikTok Install ID"
      }
    },
    "schemas": {
      "NetShortRawResponse": {
        "type": "object",
        "properties": {
          "code": {
            "type": "integer",
            "example": 200
          },
          "msg": {
            "type": "string",
            "example": "success"
          },
          "data": {
            "type": "object",
            "description": "Payload sau khi giải mã AES/ECB/PKCS7"
          }
        }
      },
      "ByteDanceDramaCenterResponse": {
        "type": "object",
        "properties": {
          "status_code": {
            "type": "integer",
            "example": 0
          },
          "cursor": {
            "type": "string"
          },
          "has_more": {
            "type": "boolean"
          },
          "collections": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "collection_id": {
                  "type": "integer",
                  "example": 7483920194827182910
                },
                "collection_id_str": {
                  "type": "string",
                  "example": "7483920194827182910"
                },
                "title": {
                  "type": "string",
                  "example": "Vợ Yêu Đừng Hòng Chạy Trốn"
                },
                "categories": {
                  "type": "string",
                  "example": "Tổng Tài, Ngôn Tình"
                },
                "heat_score": {
                  "type": "integer",
                  "example": 2840000
                },
                "num_videos": {
                  "type": "integer",
                  "example": 68
                },
                "cover": {
                  "type": "object",
                  "properties": {
                    "url_list": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    }
                  }
                }
              }
            }
          }
        }
      },
      "ByteDanceEpisodePanelResponse": {
        "type": "object",
        "properties": {
          "status_code": {
            "type": "integer",
            "example": 0
          },
          "episode_list": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "video_id": {
                  "type": "string",
                  "example": "v09044g40000ctv1m7fog65p79e3h8b0"
                },
                "num": {
                  "type": "integer",
                  "example": 1
                },
                "is_locked": {
                  "type": "boolean",
                  "example": false
                }
              }
            }
          }
        }
      }
    }
  }
}
