twelvelabs-js 1.2.3 → 1.2.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (192) hide show
  1. package/Client.d.ts +14 -38
  2. package/Client.js +22 -42
  3. package/api/client/requests/AnalyzeRequest.d.ts +42 -29
  4. package/api/client/requests/AnalyzeStreamRequest.d.ts +42 -29
  5. package/api/resources/analyzeAsync/resources/tasks/client/Client.d.ts +61 -4
  6. package/api/resources/analyzeAsync/resources/tasks/client/Client.js +73 -13
  7. package/api/resources/analyzeAsync/resources/tasks/client/requests/CreateAsyncAnalyzeRequest.d.ts +111 -9
  8. package/api/resources/analyzeAsync/resources/tasks/client/requests/TasksListRequest.d.ts +8 -2
  9. package/api/resources/analyzeAsync/resources/tasks/types/CreateAsyncAnalyzeRequestAnalysisMode.d.ts +7 -2
  10. package/api/resources/analyzeAsync/resources/tasks/types/CreateAsyncAnalyzeRequestAnalysisMode.js +1 -0
  11. package/api/resources/analyzeAsync/resources/tasks/types/CreateAsyncAnalyzeRequestModelName.d.ts +4 -2
  12. package/api/resources/analyzeAsync/resources/tasks/types/TasksListRequestAnalysisMode.d.ts +2 -1
  13. package/api/resources/analyzeAsync/resources/tasks/types/TasksListRequestAnalysisMode.js +1 -0
  14. package/api/resources/assets/client/Client.d.ts +4 -1
  15. package/api/resources/assets/client/Client.js +12 -9
  16. package/api/resources/assets/client/requests/AssetsCreateRequest.d.ts +1 -1
  17. package/api/resources/embed/client/Client.js +2 -2
  18. package/api/resources/embed/resources/tasks/client/Client.js +8 -8
  19. package/api/resources/embed/resources/v2/client/Client.js +2 -2
  20. package/api/resources/embed/resources/v2/resources/tasks/client/Client.d.ts +1 -1
  21. package/api/resources/embed/resources/v2/resources/tasks/client/Client.js +7 -7
  22. package/api/resources/entityCollections/client/Client.js +10 -10
  23. package/api/resources/entityCollections/resources/entities/client/Client.js +18 -18
  24. package/api/resources/indexes/client/Client.js +10 -10
  25. package/api/resources/indexes/resources/indexedAssets/client/Client.js +12 -12
  26. package/api/resources/indexes/resources/videos/client/Client.js +8 -8
  27. package/api/resources/multipartUpload/client/Client.d.ts +2 -2
  28. package/api/resources/multipartUpload/client/Client.js +12 -12
  29. package/api/resources/search/client/Client.js +4 -4
  30. package/api/resources/tasks/client/Client.js +8 -8
  31. package/api/resources/tasks/resources/transfers/client/Client.js +6 -6
  32. package/api/types/AnalyzePromptV2.d.ts +13 -0
  33. package/api/types/AnalyzePromptV2.js +5 -0
  34. package/api/types/AnalyzeRequestModelName.d.ts +15 -0
  35. package/api/types/AnalyzeRequestModelName.js +10 -0
  36. package/api/types/AnalyzeStreamRequestModelName.d.ts +15 -0
  37. package/api/types/AnalyzeStreamRequestModelName.js +10 -0
  38. package/api/types/AnalyzeTaskResponse.d.ts +3 -1
  39. package/api/types/AnalyzeTaskResponseRequestParams.d.ts +20 -2
  40. package/api/types/AnalyzeTaskResponseRequestParamsPromptV2.d.ts +16 -0
  41. package/api/types/AnalyzeTaskResponseRequestParamsPromptV2.js +5 -0
  42. package/api/types/AnalyzeTaskResponseRequestParamsPromptV2MediaSourcesItem.d.ts +11 -0
  43. package/api/types/AnalyzeTaskResponseRequestParamsPromptV2MediaSourcesItem.js +5 -0
  44. package/api/types/AnalyzeTaskResponseRequestParamsResponseFormat.d.ts +14 -1
  45. package/api/types/AnalyzeTaskResponseRequestParamsResponseFormatSegmentDefinitionsItem.d.ts +2 -0
  46. package/api/types/AnalyzeTaskResponseVideoSource.d.ts +2 -0
  47. package/api/types/AnalyzeTaskResultUsage.d.ts +1 -1
  48. package/api/types/AnalyzeTimeRange.d.ts +12 -0
  49. package/api/types/AnalyzeTimeRange.js +5 -0
  50. package/api/types/AsyncResponseFormat.d.ts +34 -6
  51. package/api/types/SegmentDefinition.d.ts +11 -0
  52. package/api/types/SyncResponseFormat.d.ts +25 -6
  53. package/api/types/TokenUsage.d.ts +3 -1
  54. package/api/types/index.d.ts +6 -0
  55. package/api/types/index.js +6 -0
  56. package/dist/Client.d.ts +14 -38
  57. package/dist/Client.js +22 -42
  58. package/dist/api/client/requests/AnalyzeRequest.d.ts +42 -29
  59. package/dist/api/client/requests/AnalyzeStreamRequest.d.ts +42 -29
  60. package/dist/api/resources/analyzeAsync/resources/tasks/client/Client.d.ts +61 -4
  61. package/dist/api/resources/analyzeAsync/resources/tasks/client/Client.js +73 -13
  62. package/dist/api/resources/analyzeAsync/resources/tasks/client/requests/CreateAsyncAnalyzeRequest.d.ts +111 -9
  63. package/dist/api/resources/analyzeAsync/resources/tasks/client/requests/TasksListRequest.d.ts +8 -2
  64. package/dist/api/resources/analyzeAsync/resources/tasks/types/CreateAsyncAnalyzeRequestAnalysisMode.d.ts +7 -2
  65. package/dist/api/resources/analyzeAsync/resources/tasks/types/CreateAsyncAnalyzeRequestAnalysisMode.js +1 -0
  66. package/dist/api/resources/analyzeAsync/resources/tasks/types/CreateAsyncAnalyzeRequestModelName.d.ts +4 -2
  67. package/dist/api/resources/analyzeAsync/resources/tasks/types/TasksListRequestAnalysisMode.d.ts +2 -1
  68. package/dist/api/resources/analyzeAsync/resources/tasks/types/TasksListRequestAnalysisMode.js +1 -0
  69. package/dist/api/resources/assets/client/Client.d.ts +4 -1
  70. package/dist/api/resources/assets/client/Client.js +12 -9
  71. package/dist/api/resources/assets/client/requests/AssetsCreateRequest.d.ts +1 -1
  72. package/dist/api/resources/embed/client/Client.js +2 -2
  73. package/dist/api/resources/embed/resources/tasks/client/Client.js +8 -8
  74. package/dist/api/resources/embed/resources/v2/client/Client.js +2 -2
  75. package/dist/api/resources/embed/resources/v2/resources/tasks/client/Client.d.ts +1 -1
  76. package/dist/api/resources/embed/resources/v2/resources/tasks/client/Client.js +7 -7
  77. package/dist/api/resources/entityCollections/client/Client.js +10 -10
  78. package/dist/api/resources/entityCollections/resources/entities/client/Client.js +18 -18
  79. package/dist/api/resources/indexes/client/Client.js +10 -10
  80. package/dist/api/resources/indexes/resources/indexedAssets/client/Client.js +12 -12
  81. package/dist/api/resources/indexes/resources/videos/client/Client.js +8 -8
  82. package/dist/api/resources/multipartUpload/client/Client.d.ts +2 -2
  83. package/dist/api/resources/multipartUpload/client/Client.js +12 -12
  84. package/dist/api/resources/search/client/Client.js +4 -4
  85. package/dist/api/resources/tasks/client/Client.js +8 -8
  86. package/dist/api/resources/tasks/resources/transfers/client/Client.js +6 -6
  87. package/dist/api/types/AnalyzePromptV2.d.ts +13 -0
  88. package/dist/api/types/AnalyzePromptV2.js +5 -0
  89. package/dist/api/types/AnalyzeRequestModelName.d.ts +15 -0
  90. package/dist/api/types/AnalyzeRequestModelName.js +10 -0
  91. package/dist/api/types/AnalyzeStreamRequestModelName.d.ts +15 -0
  92. package/dist/api/types/AnalyzeStreamRequestModelName.js +10 -0
  93. package/dist/api/types/AnalyzeTaskResponse.d.ts +3 -1
  94. package/dist/api/types/AnalyzeTaskResponseRequestParams.d.ts +20 -2
  95. package/dist/api/types/AnalyzeTaskResponseRequestParamsPromptV2.d.ts +16 -0
  96. package/dist/api/types/AnalyzeTaskResponseRequestParamsPromptV2.js +5 -0
  97. package/dist/api/types/AnalyzeTaskResponseRequestParamsPromptV2MediaSourcesItem.d.ts +11 -0
  98. package/dist/api/types/AnalyzeTaskResponseRequestParamsPromptV2MediaSourcesItem.js +5 -0
  99. package/dist/api/types/AnalyzeTaskResponseRequestParamsResponseFormat.d.ts +14 -1
  100. package/dist/api/types/AnalyzeTaskResponseRequestParamsResponseFormatSegmentDefinitionsItem.d.ts +2 -0
  101. package/dist/api/types/AnalyzeTaskResponseVideoSource.d.ts +2 -0
  102. package/dist/api/types/AnalyzeTaskResultUsage.d.ts +1 -1
  103. package/dist/api/types/AnalyzeTimeRange.d.ts +12 -0
  104. package/dist/api/types/AnalyzeTimeRange.js +5 -0
  105. package/dist/api/types/AsyncResponseFormat.d.ts +34 -6
  106. package/dist/api/types/SegmentDefinition.d.ts +11 -0
  107. package/dist/api/types/SyncResponseFormat.d.ts +25 -6
  108. package/dist/api/types/TokenUsage.d.ts +3 -1
  109. package/dist/api/types/index.d.ts +6 -0
  110. package/dist/api/types/index.js +6 -0
  111. package/dist/serialization/client/requests/AnalyzeRequest.d.ts +8 -3
  112. package/dist/serialization/client/requests/AnalyzeRequest.js +8 -3
  113. package/dist/serialization/client/requests/AnalyzeStreamRequest.d.ts +8 -3
  114. package/dist/serialization/client/requests/AnalyzeStreamRequest.js +8 -3
  115. package/dist/serialization/resources/analyzeAsync/resources/tasks/client/requests/CreateAsyncAnalyzeRequest.d.ts +5 -0
  116. package/dist/serialization/resources/analyzeAsync/resources/tasks/client/requests/CreateAsyncAnalyzeRequest.js +5 -0
  117. package/dist/serialization/resources/analyzeAsync/resources/tasks/types/CreateAsyncAnalyzeRequestAnalysisMode.d.ts +1 -1
  118. package/dist/serialization/resources/analyzeAsync/resources/tasks/types/CreateAsyncAnalyzeRequestAnalysisMode.js +1 -1
  119. package/dist/serialization/resources/analyzeAsync/resources/tasks/types/TasksListRequestAnalysisMode.d.ts +1 -1
  120. package/dist/serialization/resources/analyzeAsync/resources/tasks/types/TasksListRequestAnalysisMode.js +1 -1
  121. package/dist/serialization/types/AnalyzePromptV2.d.ts +14 -0
  122. package/dist/serialization/types/AnalyzePromptV2.js +45 -0
  123. package/dist/serialization/types/AnalyzeRequestModelName.d.ts +10 -0
  124. package/dist/serialization/types/AnalyzeRequestModelName.js +41 -0
  125. package/dist/serialization/types/AnalyzeStreamRequestModelName.d.ts +10 -0
  126. package/dist/serialization/types/AnalyzeStreamRequestModelName.js +41 -0
  127. package/dist/serialization/types/AnalyzeTaskResponse.d.ts +1 -0
  128. package/dist/serialization/types/AnalyzeTaskResponse.js +1 -0
  129. package/dist/serialization/types/AnalyzeTaskResponseRequestParams.d.ts +5 -0
  130. package/dist/serialization/types/AnalyzeTaskResponseRequestParams.js +5 -0
  131. package/dist/serialization/types/AnalyzeTaskResponseRequestParamsPromptV2.d.ts +14 -0
  132. package/dist/serialization/types/AnalyzeTaskResponseRequestParamsPromptV2.js +45 -0
  133. package/dist/serialization/types/AnalyzeTaskResponseRequestParamsPromptV2MediaSourcesItem.d.ts +15 -0
  134. package/dist/serialization/types/AnalyzeTaskResponseRequestParamsPromptV2MediaSourcesItem.js +46 -0
  135. package/dist/serialization/types/AnalyzeTaskResponseRequestParamsResponseFormat.d.ts +1 -0
  136. package/dist/serialization/types/AnalyzeTaskResponseRequestParamsResponseFormat.js +1 -0
  137. package/dist/serialization/types/AnalyzeTaskResponseRequestParamsResponseFormatSegmentDefinitionsItem.d.ts +2 -0
  138. package/dist/serialization/types/AnalyzeTaskResponseRequestParamsResponseFormatSegmentDefinitionsItem.js +2 -0
  139. package/dist/serialization/types/AnalyzeTaskResponseVideoSource.d.ts +1 -0
  140. package/dist/serialization/types/AnalyzeTaskResponseVideoSource.js +1 -0
  141. package/dist/serialization/types/AnalyzeTimeRange.d.ts +13 -0
  142. package/dist/serialization/types/AnalyzeTimeRange.js +44 -0
  143. package/dist/serialization/types/SegmentDefinition.d.ts +2 -0
  144. package/dist/serialization/types/SegmentDefinition.js +2 -0
  145. package/dist/serialization/types/TokenUsage.d.ts +2 -1
  146. package/dist/serialization/types/TokenUsage.js +2 -1
  147. package/dist/serialization/types/index.d.ts +6 -0
  148. package/dist/serialization/types/index.js +6 -0
  149. package/dist/version.d.ts +1 -1
  150. package/dist/version.js +1 -1
  151. package/package.json +1 -1
  152. package/reference.md +21 -40
  153. package/serialization/client/requests/AnalyzeRequest.d.ts +8 -3
  154. package/serialization/client/requests/AnalyzeRequest.js +8 -3
  155. package/serialization/client/requests/AnalyzeStreamRequest.d.ts +8 -3
  156. package/serialization/client/requests/AnalyzeStreamRequest.js +8 -3
  157. package/serialization/resources/analyzeAsync/resources/tasks/client/requests/CreateAsyncAnalyzeRequest.d.ts +5 -0
  158. package/serialization/resources/analyzeAsync/resources/tasks/client/requests/CreateAsyncAnalyzeRequest.js +5 -0
  159. package/serialization/resources/analyzeAsync/resources/tasks/types/CreateAsyncAnalyzeRequestAnalysisMode.d.ts +1 -1
  160. package/serialization/resources/analyzeAsync/resources/tasks/types/CreateAsyncAnalyzeRequestAnalysisMode.js +1 -1
  161. package/serialization/resources/analyzeAsync/resources/tasks/types/TasksListRequestAnalysisMode.d.ts +1 -1
  162. package/serialization/resources/analyzeAsync/resources/tasks/types/TasksListRequestAnalysisMode.js +1 -1
  163. package/serialization/types/AnalyzePromptV2.d.ts +14 -0
  164. package/serialization/types/AnalyzePromptV2.js +45 -0
  165. package/serialization/types/AnalyzeRequestModelName.d.ts +10 -0
  166. package/serialization/types/AnalyzeRequestModelName.js +41 -0
  167. package/serialization/types/AnalyzeStreamRequestModelName.d.ts +10 -0
  168. package/serialization/types/AnalyzeStreamRequestModelName.js +41 -0
  169. package/serialization/types/AnalyzeTaskResponse.d.ts +1 -0
  170. package/serialization/types/AnalyzeTaskResponse.js +1 -0
  171. package/serialization/types/AnalyzeTaskResponseRequestParams.d.ts +5 -0
  172. package/serialization/types/AnalyzeTaskResponseRequestParams.js +5 -0
  173. package/serialization/types/AnalyzeTaskResponseRequestParamsPromptV2.d.ts +14 -0
  174. package/serialization/types/AnalyzeTaskResponseRequestParamsPromptV2.js +45 -0
  175. package/serialization/types/AnalyzeTaskResponseRequestParamsPromptV2MediaSourcesItem.d.ts +15 -0
  176. package/serialization/types/AnalyzeTaskResponseRequestParamsPromptV2MediaSourcesItem.js +46 -0
  177. package/serialization/types/AnalyzeTaskResponseRequestParamsResponseFormat.d.ts +1 -0
  178. package/serialization/types/AnalyzeTaskResponseRequestParamsResponseFormat.js +1 -0
  179. package/serialization/types/AnalyzeTaskResponseRequestParamsResponseFormatSegmentDefinitionsItem.d.ts +2 -0
  180. package/serialization/types/AnalyzeTaskResponseRequestParamsResponseFormatSegmentDefinitionsItem.js +2 -0
  181. package/serialization/types/AnalyzeTaskResponseVideoSource.d.ts +1 -0
  182. package/serialization/types/AnalyzeTaskResponseVideoSource.js +1 -0
  183. package/serialization/types/AnalyzeTimeRange.d.ts +13 -0
  184. package/serialization/types/AnalyzeTimeRange.js +44 -0
  185. package/serialization/types/SegmentDefinition.d.ts +2 -0
  186. package/serialization/types/SegmentDefinition.js +2 -0
  187. package/serialization/types/TokenUsage.d.ts +2 -1
  188. package/serialization/types/TokenUsage.js +2 -1
  189. package/serialization/types/index.d.ts +6 -0
  190. package/serialization/types/index.js +6 -0
  191. package/version.d.ts +1 -1
  192. package/version.js +1 -1
@@ -74,7 +74,8 @@ class Tasks {
74
74
  * status: "queued",
75
75
  * videoUrl: "https://example.com/video.mp4",
76
76
  * assetId: "69abc123def456789012abcd",
77
- * analysisMode: "time_based_metadata"
77
+ * videoId: "6298d673f1090f1100476d4c",
78
+ * analysisMode: "general"
78
79
  * })
79
80
  */
80
81
  list(request = {}, requestOptions) {
@@ -83,7 +84,7 @@ class Tasks {
83
84
  __list() {
84
85
  return __awaiter(this, arguments, void 0, function* (request = {}, requestOptions) {
85
86
  var _a, _b;
86
- const { page, pageLimit, status, videoUrl, assetId, analysisMode } = request;
87
+ const { page, pageLimit, status, videoUrl, assetId, videoId, analysisMode } = request;
87
88
  const _queryParams = {};
88
89
  if (page != null) {
89
90
  _queryParams["page"] = page.toString();
@@ -102,17 +103,20 @@ class Tasks {
102
103
  if (assetId != null) {
103
104
  _queryParams["asset_id"] = assetId;
104
105
  }
106
+ if (videoId != null) {
107
+ _queryParams["video_id"] = videoId;
108
+ }
105
109
  if (analysisMode != null) {
106
110
  _queryParams["analysis_mode"] = serializers.analyzeAsync.TasksListRequestAnalysisMode.jsonOrThrow(analysisMode, { unrecognizedObjectKeys: "strip" });
107
111
  }
108
112
  const _response = yield core.fetcher({
109
113
  url: (0, url_join_1.default)((_b = (_a = (yield core.Supplier.get(this._options.baseUrl))) !== null && _a !== void 0 ? _a : (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.TwelvelabsApiEnvironment.Default, "analyze/tasks"),
110
114
  method: "GET",
111
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "twelvelabs-js", "X-Fern-SDK-Version": "1.2.3", "User-Agent": "twelvelabs-js/1.2.3", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
115
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "twelvelabs-js", "X-Fern-SDK-Version": "1.2.4", "User-Agent": "twelvelabs-js/1.2.4", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
112
116
  contentType: "application/json",
113
117
  queryParameters: _queryParams,
114
118
  requestType: "json",
115
- timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
119
+ timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 600000,
116
120
  maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
117
121
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
118
122
  });
@@ -157,7 +161,7 @@ class Tasks {
157
161
  });
158
162
  }
159
163
  /**
160
- * This method asynchronously analyzes your videos. It supports two modes: general analysis (prompt-based text generation) with Pegasus 1.2 and video segmentation with Pegasus 1.5.
164
+ * This method asynchronously analyzes your videos. It supports two analysis modes: general analysis (prompt-based text generation) and video segmentation with custom segment definitions. Video segmentation requires Pegasus 1.5.
161
165
  *
162
166
  * <Accordion title="Input requirements">
163
167
  * - Minimum duration: 4 seconds
@@ -168,8 +172,8 @@ class Tasks {
168
172
  * </Accordion>
169
173
  *
170
174
  * **When to use this method**:
171
- * - Generate custom text from your video using a prompt (Pegasus 1.2 only)
172
- * - Extract timestamped metadata with custom fields from your video (Pegasus 1.5 only)
175
+ * - Generate custom text from your video using a prompt (general analysis)
176
+ * - Extract timestamped metadata with custom segment definitions from your video (Pegasus 1.5 only)
173
177
  * - Analyze videos longer than 1 hour
174
178
  * - Process videos asynchronously without blocking your application
175
179
  *
@@ -194,6 +198,7 @@ class Tasks {
194
198
  *
195
199
  * @example
196
200
  * await client.analyzeAsync.tasks.create({
201
+ * customId: "prod-segment-analysis-42",
197
202
  * video: {
198
203
  * type: "url",
199
204
  * url: "https://example.com/video.mp4"
@@ -234,6 +239,61 @@ class Tasks {
234
239
  * minSegmentDuration: 5,
235
240
  * maxSegmentDuration: 30
236
241
  * })
242
+ *
243
+ * @example
244
+ * await client.analyzeAsync.tasks.create({
245
+ * modelName: "pegasus1.5",
246
+ * video: {
247
+ * type: "url",
248
+ * url: "https://example.com/video.mp4"
249
+ * },
250
+ * prompt: "Summarize the key events in this clip.",
251
+ * maxTokens: 4096,
252
+ * startTime: 10,
253
+ * endTime: 60
254
+ * })
255
+ *
256
+ * @example
257
+ * await client.analyzeAsync.tasks.create({
258
+ * modelName: "pegasus1.5",
259
+ * video: {
260
+ * type: "url",
261
+ * url: "https://example.com/video.mp4"
262
+ * },
263
+ * analysisMode: "time_based_metadata",
264
+ * responseFormat: {
265
+ * type: "segment_definitions",
266
+ * segmentDefinitions: [{
267
+ * id: "scenes",
268
+ * description: "Scene changes.",
269
+ * timeRanges: [{
270
+ * startTime: 0,
271
+ * endTime: 4
272
+ * }, {
273
+ * startTime: 10,
274
+ * endTime: 14
275
+ * }]
276
+ * }]
277
+ * }
278
+ * })
279
+ *
280
+ * @example
281
+ * await client.analyzeAsync.tasks.create({
282
+ * modelName: "pegasus1.5",
283
+ * video: {
284
+ * type: "url",
285
+ * url: "https://example.com/video.mp4"
286
+ * },
287
+ * promptV2: {
288
+ * inputText: "Is there a <@tiger-1> in the video?",
289
+ * mediaSources: [{
290
+ * name: "tiger-1",
291
+ * mediaType: "image",
292
+ * url: "https://example.com/tiger.jpg"
293
+ * }]
294
+ * },
295
+ * maxTokens: 4096
296
+ * })
237
297
  */
238
298
  create(request, requestOptions) {
239
299
  return core.HttpResponsePromise.fromPromise(this.__create(request, requestOptions));
@@ -244,13 +304,13 @@ class Tasks {
244
304
  const _response = yield core.fetcher({
245
305
  url: (0, url_join_1.default)((_b = (_a = (yield core.Supplier.get(this._options.baseUrl))) !== null && _a !== void 0 ? _a : (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.TwelvelabsApiEnvironment.Default, "analyze/tasks"),
246
306
  method: "POST",
247
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "twelvelabs-js", "X-Fern-SDK-Version": "1.2.3", "User-Agent": "twelvelabs-js/1.2.3", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
307
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "twelvelabs-js", "X-Fern-SDK-Version": "1.2.4", "User-Agent": "twelvelabs-js/1.2.4", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
248
308
  contentType: "application/json",
249
309
  requestType: "json",
250
310
  body: serializers.analyzeAsync.CreateAsyncAnalyzeRequest.jsonOrThrow(request, {
251
311
  unrecognizedObjectKeys: "strip",
252
312
  }),
253
- timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
313
+ timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 600000,
254
314
  maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
255
315
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
256
316
  });
@@ -325,10 +385,10 @@ class Tasks {
325
385
  const _response = yield core.fetcher({
326
386
  url: (0, url_join_1.default)((_b = (_a = (yield core.Supplier.get(this._options.baseUrl))) !== null && _a !== void 0 ? _a : (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.TwelvelabsApiEnvironment.Default, `analyze/tasks/${encodeURIComponent(taskId)}`),
327
387
  method: "GET",
328
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "twelvelabs-js", "X-Fern-SDK-Version": "1.2.3", "User-Agent": "twelvelabs-js/1.2.3", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
388
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "twelvelabs-js", "X-Fern-SDK-Version": "1.2.4", "User-Agent": "twelvelabs-js/1.2.4", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
329
389
  contentType: "application/json",
330
390
  requestType: "json",
331
- timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
391
+ timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 600000,
332
392
  maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
333
393
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
334
394
  });
@@ -393,10 +453,10 @@ class Tasks {
393
453
  const _response = yield core.fetcher({
394
454
  url: (0, url_join_1.default)((_b = (_a = (yield core.Supplier.get(this._options.baseUrl))) !== null && _a !== void 0 ? _a : (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.TwelvelabsApiEnvironment.Default, `analyze/tasks/${encodeURIComponent(taskId)}`),
395
455
  method: "DELETE",
396
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "twelvelabs-js", "X-Fern-SDK-Version": "1.2.3", "User-Agent": "twelvelabs-js/1.2.3", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
456
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "twelvelabs-js", "X-Fern-SDK-Version": "1.2.4", "User-Agent": "twelvelabs-js/1.2.4", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
397
457
  contentType: "application/json",
398
458
  requestType: "json",
399
- timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
459
+ timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 600000,
400
460
  maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
401
461
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
402
462
  });
@@ -5,6 +5,7 @@ import * as TwelvelabsApi from "../../../../../../index";
5
5
  /**
6
6
  * @example
7
7
  * {
8
+ * customId: "prod-segment-analysis-42",
8
9
  * video: {
9
10
  * type: "url",
10
11
  * url: "https://example.com/video.mp4"
@@ -45,17 +46,87 @@ import * as TwelvelabsApi from "../../../../../../index";
45
46
  * minSegmentDuration: 5,
46
47
  * maxSegmentDuration: 30
47
48
  * }
49
+ *
50
+ * @example
51
+ * {
52
+ * modelName: "pegasus1.5",
53
+ * video: {
54
+ * type: "url",
55
+ * url: "https://example.com/video.mp4"
56
+ * },
57
+ * prompt: "Summarize the key events in this clip.",
58
+ * maxTokens: 4096,
59
+ * startTime: 10,
60
+ * endTime: 60
61
+ * }
62
+ *
63
+ * @example
64
+ * {
65
+ * modelName: "pegasus1.5",
66
+ * video: {
67
+ * type: "url",
68
+ * url: "https://example.com/video.mp4"
69
+ * },
70
+ * analysisMode: "time_based_metadata",
71
+ * responseFormat: {
72
+ * type: "segment_definitions",
73
+ * segmentDefinitions: [{
74
+ * id: "scenes",
75
+ * description: "Scene changes.",
76
+ * timeRanges: [{
77
+ * startTime: 0,
78
+ * endTime: 4
79
+ * }, {
80
+ * startTime: 10,
81
+ * endTime: 14
82
+ * }]
83
+ * }]
84
+ * }
85
+ * }
86
+ *
87
+ * @example
88
+ * {
89
+ * modelName: "pegasus1.5",
90
+ * video: {
91
+ * type: "url",
92
+ * url: "https://example.com/video.mp4"
93
+ * },
94
+ * promptV2: {
95
+ * inputText: "Is there a <@tiger-1> in the video?",
96
+ * mediaSources: [{
97
+ * name: "tiger-1",
98
+ * mediaType: "image",
99
+ * url: "https://example.com/tiger.jpg"
100
+ * }]
101
+ * },
102
+ * maxTokens: 4096
103
+ * }
48
104
  */
49
105
  export interface CreateAsyncAnalyzeRequest {
50
106
  /**
51
107
  * The video understanding model to use for analysis.
52
- * - `pegasus1.2` (default): Analyzes pre-indexed videos. Pass a `video_id` to reference your video.
53
- * - `pegasus1.5`: Analyzes videos directly from a URL, asset, or base64 string. Supports video segmentation with custom segment definitions.
108
+ * - `pegasus1.2`: General analysis (prompt-based text generation).
109
+ * - `pegasus1.5`: General analysis (prompt-based text generation) with video clipping, structured prompts with reference images, extended token limits, and video segmentation.
110
+ *
111
+ * **Default:** `pegasus1.2`
54
112
  */
55
113
  modelName?: TwelvelabsApi.analyzeAsync.CreateAsyncAnalyzeRequestModelName;
114
+ /**
115
+ * An optional identifier that you set when you create the task. Use this field to correlate tasks across responses, for example, to distinguish tasks by type or environment.
116
+ *
117
+ * The platform stores this value unchanged and returns it in the following responses:
118
+ * - The [`GET`](/v1.3/api-reference/analyze-videos/retrieve-analysis-task-status-results) method of the `/analyze/tasks/{task_id}` endpoint
119
+ * - The [`GET`](/v1.3/api-reference/analyze-videos/list-async-analysis-tasks) method of the `/analyze/tasks` endpoint
120
+ * - The `analyze.task.ready` and `analyze.task.failed` webhook payloads
121
+ *
122
+ * **Format**: 1–64 characters. Alphanumeric, hyphens (`-`), and underscores (`_`) only. An empty string is rejected with a `400 Bad Request`.
123
+ *
124
+ * This field does not enforce uniqueness. You can submit multiple tasks with the same `custom_id`. To prevent duplicate task creation, use an `Idempotency-Key` header instead.
125
+ */
126
+ customId?: string;
56
127
  video: TwelvelabsApi.VideoContext;
57
128
  /**
58
- * A natural-language text that provides instructions for analyzing the video. Required for general-mode analysis. Not supported when `analysis_mode` is `time_based_metadata`.
129
+ * Natural-language instructions for analyzing the video. Required for general analysis (prompt-based text generation). Not supported when `analysis_mode` is `time_based_metadata`. To include reference images in your prompt, use the `prompt_v2` parameter instead (Pegasus 1.5 only). Mutually exclusive with the `prompt_v2` parameter.
59
130
  *
60
131
  * <Note title="Notes">
61
132
  * - Even though the model behind this endpoint is trained to a high degree of accuracy, the preciseness of the generated text may vary based on the nature and quality of the video and the clarity of the prompt.
@@ -69,26 +140,57 @@ export interface CreateAsyncAnalyzeRequest {
69
140
  * - I want to generate a description for my video with the following format: Title of the video, followed by a summary in 2-3 sentences, highlighting the main topic, key events, and concluding remarks.
70
141
  */
71
142
  prompt?: string;
72
- /** Sets the analysis mode to `time_based_metadata`, which segments your video into time-based intervals and extracts custom metadata for each segment. Requires `model_name` set to `pegasus1.5` and `response_format.type` set to `segment_definitions`. */
143
+ promptV2?: TwelvelabsApi.AnalyzePromptV2;
144
+ /**
145
+ * The analysis approach for this task.
146
+ * - `general`: Analyze the video and generate a response based on your prompt. Supports both free-form text and structured output via `response_format`.
147
+ * - `time_based_metadata`: Segment the video into time-based intervals and extract custom metadata for each segment. Requires `model_name` set to `pegasus1.5` and `response_format.type` set to `segment_definitions`.
148
+ *
149
+ * **Default:** `general`
150
+ */
73
151
  analysisMode?: TwelvelabsApi.analyzeAsync.CreateAsyncAnalyzeRequestAnalysisMode;
74
152
  temperature?: TwelvelabsApi.AnalyzeTemperature;
75
153
  /**
76
- * The maximum number of tokens to generate. The allowed range depends on the model:
77
- * - `pegasus1.2`: **Min:** 1, **Max:** 4,096
78
- * - `pegasus1.5`: **Min:** 2,048, **Max:** 32,768, **Default:** 32,768
154
+ * The maximum number of tokens to generate. The allowed range depends on the model and analysis mode:
155
+ *
156
+ * | Model | Mode | Min | Max | Default |
157
+ * |-------|------|-----|-----|---------|
158
+ * | Pegasus 1.2 | — | 1 | 4,096 | 4096 |
159
+ * | Pegasus 1.5 | `general` | 512 | 65,536 | 4,096 |
160
+ * | Pegasus 1.5 | `time_based_metadata` | 2,048 | 65,536 | 32,768 |
79
161
  */
80
162
  maxTokens?: number;
81
163
  responseFormat?: TwelvelabsApi.AsyncResponseFormat;
82
164
  /**
83
- * Minimum duration for each extracted segment, in seconds. Set this to prevent the model from creating very short segments. Requires `model_name` set to `pegasus1.5` and `analysis_mode` set to `time_based_metadata`.
165
+ * Minimum duration for each extracted segment, in seconds. Set this value to enforce a minimum segment length. Requires `model_name` set to `pegasus1.5` and `analysis_mode` set to `time_based_metadata`. Mutually exclusive with `response_format.segment_definitions[].time_ranges`.
84
166
  *
85
167
  * **Min:** 2
86
168
  */
87
169
  minSegmentDuration?: number;
88
170
  /**
89
- * Maximum duration for each extracted segment, in seconds. Set this to break long continuous sections into shorter segments. Must be greater than or equal to `min_segment_duration`. Requires `model_name` set to `pegasus1.5` and `analysis_mode` set to `time_based_metadata`.
171
+ * Maximum duration for each extracted segment, in seconds. Set this value to split long continuous sections into shorter segments. Must be greater than or equal to `min_segment_duration`. Requires `model_name` set to `pegasus1.5` and `analysis_mode` set to `time_based_metadata`. Mutually exclusive with `response_format.segment_definitions[].time_ranges`.
90
172
  *
91
173
  * **Min:** 2
92
174
  */
93
175
  maxSegmentDuration?: number;
176
+ /**
177
+ * Start of the analysis window, in seconds. Use with `end_time` to analyze only a portion of the video. Requires `model_name` set to `pegasus1.5`.
178
+ *
179
+ * <Note title="Notes">
180
+ * - If omitted, defaults to `0`.
181
+ * - Must be less than `end_time` and less than the video duration. The clip (`end_time - start_time`) must be at least `4` seconds.
182
+ * - Mutually exclusive with `response_format.segment_definitions[].time_ranges`.
183
+ * </Note>
184
+ */
185
+ startTime?: number;
186
+ /**
187
+ * End of the analysis window, in seconds. Use with `start_time` to analyze only a portion of the video. Requires `model_name` set to `pegasus1.5`.
188
+ *
189
+ * <Note title="Notes">
190
+ * - If omitted, defaults to the video duration.
191
+ * - Must be greater than `start_time` and less than or equal to the video duration. The clip (`end_time - start_time`) must be at least `4` seconds.
192
+ * - Mutually exclusive with `response_format.segment_definitions[].time_ranges`.
193
+ * </Note>
194
+ */
195
+ endTime?: number;
94
196
  }
@@ -10,7 +10,8 @@ import * as TwelvelabsApi from "../../../../../../index";
10
10
  * status: "queued",
11
11
  * videoUrl: "https://example.com/video.mp4",
12
12
  * assetId: "69abc123def456789012abcd",
13
- * analysisMode: "time_based_metadata"
13
+ * videoId: "6298d673f1090f1100476d4c",
14
+ * analysisMode: "general"
14
15
  * }
15
16
  *
16
17
  * @example
@@ -20,7 +21,8 @@ import * as TwelvelabsApi from "../../../../../../index";
20
21
  * status: "queued",
21
22
  * videoUrl: "https://example.com/video.mp4",
22
23
  * assetId: "69abc123def456789012abcd",
23
- * analysisMode: "time_based_metadata"
24
+ * videoId: "6298d673f1090f1100476d4c",
25
+ * analysisMode: "general"
24
26
  * }
25
27
  */
26
28
  export interface TasksListRequest {
@@ -50,6 +52,10 @@ export interface TasksListRequest {
50
52
  * Filter tasks by asset ID.
51
53
  */
52
54
  assetId?: string;
55
+ /**
56
+ * Filter tasks by video ID for pre-indexed videos (Pegasus 1.2 only). Deprecated — use `asset_id` instead.
57
+ */
58
+ videoId?: string;
53
59
  /**
54
60
  * Filter tasks by the analysis mode used when creating the task.
55
61
  */
@@ -2,9 +2,14 @@
2
2
  * This file was auto-generated by Fern from our API Definition.
3
3
  */
4
4
  /**
5
- * Sets the analysis mode to `time_based_metadata`, which segments your video into time-based intervals and extracts custom metadata for each segment. Requires `model_name` set to `pegasus1.5` and `response_format.type` set to `segment_definitions`.
5
+ * The analysis approach for this task.
6
+ * - `general`: Analyze the video and generate a response based on your prompt. Supports both free-form text and structured output via `response_format`.
7
+ * - `time_based_metadata`: Segment the video into time-based intervals and extract custom metadata for each segment. Requires `model_name` set to `pegasus1.5` and `response_format.type` set to `segment_definitions`.
8
+ *
9
+ * **Default:** `general`
6
10
  */
7
- export type CreateAsyncAnalyzeRequestAnalysisMode = "time_based_metadata";
11
+ export type CreateAsyncAnalyzeRequestAnalysisMode = "general" | "time_based_metadata";
8
12
  export declare const CreateAsyncAnalyzeRequestAnalysisMode: {
13
+ readonly General: "general";
9
14
  readonly TimeBasedMetadata: "time_based_metadata";
10
15
  };
@@ -5,5 +5,6 @@
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
6
  exports.CreateAsyncAnalyzeRequestAnalysisMode = void 0;
7
7
  exports.CreateAsyncAnalyzeRequestAnalysisMode = {
8
+ General: "general",
8
9
  TimeBasedMetadata: "time_based_metadata",
9
10
  };
@@ -3,8 +3,10 @@
3
3
  */
4
4
  /**
5
5
  * The video understanding model to use for analysis.
6
- * - `pegasus1.2` (default): Analyzes pre-indexed videos. Pass a `video_id` to reference your video.
7
- * - `pegasus1.5`: Analyzes videos directly from a URL, asset, or base64 string. Supports video segmentation with custom segment definitions.
6
+ * - `pegasus1.2`: General analysis (prompt-based text generation).
7
+ * - `pegasus1.5`: General analysis (prompt-based text generation) with video clipping, structured prompts with reference images, extended token limits, and video segmentation.
8
+ *
9
+ * **Default:** `pegasus1.2`
8
10
  */
9
11
  export type CreateAsyncAnalyzeRequestModelName = "pegasus1.2" | "pegasus1.5";
10
12
  export declare const CreateAsyncAnalyzeRequestModelName: {
@@ -1,7 +1,8 @@
1
1
  /**
2
2
  * This file was auto-generated by Fern from our API Definition.
3
3
  */
4
- export type TasksListRequestAnalysisMode = "time_based_metadata";
4
+ export type TasksListRequestAnalysisMode = "general" | "time_based_metadata";
5
5
  export declare const TasksListRequestAnalysisMode: {
6
+ readonly General: "general";
6
7
  readonly TimeBasedMetadata: "time_based_metadata";
7
8
  };
@@ -5,5 +5,6 @@
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
6
  exports.TasksListRequestAnalysisMode = void 0;
7
7
  exports.TasksListRequestAnalysisMode = {
8
+ General: "general",
8
9
  TimeBasedMetadata: "time_based_metadata",
9
10
  };
@@ -52,7 +52,10 @@ export declare class Assets {
52
52
  * - **Local file**: Set the `method` parameter to `direct` and use the `file` parameter to specify the file.
53
53
  * - **Publicly accessible URL**: Set the `method` parameter to `url` and use the `url` parameter to specify the URL of your file.
54
54
  *
55
- * **File size**: Up to 4 GB.
55
+ * **Upload limits**:
56
+ * - **Video and audio, local files**: Up to 200 MB
57
+ * - **Video and audio, public URLs**: Up to 4 GB
58
+ * - **Images**: Up to 5 MB
56
59
  *
57
60
  * **Additional requirements** depend on your workflow:
58
61
  * - **Search**: [Marengo requirements](/v1.3/docs/concepts/models/marengo#video-file-requirements)
@@ -112,11 +112,11 @@ class Assets {
112
112
  const _response = yield core.fetcher({
113
113
  url: (0, url_join_1.default)((_b = (_a = (yield core.Supplier.get(this._options.baseUrl))) !== null && _a !== void 0 ? _a : (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.TwelvelabsApiEnvironment.Default, "assets"),
114
114
  method: "GET",
115
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "twelvelabs-js", "X-Fern-SDK-Version": "1.2.3", "User-Agent": "twelvelabs-js/1.2.3", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
115
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "twelvelabs-js", "X-Fern-SDK-Version": "1.2.4", "User-Agent": "twelvelabs-js/1.2.4", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
116
116
  contentType: "application/json",
117
117
  queryParameters: _queryParams,
118
118
  requestType: "json",
119
- timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
119
+ timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 600000,
120
120
  maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
121
121
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
122
122
  });
@@ -182,7 +182,10 @@ class Assets {
182
182
  * - **Local file**: Set the `method` parameter to `direct` and use the `file` parameter to specify the file.
183
183
  * - **Publicly accessible URL**: Set the `method` parameter to `url` and use the `url` parameter to specify the URL of your file.
184
184
  *
185
- * **File size**: Up to 4 GB.
185
+ * **Upload limits**:
186
+ * - **Video and audio, local files**: Up to 200 MB
187
+ * - **Video and audio, public URLs**: Up to 4 GB
188
+ * - **Images**: Up to 5 MB
186
189
  *
187
190
  * **Additional requirements** depend on your workflow:
188
191
  * - **Search**: [Marengo requirements](/v1.3/docs/concepts/models/marengo#video-file-requirements)
@@ -231,11 +234,11 @@ class Assets {
231
234
  const _response = yield core.fetcher({
232
235
  url: (0, url_join_1.default)((_b = (_a = (yield core.Supplier.get(this._options.baseUrl))) !== null && _a !== void 0 ? _a : (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.TwelvelabsApiEnvironment.Default, "assets"),
233
236
  method: "POST",
234
- headers: Object.assign(Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "twelvelabs-js", "X-Fern-SDK-Version": "1.2.3", "User-Agent": "twelvelabs-js/1.2.3", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), _maybeEncodedRequest.headers), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
237
+ headers: Object.assign(Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "twelvelabs-js", "X-Fern-SDK-Version": "1.2.4", "User-Agent": "twelvelabs-js/1.2.4", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), _maybeEncodedRequest.headers), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
235
238
  requestType: "file",
236
239
  duplex: _maybeEncodedRequest.duplex,
237
240
  body: _maybeEncodedRequest.body,
238
- timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
241
+ timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 600000,
239
242
  maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
240
243
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
241
244
  });
@@ -299,10 +302,10 @@ class Assets {
299
302
  const _response = yield core.fetcher({
300
303
  url: (0, url_join_1.default)((_b = (_a = (yield core.Supplier.get(this._options.baseUrl))) !== null && _a !== void 0 ? _a : (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.TwelvelabsApiEnvironment.Default, `assets/${encodeURIComponent(assetId)}`),
301
304
  method: "GET",
302
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "twelvelabs-js", "X-Fern-SDK-Version": "1.2.3", "User-Agent": "twelvelabs-js/1.2.3", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
305
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "twelvelabs-js", "X-Fern-SDK-Version": "1.2.4", "User-Agent": "twelvelabs-js/1.2.4", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
303
306
  contentType: "application/json",
304
307
  requestType: "json",
305
- timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
308
+ timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 600000,
306
309
  maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
307
310
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
308
311
  });
@@ -381,11 +384,11 @@ class Assets {
381
384
  const _response = yield core.fetcher({
382
385
  url: (0, url_join_1.default)((_b = (_a = (yield core.Supplier.get(this._options.baseUrl))) !== null && _a !== void 0 ? _a : (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.TwelvelabsApiEnvironment.Default, `assets/${encodeURIComponent(assetId)}`),
383
386
  method: "DELETE",
384
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "twelvelabs-js", "X-Fern-SDK-Version": "1.2.3", "User-Agent": "twelvelabs-js/1.2.3", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
387
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "twelvelabs-js", "X-Fern-SDK-Version": "1.2.4", "User-Agent": "twelvelabs-js/1.2.4", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
385
388
  contentType: "application/json",
386
389
  queryParameters: _queryParams,
387
390
  requestType: "json",
388
- timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
391
+ timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 600000,
389
392
  maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
390
393
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
391
394
  });
@@ -16,7 +16,7 @@ export interface AssetsCreateRequest {
16
16
  /**
17
17
  * Specify this parameter to upload a file from a publicly accessible URL. This parameter is required when `method` is set to `url`.
18
18
  *
19
- * URL uploads have a maximum limit of 4 GB.
19
+ * Public video and audio URLs support up to 4 GB. Image URLs support up to 5 MB.
20
20
  */
21
21
  url?: string;
22
22
  /** The optional filename of the asset. If not provided, the platform will determine the filename from the file or URL. */
@@ -141,11 +141,11 @@ class Embed {
141
141
  const _response = yield core.fetcher({
142
142
  url: (0, url_join_1.default)((_b = (_a = (yield core.Supplier.get(this._options.baseUrl))) !== null && _a !== void 0 ? _a : (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.TwelvelabsApiEnvironment.Default, "embed"),
143
143
  method: "POST",
144
- headers: Object.assign(Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "twelvelabs-js", "X-Fern-SDK-Version": "1.2.3", "User-Agent": "twelvelabs-js/1.2.3", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), _maybeEncodedRequest.headers), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
144
+ headers: Object.assign(Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "twelvelabs-js", "X-Fern-SDK-Version": "1.2.4", "User-Agent": "twelvelabs-js/1.2.4", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), _maybeEncodedRequest.headers), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
145
145
  requestType: "file",
146
146
  duplex: _maybeEncodedRequest.duplex,
147
147
  body: _maybeEncodedRequest.body,
148
- timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
148
+ timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 600000,
149
149
  maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
150
150
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
151
151
  });
@@ -108,11 +108,11 @@ class Tasks {
108
108
  const _response = yield core.fetcher({
109
109
  url: (0, url_join_1.default)((_b = (_a = (yield core.Supplier.get(this._options.baseUrl))) !== null && _a !== void 0 ? _a : (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.TwelvelabsApiEnvironment.Default, "embed/tasks"),
110
110
  method: "GET",
111
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "twelvelabs-js", "X-Fern-SDK-Version": "1.2.3", "User-Agent": "twelvelabs-js/1.2.3", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
111
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "twelvelabs-js", "X-Fern-SDK-Version": "1.2.4", "User-Agent": "twelvelabs-js/1.2.4", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
112
112
  contentType: "application/json",
113
113
  queryParameters: _queryParams,
114
114
  requestType: "json",
115
- timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
115
+ timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 600000,
116
116
  maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
117
117
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
118
118
  });
@@ -239,11 +239,11 @@ class Tasks {
239
239
  const _response = yield core.fetcher({
240
240
  url: (0, url_join_1.default)((_b = (_a = (yield core.Supplier.get(this._options.baseUrl))) !== null && _a !== void 0 ? _a : (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.TwelvelabsApiEnvironment.Default, "embed/tasks"),
241
241
  method: "POST",
242
- headers: Object.assign(Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "twelvelabs-js", "X-Fern-SDK-Version": "1.2.3", "User-Agent": "twelvelabs-js/1.2.3", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), _maybeEncodedRequest.headers), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
242
+ headers: Object.assign(Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "twelvelabs-js", "X-Fern-SDK-Version": "1.2.4", "User-Agent": "twelvelabs-js/1.2.4", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), _maybeEncodedRequest.headers), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
243
243
  requestType: "file",
244
244
  duplex: _maybeEncodedRequest.duplex,
245
245
  body: _maybeEncodedRequest.body,
246
- timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
246
+ timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 600000,
247
247
  maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
248
248
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
249
249
  });
@@ -315,10 +315,10 @@ class Tasks {
315
315
  const _response = yield core.fetcher({
316
316
  url: (0, url_join_1.default)((_b = (_a = (yield core.Supplier.get(this._options.baseUrl))) !== null && _a !== void 0 ? _a : (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.TwelvelabsApiEnvironment.Default, `embed/tasks/${encodeURIComponent(taskId)}/status`),
317
317
  method: "GET",
318
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "twelvelabs-js", "X-Fern-SDK-Version": "1.2.3", "User-Agent": "twelvelabs-js/1.2.3", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
318
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "twelvelabs-js", "X-Fern-SDK-Version": "1.2.4", "User-Agent": "twelvelabs-js/1.2.4", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
319
319
  contentType: "application/json",
320
320
  requestType: "json",
321
- timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
321
+ timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 600000,
322
322
  maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
323
323
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
324
324
  });
@@ -398,11 +398,11 @@ class Tasks {
398
398
  const _response = yield core.fetcher({
399
399
  url: (0, url_join_1.default)((_b = (_a = (yield core.Supplier.get(this._options.baseUrl))) !== null && _a !== void 0 ? _a : (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.TwelvelabsApiEnvironment.Default, `embed/tasks/${encodeURIComponent(taskId)}`),
400
400
  method: "GET",
401
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "twelvelabs-js", "X-Fern-SDK-Version": "1.2.3", "User-Agent": "twelvelabs-js/1.2.3", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
401
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "twelvelabs-js", "X-Fern-SDK-Version": "1.2.4", "User-Agent": "twelvelabs-js/1.2.4", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
402
402
  contentType: "application/json",
403
403
  queryParameters: _queryParams,
404
404
  requestType: "json",
405
- timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
405
+ timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 600000,
406
406
  maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
407
407
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
408
408
  });