twelvelabs-js 1.2.7 → 1.2.8
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.
- package/Client.d.ts +4 -0
- package/Client.js +6 -2
- package/api/client/requests/AnalyzeRequest.d.ts +1 -1
- package/api/client/requests/AnalyzeStreamRequest.d.ts +1 -1
- package/api/errors/GatewayTimeoutError.d.ts +9 -0
- package/api/errors/GatewayTimeoutError.js +52 -0
- package/api/errors/ServiceUnavailableError.d.ts +9 -0
- package/api/errors/ServiceUnavailableError.js +52 -0
- package/api/errors/index.d.ts +2 -0
- package/api/errors/index.js +2 -0
- package/api/resources/analyzeAsync/client/Client.d.ts +3 -0
- package/api/resources/analyzeAsync/client/Client.js +5 -0
- package/api/resources/analyzeAsync/resources/batches/client/Client.d.ts +231 -0
- package/api/resources/analyzeAsync/resources/batches/client/Client.js +667 -0
- package/api/resources/analyzeAsync/resources/batches/client/index.d.ts +1 -0
- package/api/resources/analyzeAsync/resources/batches/client/index.js +17 -0
- package/api/resources/analyzeAsync/resources/batches/client/requests/BatchesListRequest.d.ts +42 -0
- package/api/resources/analyzeAsync/resources/batches/client/requests/BatchesListRequest.js +5 -0
- package/api/resources/analyzeAsync/resources/batches/client/requests/CreateAnalyzeBatchRequest.d.ts +101 -0
- package/api/resources/analyzeAsync/resources/batches/client/requests/CreateAnalyzeBatchRequest.js +5 -0
- package/api/resources/analyzeAsync/resources/batches/client/requests/index.d.ts +2 -0
- package/api/resources/analyzeAsync/resources/batches/client/requests/index.js +2 -0
- package/api/resources/analyzeAsync/resources/batches/index.d.ts +2 -0
- package/api/resources/analyzeAsync/resources/batches/index.js +18 -0
- package/api/resources/analyzeAsync/resources/batches/types/BatchesListRequestAnalysisModeItem.d.ts +8 -0
- package/api/resources/analyzeAsync/resources/batches/types/BatchesListRequestAnalysisModeItem.js +10 -0
- package/api/resources/analyzeAsync/resources/batches/types/BatchesListResponse.d.ts +9 -0
- package/api/resources/analyzeAsync/resources/batches/types/BatchesListResponse.js +5 -0
- package/api/resources/analyzeAsync/resources/batches/types/CreateAnalyzeBatchRequestAnalysisMode.d.ts +15 -0
- package/api/resources/analyzeAsync/resources/batches/types/CreateAnalyzeBatchRequestAnalysisMode.js +10 -0
- package/api/resources/analyzeAsync/resources/batches/types/CreateAnalyzeBatchRequestModelName.d.ts +10 -0
- package/api/resources/analyzeAsync/resources/batches/types/CreateAnalyzeBatchRequestModelName.js +9 -0
- package/api/resources/analyzeAsync/resources/batches/types/index.d.ts +4 -0
- package/api/resources/analyzeAsync/resources/batches/types/index.js +20 -0
- package/api/resources/analyzeAsync/resources/index.d.ts +3 -0
- package/api/resources/analyzeAsync/resources/index.js +4 -1
- package/api/resources/analyzeAsync/resources/tasks/client/Client.d.ts +2 -0
- package/api/resources/analyzeAsync/resources/tasks/client/Client.js +6 -4
- package/api/resources/analyzeAsync/resources/tasks/client/requests/CreateAsyncAnalyzeRequest.d.ts +1 -1
- package/api/resources/assets/client/Client.js +7 -7
- package/api/resources/embed/client/Client.js +1 -1
- package/api/resources/embed/resources/tasks/client/Client.js +4 -4
- package/api/resources/embed/resources/v2/client/Client.js +1 -1
- package/api/resources/embed/resources/v2/resources/tasks/client/Client.js +3 -3
- package/api/resources/entityCollections/client/Client.js +5 -5
- package/api/resources/entityCollections/resources/entities/client/Client.js +9 -9
- package/api/resources/indexes/client/Client.js +5 -5
- package/api/resources/indexes/resources/indexedAssets/client/Client.d.ts +2 -0
- package/api/resources/indexes/resources/indexedAssets/client/Client.js +8 -6
- package/api/resources/indexes/resources/videos/client/Client.js +4 -4
- package/api/resources/multipartUpload/client/Client.js +5 -5
- package/api/resources/search/client/Client.js +2 -2
- package/api/resources/tasks/client/Client.d.ts +2 -0
- package/api/resources/tasks/client/Client.js +6 -4
- package/api/types/AnalyzeBatchStatusResponse.d.ts +21 -0
- package/api/types/AnalyzeBatchStatusResponse.js +5 -0
- package/api/types/AnalyzeBatchSummary.d.ts +28 -0
- package/api/types/AnalyzeBatchSummary.js +5 -0
- package/api/types/AnalyzeBatchSummaryAnalysisMode.d.ts +11 -0
- package/api/types/AnalyzeBatchSummaryAnalysisMode.js +10 -0
- package/api/types/BatchDefaults.d.ts +46 -0
- package/api/types/BatchDefaults.js +5 -0
- package/api/types/BatchItemError.d.ts +12 -0
- package/api/types/BatchItemError.js +5 -0
- package/api/types/BatchItemRequest.d.ts +36 -0
- package/api/types/BatchItemRequest.js +5 -0
- package/api/types/BatchItemStatus.d.ts +14 -0
- package/api/types/BatchItemStatus.js +13 -0
- package/api/types/BatchPrompt.d.ts +13 -0
- package/api/types/BatchPrompt.js +5 -0
- package/api/types/BatchResultItem.d.ts +17 -0
- package/api/types/BatchResultItem.js +5 -0
- package/api/types/BatchStatus.d.ts +15 -0
- package/api/types/BatchStatus.js +14 -0
- package/api/types/BatchVideoContext.d.ts +13 -0
- package/api/types/BatchVideoContext.js +5 -0
- package/api/types/BatchVideoContextType.d.ts +10 -0
- package/api/types/BatchVideoContextType.js +9 -0
- package/api/types/CreateAnalyzeBatchResponse.d.ts +20 -0
- package/api/types/CreateAnalyzeBatchResponse.js +5 -0
- package/api/types/CreatedBatchItem.d.ts +12 -0
- package/api/types/CreatedBatchItem.js +5 -0
- package/api/types/index.d.ts +14 -0
- package/api/types/index.js +14 -0
- package/dist/Client.d.ts +4 -0
- package/dist/Client.js +6 -2
- package/dist/api/client/requests/AnalyzeRequest.d.ts +1 -1
- package/dist/api/client/requests/AnalyzeStreamRequest.d.ts +1 -1
- package/dist/api/errors/GatewayTimeoutError.d.ts +9 -0
- package/dist/api/errors/GatewayTimeoutError.js +52 -0
- package/dist/api/errors/ServiceUnavailableError.d.ts +9 -0
- package/dist/api/errors/ServiceUnavailableError.js +52 -0
- package/dist/api/errors/index.d.ts +2 -0
- package/dist/api/errors/index.js +2 -0
- package/dist/api/resources/analyzeAsync/client/Client.d.ts +3 -0
- package/dist/api/resources/analyzeAsync/client/Client.js +5 -0
- package/dist/api/resources/analyzeAsync/resources/batches/client/Client.d.ts +231 -0
- package/dist/api/resources/analyzeAsync/resources/batches/client/Client.js +667 -0
- package/dist/api/resources/analyzeAsync/resources/batches/client/index.d.ts +1 -0
- package/dist/api/resources/analyzeAsync/resources/batches/client/index.js +17 -0
- package/dist/api/resources/analyzeAsync/resources/batches/client/requests/BatchesListRequest.d.ts +42 -0
- package/dist/api/resources/analyzeAsync/resources/batches/client/requests/BatchesListRequest.js +5 -0
- package/dist/api/resources/analyzeAsync/resources/batches/client/requests/CreateAnalyzeBatchRequest.d.ts +101 -0
- package/dist/api/resources/analyzeAsync/resources/batches/client/requests/CreateAnalyzeBatchRequest.js +5 -0
- package/dist/api/resources/analyzeAsync/resources/batches/client/requests/index.d.ts +2 -0
- package/dist/api/resources/analyzeAsync/resources/batches/client/requests/index.js +2 -0
- package/dist/api/resources/analyzeAsync/resources/batches/index.d.ts +2 -0
- package/dist/api/resources/analyzeAsync/resources/batches/index.js +18 -0
- package/dist/api/resources/analyzeAsync/resources/batches/types/BatchesListRequestAnalysisModeItem.d.ts +8 -0
- package/dist/api/resources/analyzeAsync/resources/batches/types/BatchesListRequestAnalysisModeItem.js +10 -0
- package/dist/api/resources/analyzeAsync/resources/batches/types/BatchesListResponse.d.ts +9 -0
- package/dist/api/resources/analyzeAsync/resources/batches/types/BatchesListResponse.js +5 -0
- package/dist/api/resources/analyzeAsync/resources/batches/types/CreateAnalyzeBatchRequestAnalysisMode.d.ts +15 -0
- package/dist/api/resources/analyzeAsync/resources/batches/types/CreateAnalyzeBatchRequestAnalysisMode.js +10 -0
- package/dist/api/resources/analyzeAsync/resources/batches/types/CreateAnalyzeBatchRequestModelName.d.ts +10 -0
- package/dist/api/resources/analyzeAsync/resources/batches/types/CreateAnalyzeBatchRequestModelName.js +9 -0
- package/dist/api/resources/analyzeAsync/resources/batches/types/index.d.ts +4 -0
- package/dist/api/resources/analyzeAsync/resources/batches/types/index.js +20 -0
- package/dist/api/resources/analyzeAsync/resources/index.d.ts +3 -0
- package/dist/api/resources/analyzeAsync/resources/index.js +4 -1
- package/dist/api/resources/analyzeAsync/resources/tasks/client/Client.d.ts +2 -0
- package/dist/api/resources/analyzeAsync/resources/tasks/client/Client.js +6 -4
- package/dist/api/resources/analyzeAsync/resources/tasks/client/requests/CreateAsyncAnalyzeRequest.d.ts +1 -1
- package/dist/api/resources/assets/client/Client.js +7 -7
- package/dist/api/resources/embed/client/Client.js +1 -1
- package/dist/api/resources/embed/resources/tasks/client/Client.js +4 -4
- package/dist/api/resources/embed/resources/v2/client/Client.js +1 -1
- package/dist/api/resources/embed/resources/v2/resources/tasks/client/Client.js +3 -3
- package/dist/api/resources/entityCollections/client/Client.js +5 -5
- package/dist/api/resources/entityCollections/resources/entities/client/Client.js +9 -9
- package/dist/api/resources/indexes/client/Client.js +5 -5
- package/dist/api/resources/indexes/resources/indexedAssets/client/Client.d.ts +2 -0
- package/dist/api/resources/indexes/resources/indexedAssets/client/Client.js +8 -6
- package/dist/api/resources/indexes/resources/videos/client/Client.js +4 -4
- package/dist/api/resources/multipartUpload/client/Client.js +5 -5
- package/dist/api/resources/search/client/Client.js +2 -2
- package/dist/api/resources/tasks/client/Client.d.ts +2 -0
- package/dist/api/resources/tasks/client/Client.js +6 -4
- package/dist/api/types/AnalyzeBatchStatusResponse.d.ts +21 -0
- package/dist/api/types/AnalyzeBatchStatusResponse.js +5 -0
- package/dist/api/types/AnalyzeBatchSummary.d.ts +28 -0
- package/dist/api/types/AnalyzeBatchSummary.js +5 -0
- package/dist/api/types/AnalyzeBatchSummaryAnalysisMode.d.ts +11 -0
- package/dist/api/types/AnalyzeBatchSummaryAnalysisMode.js +10 -0
- package/dist/api/types/BatchDefaults.d.ts +46 -0
- package/dist/api/types/BatchDefaults.js +5 -0
- package/dist/api/types/BatchItemError.d.ts +12 -0
- package/dist/api/types/BatchItemError.js +5 -0
- package/dist/api/types/BatchItemRequest.d.ts +36 -0
- package/dist/api/types/BatchItemRequest.js +5 -0
- package/dist/api/types/BatchItemStatus.d.ts +14 -0
- package/dist/api/types/BatchItemStatus.js +13 -0
- package/dist/api/types/BatchPrompt.d.ts +13 -0
- package/dist/api/types/BatchPrompt.js +5 -0
- package/dist/api/types/BatchResultItem.d.ts +17 -0
- package/dist/api/types/BatchResultItem.js +5 -0
- package/dist/api/types/BatchStatus.d.ts +15 -0
- package/dist/api/types/BatchStatus.js +14 -0
- package/dist/api/types/BatchVideoContext.d.ts +13 -0
- package/dist/api/types/BatchVideoContext.js +5 -0
- package/dist/api/types/BatchVideoContextType.d.ts +10 -0
- package/dist/api/types/BatchVideoContextType.js +9 -0
- package/dist/api/types/CreateAnalyzeBatchResponse.d.ts +20 -0
- package/dist/api/types/CreateAnalyzeBatchResponse.js +5 -0
- package/dist/api/types/CreatedBatchItem.d.ts +12 -0
- package/dist/api/types/CreatedBatchItem.js +5 -0
- package/dist/api/types/index.d.ts +14 -0
- package/dist/api/types/index.js +14 -0
- package/dist/serialization/resources/analyzeAsync/resources/batches/client/index.d.ts +1 -0
- package/dist/serialization/resources/analyzeAsync/resources/batches/client/index.js +17 -0
- package/dist/serialization/resources/analyzeAsync/resources/batches/client/requests/CreateAnalyzeBatchRequest.d.ts +19 -0
- package/dist/serialization/resources/analyzeAsync/resources/batches/client/requests/CreateAnalyzeBatchRequest.js +50 -0
- package/dist/serialization/resources/analyzeAsync/resources/batches/client/requests/index.d.ts +1 -0
- package/dist/serialization/resources/analyzeAsync/resources/batches/client/requests/index.js +5 -0
- package/dist/serialization/resources/analyzeAsync/resources/batches/index.d.ts +2 -0
- package/dist/serialization/resources/analyzeAsync/resources/batches/index.js +18 -0
- package/dist/serialization/resources/analyzeAsync/resources/batches/types/BatchesListRequestAnalysisModeItem.d.ts +10 -0
- package/dist/serialization/resources/analyzeAsync/resources/batches/types/BatchesListRequestAnalysisModeItem.js +41 -0
- package/dist/serialization/resources/analyzeAsync/resources/batches/types/BatchesListResponse.d.ts +15 -0
- package/dist/serialization/resources/analyzeAsync/resources/batches/types/BatchesListResponse.js +46 -0
- package/dist/serialization/resources/analyzeAsync/resources/batches/types/CreateAnalyzeBatchRequestAnalysisMode.d.ts +10 -0
- package/dist/serialization/resources/analyzeAsync/resources/batches/types/CreateAnalyzeBatchRequestAnalysisMode.js +41 -0
- package/dist/serialization/resources/analyzeAsync/resources/batches/types/CreateAnalyzeBatchRequestModelName.d.ts +10 -0
- package/dist/serialization/resources/analyzeAsync/resources/batches/types/CreateAnalyzeBatchRequestModelName.js +41 -0
- package/dist/serialization/resources/analyzeAsync/resources/batches/types/index.d.ts +4 -0
- package/dist/serialization/resources/analyzeAsync/resources/batches/types/index.js +20 -0
- package/dist/serialization/resources/analyzeAsync/resources/index.d.ts +3 -0
- package/dist/serialization/resources/analyzeAsync/resources/index.js +4 -1
- package/dist/serialization/types/AnalyzeBatchStatusResponse.d.ts +19 -0
- package/dist/serialization/types/AnalyzeBatchStatusResponse.js +52 -0
- package/dist/serialization/types/AnalyzeBatchSummary.d.ts +23 -0
- package/dist/serialization/types/AnalyzeBatchSummary.js +54 -0
- package/dist/serialization/types/AnalyzeBatchSummaryAnalysisMode.d.ts +10 -0
- package/dist/serialization/types/AnalyzeBatchSummaryAnalysisMode.js +41 -0
- package/dist/serialization/types/BatchDefaults.d.ts +22 -0
- package/dist/serialization/types/BatchDefaults.js +53 -0
- package/dist/serialization/types/BatchItemError.d.ts +13 -0
- package/dist/serialization/types/BatchItemError.js +44 -0
- package/dist/serialization/types/BatchItemRequest.d.ts +25 -0
- package/dist/serialization/types/BatchItemRequest.js +56 -0
- package/dist/serialization/types/BatchItemStatus.d.ts +10 -0
- package/dist/serialization/types/BatchItemStatus.js +41 -0
- package/dist/serialization/types/BatchPrompt.d.ts +14 -0
- package/dist/serialization/types/BatchPrompt.js +45 -0
- package/dist/serialization/types/BatchResultItem.d.ts +19 -0
- package/dist/serialization/types/BatchResultItem.js +50 -0
- package/dist/serialization/types/BatchStatus.d.ts +10 -0
- package/dist/serialization/types/BatchStatus.js +41 -0
- package/dist/serialization/types/BatchVideoContext.d.ts +14 -0
- package/dist/serialization/types/BatchVideoContext.js +45 -0
- package/dist/serialization/types/BatchVideoContextType.d.ts +10 -0
- package/dist/serialization/types/BatchVideoContextType.js +41 -0
- package/dist/serialization/types/CreateAnalyzeBatchResponse.d.ts +19 -0
- package/dist/serialization/types/CreateAnalyzeBatchResponse.js +50 -0
- package/dist/serialization/types/CreatedBatchItem.d.ts +13 -0
- package/dist/serialization/types/CreatedBatchItem.js +44 -0
- package/dist/serialization/types/index.d.ts +14 -0
- package/dist/serialization/types/index.js +14 -0
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/package.json +1 -1
- package/reference.md +489 -0
- package/serialization/resources/analyzeAsync/resources/batches/client/index.d.ts +1 -0
- package/serialization/resources/analyzeAsync/resources/batches/client/index.js +17 -0
- package/serialization/resources/analyzeAsync/resources/batches/client/requests/CreateAnalyzeBatchRequest.d.ts +19 -0
- package/serialization/resources/analyzeAsync/resources/batches/client/requests/CreateAnalyzeBatchRequest.js +50 -0
- package/serialization/resources/analyzeAsync/resources/batches/client/requests/index.d.ts +1 -0
- package/serialization/resources/analyzeAsync/resources/batches/client/requests/index.js +5 -0
- package/serialization/resources/analyzeAsync/resources/batches/index.d.ts +2 -0
- package/serialization/resources/analyzeAsync/resources/batches/index.js +18 -0
- package/serialization/resources/analyzeAsync/resources/batches/types/BatchesListRequestAnalysisModeItem.d.ts +10 -0
- package/serialization/resources/analyzeAsync/resources/batches/types/BatchesListRequestAnalysisModeItem.js +41 -0
- package/serialization/resources/analyzeAsync/resources/batches/types/BatchesListResponse.d.ts +15 -0
- package/serialization/resources/analyzeAsync/resources/batches/types/BatchesListResponse.js +46 -0
- package/serialization/resources/analyzeAsync/resources/batches/types/CreateAnalyzeBatchRequestAnalysisMode.d.ts +10 -0
- package/serialization/resources/analyzeAsync/resources/batches/types/CreateAnalyzeBatchRequestAnalysisMode.js +41 -0
- package/serialization/resources/analyzeAsync/resources/batches/types/CreateAnalyzeBatchRequestModelName.d.ts +10 -0
- package/serialization/resources/analyzeAsync/resources/batches/types/CreateAnalyzeBatchRequestModelName.js +41 -0
- package/serialization/resources/analyzeAsync/resources/batches/types/index.d.ts +4 -0
- package/serialization/resources/analyzeAsync/resources/batches/types/index.js +20 -0
- package/serialization/resources/analyzeAsync/resources/index.d.ts +3 -0
- package/serialization/resources/analyzeAsync/resources/index.js +4 -1
- package/serialization/types/AnalyzeBatchStatusResponse.d.ts +19 -0
- package/serialization/types/AnalyzeBatchStatusResponse.js +52 -0
- package/serialization/types/AnalyzeBatchSummary.d.ts +23 -0
- package/serialization/types/AnalyzeBatchSummary.js +54 -0
- package/serialization/types/AnalyzeBatchSummaryAnalysisMode.d.ts +10 -0
- package/serialization/types/AnalyzeBatchSummaryAnalysisMode.js +41 -0
- package/serialization/types/BatchDefaults.d.ts +22 -0
- package/serialization/types/BatchDefaults.js +53 -0
- package/serialization/types/BatchItemError.d.ts +13 -0
- package/serialization/types/BatchItemError.js +44 -0
- package/serialization/types/BatchItemRequest.d.ts +25 -0
- package/serialization/types/BatchItemRequest.js +56 -0
- package/serialization/types/BatchItemStatus.d.ts +10 -0
- package/serialization/types/BatchItemStatus.js +41 -0
- package/serialization/types/BatchPrompt.d.ts +14 -0
- package/serialization/types/BatchPrompt.js +45 -0
- package/serialization/types/BatchResultItem.d.ts +19 -0
- package/serialization/types/BatchResultItem.js +50 -0
- package/serialization/types/BatchStatus.d.ts +10 -0
- package/serialization/types/BatchStatus.js +41 -0
- package/serialization/types/BatchVideoContext.d.ts +14 -0
- package/serialization/types/BatchVideoContext.js +45 -0
- package/serialization/types/BatchVideoContextType.d.ts +10 -0
- package/serialization/types/BatchVideoContextType.js +41 -0
- package/serialization/types/CreateAnalyzeBatchResponse.d.ts +19 -0
- package/serialization/types/CreateAnalyzeBatchResponse.js +50 -0
- package/serialization/types/CreatedBatchItem.d.ts +13 -0
- package/serialization/types/CreatedBatchItem.js +44 -0
- package/serialization/types/index.d.ts +14 -0
- package/serialization/types/index.js +14 -0
- package/version.d.ts +1 -1
- package/version.js +1 -1
package/Client.d.ts
CHANGED
|
@@ -69,6 +69,8 @@ export declare class TwelvelabsApiClient {
|
|
|
69
69
|
* - Videos longer than 1 hour. Use the [`POST`](/v1.3/api-reference/analyze-videos/create-async-analysis-task) method of the `/analyze/tasks` endpoint instead.
|
|
70
70
|
* - Video segmentation with custom segment definitions. Use the [`POST`](/v1.3/api-reference/analyze-videos/create-async-analysis-task) method of the `/analyze/tasks` endpoint with the `model_name` parameter set to `pegasus1.5` instead.
|
|
71
71
|
*
|
|
72
|
+
* On the Free plan, you have a total of 600 minutes (10 hours) shared across indexing, analysis, and segmentation. For details, see the [Video hours and video count limits](/v1.3/docs/concepts/indexes#video-hours-and-video-count-limits) section.
|
|
73
|
+
*
|
|
72
74
|
* <Note title="Note">
|
|
73
75
|
* This endpoint is rate-limited. For details, see the [Rate limits](/v1.3/docs/get-started/rate-limits) page.
|
|
74
76
|
* </Note>
|
|
@@ -95,6 +97,8 @@ export declare class TwelvelabsApiClient {
|
|
|
95
97
|
* - Videos longer than 1 hour. Use the [`POST`](/v1.3/api-reference/analyze-videos/create-async-analysis-task) method of the `/analyze/tasks` endpoint instead.
|
|
96
98
|
* - Video segmentation with custom segment definitions. Use the [`POST`](/v1.3/api-reference/analyze-videos/create-async-analysis-task) method of the `/analyze/tasks` endpoint with the `model_name` parameter set to `pegasus1.5` instead.
|
|
97
99
|
*
|
|
100
|
+
* On the Free plan, you have a total of 600 minutes (10 hours) shared across indexing, analysis, and segmentation. For details, see the [Video hours and video count limits](/v1.3/docs/concepts/indexes#video-hours-and-video-count-limits) section.
|
|
101
|
+
*
|
|
98
102
|
* <Note title="Note">
|
|
99
103
|
* This endpoint is rate-limited. For details, see the [Rate limits](/v1.3/docs/get-started/rate-limits) page.
|
|
100
104
|
* </Note>
|
package/Client.js
CHANGED
|
@@ -119,6 +119,8 @@ class TwelvelabsApiClient {
|
|
|
119
119
|
* - Videos longer than 1 hour. Use the [`POST`](/v1.3/api-reference/analyze-videos/create-async-analysis-task) method of the `/analyze/tasks` endpoint instead.
|
|
120
120
|
* - Video segmentation with custom segment definitions. Use the [`POST`](/v1.3/api-reference/analyze-videos/create-async-analysis-task) method of the `/analyze/tasks` endpoint with the `model_name` parameter set to `pegasus1.5` instead.
|
|
121
121
|
*
|
|
122
|
+
* On the Free plan, you have a total of 600 minutes (10 hours) shared across indexing, analysis, and segmentation. For details, see the [Video hours and video count limits](/v1.3/docs/concepts/indexes#video-hours-and-video-count-limits) section.
|
|
123
|
+
*
|
|
122
124
|
* <Note title="Note">
|
|
123
125
|
* This endpoint is rate-limited. For details, see the [Rate limits](/v1.3/docs/get-started/rate-limits) page.
|
|
124
126
|
* </Note>
|
|
@@ -132,7 +134,7 @@ class TwelvelabsApiClient {
|
|
|
132
134
|
const _response = yield core.fetcher({
|
|
133
135
|
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"),
|
|
134
136
|
method: "POST",
|
|
135
|
-
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "twelvelabs-js", "X-Fern-SDK-Version": "1.2.
|
|
137
|
+
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "twelvelabs-js", "X-Fern-SDK-Version": "1.2.8", "User-Agent": "twelvelabs-js/1.2.8", "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),
|
|
136
138
|
contentType: "application/json",
|
|
137
139
|
requestType: "json",
|
|
138
140
|
body: Object.assign(Object.assign({}, serializers.AnalyzeStreamRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" })), { stream: true }),
|
|
@@ -215,6 +217,8 @@ class TwelvelabsApiClient {
|
|
|
215
217
|
* - Videos longer than 1 hour. Use the [`POST`](/v1.3/api-reference/analyze-videos/create-async-analysis-task) method of the `/analyze/tasks` endpoint instead.
|
|
216
218
|
* - Video segmentation with custom segment definitions. Use the [`POST`](/v1.3/api-reference/analyze-videos/create-async-analysis-task) method of the `/analyze/tasks` endpoint with the `model_name` parameter set to `pegasus1.5` instead.
|
|
217
219
|
*
|
|
220
|
+
* On the Free plan, you have a total of 600 minutes (10 hours) shared across indexing, analysis, and segmentation. For details, see the [Video hours and video count limits](/v1.3/docs/concepts/indexes#video-hours-and-video-count-limits) section.
|
|
221
|
+
*
|
|
218
222
|
* <Note title="Note">
|
|
219
223
|
* This endpoint is rate-limited. For details, see the [Rate limits](/v1.3/docs/get-started/rate-limits) page.
|
|
220
224
|
* </Note>
|
|
@@ -238,7 +242,7 @@ class TwelvelabsApiClient {
|
|
|
238
242
|
const _response = yield core.fetcher({
|
|
239
243
|
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"),
|
|
240
244
|
method: "POST",
|
|
241
|
-
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "twelvelabs-js", "X-Fern-SDK-Version": "1.2.
|
|
245
|
+
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "twelvelabs-js", "X-Fern-SDK-Version": "1.2.8", "User-Agent": "twelvelabs-js/1.2.8", "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),
|
|
242
246
|
contentType: "application/json",
|
|
243
247
|
requestType: "json",
|
|
244
248
|
body: Object.assign(Object.assign({}, serializers.AnalyzeRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" })), { stream: false }),
|
|
@@ -42,7 +42,7 @@ export interface AnalyzeRequest {
|
|
|
42
42
|
*
|
|
43
43
|
* | Model | Min | Max | Default |
|
|
44
44
|
* |-------|-----|-----|---------|
|
|
45
|
-
* | Pegasus 1.2 |
|
|
45
|
+
* | Pegasus 1.2 | 2 | 4,096 | 4,096 |
|
|
46
46
|
* | Pegasus 1.5 | 512 | 98,304 | 4,096 |
|
|
47
47
|
*/
|
|
48
48
|
maxTokens?: number;
|
|
@@ -42,7 +42,7 @@ export interface AnalyzeStreamRequest {
|
|
|
42
42
|
*
|
|
43
43
|
* | Model | Min | Max | Default |
|
|
44
44
|
* |-------|-----|-----|---------|
|
|
45
|
-
* | Pegasus 1.2 |
|
|
45
|
+
* | Pegasus 1.2 | 2 | 4,096 | 4,096 |
|
|
46
46
|
* | Pegasus 1.5 | 512 | 98,304 | 4,096 |
|
|
47
47
|
*/
|
|
48
48
|
maxTokens?: number;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
*/
|
|
4
|
+
import * as errors from "../../errors/index";
|
|
5
|
+
import * as TwelvelabsApi from "../index";
|
|
6
|
+
import * as core from "../../core";
|
|
7
|
+
export declare class GatewayTimeoutError extends errors.TwelvelabsApiError {
|
|
8
|
+
constructor(body: TwelvelabsApi.ErrorResponse, rawResponse?: core.RawResponse);
|
|
9
|
+
}
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
4
|
+
*/
|
|
5
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
6
|
+
if (k2 === undefined) k2 = k;
|
|
7
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
8
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
9
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
10
|
+
}
|
|
11
|
+
Object.defineProperty(o, k2, desc);
|
|
12
|
+
}) : (function(o, m, k, k2) {
|
|
13
|
+
if (k2 === undefined) k2 = k;
|
|
14
|
+
o[k2] = m[k];
|
|
15
|
+
}));
|
|
16
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
17
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
18
|
+
}) : function(o, v) {
|
|
19
|
+
o["default"] = v;
|
|
20
|
+
});
|
|
21
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
22
|
+
var ownKeys = function(o) {
|
|
23
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
24
|
+
var ar = [];
|
|
25
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
26
|
+
return ar;
|
|
27
|
+
};
|
|
28
|
+
return ownKeys(o);
|
|
29
|
+
};
|
|
30
|
+
return function (mod) {
|
|
31
|
+
if (mod && mod.__esModule) return mod;
|
|
32
|
+
var result = {};
|
|
33
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
34
|
+
__setModuleDefault(result, mod);
|
|
35
|
+
return result;
|
|
36
|
+
};
|
|
37
|
+
})();
|
|
38
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
|
+
exports.GatewayTimeoutError = void 0;
|
|
40
|
+
const errors = __importStar(require("../../errors/index"));
|
|
41
|
+
class GatewayTimeoutError extends errors.TwelvelabsApiError {
|
|
42
|
+
constructor(body, rawResponse) {
|
|
43
|
+
super({
|
|
44
|
+
message: "GatewayTimeoutError",
|
|
45
|
+
statusCode: 504,
|
|
46
|
+
body: body,
|
|
47
|
+
rawResponse: rawResponse,
|
|
48
|
+
});
|
|
49
|
+
Object.setPrototypeOf(this, GatewayTimeoutError.prototype);
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
exports.GatewayTimeoutError = GatewayTimeoutError;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
*/
|
|
4
|
+
import * as errors from "../../errors/index";
|
|
5
|
+
import * as TwelvelabsApi from "../index";
|
|
6
|
+
import * as core from "../../core";
|
|
7
|
+
export declare class ServiceUnavailableError extends errors.TwelvelabsApiError {
|
|
8
|
+
constructor(body: TwelvelabsApi.ErrorResponse, rawResponse?: core.RawResponse);
|
|
9
|
+
}
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
4
|
+
*/
|
|
5
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
6
|
+
if (k2 === undefined) k2 = k;
|
|
7
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
8
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
9
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
10
|
+
}
|
|
11
|
+
Object.defineProperty(o, k2, desc);
|
|
12
|
+
}) : (function(o, m, k, k2) {
|
|
13
|
+
if (k2 === undefined) k2 = k;
|
|
14
|
+
o[k2] = m[k];
|
|
15
|
+
}));
|
|
16
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
17
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
18
|
+
}) : function(o, v) {
|
|
19
|
+
o["default"] = v;
|
|
20
|
+
});
|
|
21
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
22
|
+
var ownKeys = function(o) {
|
|
23
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
24
|
+
var ar = [];
|
|
25
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
26
|
+
return ar;
|
|
27
|
+
};
|
|
28
|
+
return ownKeys(o);
|
|
29
|
+
};
|
|
30
|
+
return function (mod) {
|
|
31
|
+
if (mod && mod.__esModule) return mod;
|
|
32
|
+
var result = {};
|
|
33
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
34
|
+
__setModuleDefault(result, mod);
|
|
35
|
+
return result;
|
|
36
|
+
};
|
|
37
|
+
})();
|
|
38
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
|
+
exports.ServiceUnavailableError = void 0;
|
|
40
|
+
const errors = __importStar(require("../../errors/index"));
|
|
41
|
+
class ServiceUnavailableError extends errors.TwelvelabsApiError {
|
|
42
|
+
constructor(body, rawResponse) {
|
|
43
|
+
super({
|
|
44
|
+
message: "ServiceUnavailableError",
|
|
45
|
+
statusCode: 503,
|
|
46
|
+
body: body,
|
|
47
|
+
rawResponse: rawResponse,
|
|
48
|
+
});
|
|
49
|
+
Object.setPrototypeOf(this, ServiceUnavailableError.prototype);
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
exports.ServiceUnavailableError = ServiceUnavailableError;
|
package/api/errors/index.d.ts
CHANGED
package/api/errors/index.js
CHANGED
|
@@ -20,3 +20,5 @@ __exportStar(require("./InternalServerError"), exports);
|
|
|
20
20
|
__exportStar(require("./ConflictError"), exports);
|
|
21
21
|
__exportStar(require("./ForbiddenError"), exports);
|
|
22
22
|
__exportStar(require("./TooManyRequestsError"), exports);
|
|
23
|
+
__exportStar(require("./ServiceUnavailableError"), exports);
|
|
24
|
+
__exportStar(require("./GatewayTimeoutError"), exports);
|
|
@@ -4,6 +4,7 @@
|
|
|
4
4
|
import * as environments from "../../../../environments";
|
|
5
5
|
import * as core from "../../../../core";
|
|
6
6
|
import { Tasks } from "../resources/tasks/client/Client";
|
|
7
|
+
import { Batches } from "../resources/batches/client/Client";
|
|
7
8
|
export declare namespace AnalyzeAsync {
|
|
8
9
|
interface Options {
|
|
9
10
|
environment?: core.Supplier<environments.TwelvelabsApiEnvironment | string>;
|
|
@@ -15,6 +16,8 @@ export declare namespace AnalyzeAsync {
|
|
|
15
16
|
export declare class AnalyzeAsync {
|
|
16
17
|
protected readonly _options: AnalyzeAsync.Options;
|
|
17
18
|
protected _tasks: Tasks | undefined;
|
|
19
|
+
protected _batches: Batches | undefined;
|
|
18
20
|
constructor(_options: AnalyzeAsync.Options);
|
|
19
21
|
get tasks(): Tasks;
|
|
22
|
+
get batches(): Batches;
|
|
20
23
|
}
|
|
@@ -5,6 +5,7 @@
|
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
exports.AnalyzeAsync = void 0;
|
|
7
7
|
const Client_1 = require("../resources/tasks/client/Client");
|
|
8
|
+
const Client_2 = require("../resources/batches/client/Client");
|
|
8
9
|
class AnalyzeAsync {
|
|
9
10
|
constructor(_options) {
|
|
10
11
|
this._options = _options;
|
|
@@ -13,5 +14,9 @@ class AnalyzeAsync {
|
|
|
13
14
|
var _a;
|
|
14
15
|
return ((_a = this._tasks) !== null && _a !== void 0 ? _a : (this._tasks = new Client_1.Tasks(this._options)));
|
|
15
16
|
}
|
|
17
|
+
get batches() {
|
|
18
|
+
var _a;
|
|
19
|
+
return ((_a = this._batches) !== null && _a !== void 0 ? _a : (this._batches = new Client_2.Batches(this._options)));
|
|
20
|
+
}
|
|
16
21
|
}
|
|
17
22
|
exports.AnalyzeAsync = AnalyzeAsync;
|
|
@@ -0,0 +1,231 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
*/
|
|
4
|
+
import * as environments from "../../../../../../environments";
|
|
5
|
+
import * as core from "../../../../../../core";
|
|
6
|
+
import * as TwelvelabsApi from "../../../../../index";
|
|
7
|
+
export declare namespace Batches {
|
|
8
|
+
interface Options {
|
|
9
|
+
environment?: core.Supplier<environments.TwelvelabsApiEnvironment | string>;
|
|
10
|
+
/** Specify a custom URL to connect the client to. */
|
|
11
|
+
baseUrl?: core.Supplier<string>;
|
|
12
|
+
apiKey: core.Supplier<string>;
|
|
13
|
+
}
|
|
14
|
+
interface RequestOptions {
|
|
15
|
+
/** The maximum time to wait for a response in seconds. */
|
|
16
|
+
timeoutInSeconds?: number;
|
|
17
|
+
/** The number of times to retry the request. Defaults to 2. */
|
|
18
|
+
maxRetries?: number;
|
|
19
|
+
/** A hook to abort the request. */
|
|
20
|
+
abortSignal?: AbortSignal;
|
|
21
|
+
/** Additional headers to include in the request. */
|
|
22
|
+
headers?: Record<string, string>;
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
export declare class Batches {
|
|
26
|
+
protected readonly _options: Batches.Options;
|
|
27
|
+
constructor(_options: Batches.Options);
|
|
28
|
+
/**
|
|
29
|
+
* Use this method to list all the batch objects in your account. The response sorts batches by creation date, with the newest batch first.
|
|
30
|
+
*
|
|
31
|
+
* @param {TwelvelabsApi.analyzeAsync.BatchesListRequest} request
|
|
32
|
+
* @param {Batches.RequestOptions} requestOptions - Request-specific configuration.
|
|
33
|
+
*
|
|
34
|
+
* @throws {@link TwelvelabsApi.BadRequestError}
|
|
35
|
+
*
|
|
36
|
+
* @example
|
|
37
|
+
* await client.analyzeAsync.batches.list({
|
|
38
|
+
* page: 1,
|
|
39
|
+
* pageLimit: 10
|
|
40
|
+
* })
|
|
41
|
+
*/
|
|
42
|
+
list(request?: TwelvelabsApi.analyzeAsync.BatchesListRequest, requestOptions?: Batches.RequestOptions): Promise<core.Page<TwelvelabsApi.AnalyzeBatchStatusResponse>>;
|
|
43
|
+
/**
|
|
44
|
+
* Use this method to submit many video analysis requests in a single call. Each request creates an analysis task. The response contains one batch identifier and one task identifier per request. Use the batch identifier to check progress and retrieve results.
|
|
45
|
+
*
|
|
46
|
+
* <Note title="Model requirement">
|
|
47
|
+
* You must use Pegasus 1.5 for batch analysis. Set the `model_name` parameter to `pegasus1.5`.
|
|
48
|
+
* </Note>
|
|
49
|
+
*
|
|
50
|
+
* **When to use this method**:
|
|
51
|
+
* - Run the same model and analysis settings across many videos.
|
|
52
|
+
* - Track a single batch instead of many individual analysis tasks.
|
|
53
|
+
*
|
|
54
|
+
* **Do not use this method for**:
|
|
55
|
+
* - Single videos that require immediate results. Use the [`POST`](/v1.3/api-reference/analyze-videos/sync-analysis) method of the `/analyze` endpoint instead.
|
|
56
|
+
* - Background processing of a single video. Use the [`POST`](/v1.3/api-reference/analyze-videos/create-async-analysis-task) method of the `/analyze/tasks` endpoint instead.
|
|
57
|
+
*
|
|
58
|
+
* **Retention and retry**:
|
|
59
|
+
* - Batches expire 24 hours after creation. You can retrieve results for 30 days after creation.
|
|
60
|
+
* - If processing does not finish for some items in time, resubmit them in a new batch.
|
|
61
|
+
*
|
|
62
|
+
* **Limits**:
|
|
63
|
+
* - Up to 1,000 requests per batch.
|
|
64
|
+
* - Up to 2,000 total content hours per batch.
|
|
65
|
+
* - Up to 5 active batches per account.
|
|
66
|
+
*
|
|
67
|
+
* @param {TwelvelabsApi.analyzeAsync.CreateAnalyzeBatchRequest} request
|
|
68
|
+
* @param {Batches.RequestOptions} requestOptions - Request-specific configuration.
|
|
69
|
+
*
|
|
70
|
+
* @throws {@link TwelvelabsApi.BadRequestError}
|
|
71
|
+
* @throws {@link TwelvelabsApi.NotFoundError}
|
|
72
|
+
* @throws {@link TwelvelabsApi.ConflictError}
|
|
73
|
+
* @throws {@link TwelvelabsApi.TooManyRequestsError}
|
|
74
|
+
* @throws {@link TwelvelabsApi.ServiceUnavailableError}
|
|
75
|
+
* @throws {@link TwelvelabsApi.GatewayTimeoutError}
|
|
76
|
+
*
|
|
77
|
+
* @example
|
|
78
|
+
* await client.analyzeAsync.batches.create({
|
|
79
|
+
* modelName: "pegasus1.5",
|
|
80
|
+
* analysisMode: "general",
|
|
81
|
+
* defaults: {
|
|
82
|
+
* prompt: {
|
|
83
|
+
* inputText: "Generate a 3-sentence executive summary of this video."
|
|
84
|
+
* },
|
|
85
|
+
* temperature: 0.2,
|
|
86
|
+
* maxTokens: 4096
|
|
87
|
+
* },
|
|
88
|
+
* requests: [{
|
|
89
|
+
* video: {
|
|
90
|
+
* type: "asset_id",
|
|
91
|
+
* assetId: "6298d673f1090f1100476d4c"
|
|
92
|
+
* },
|
|
93
|
+
* customId: "summary-001"
|
|
94
|
+
* }, {
|
|
95
|
+
* video: {
|
|
96
|
+
* type: "asset_id",
|
|
97
|
+
* assetId: "6298d673f1090f1100476d4d"
|
|
98
|
+
* },
|
|
99
|
+
* customId: "summary-002"
|
|
100
|
+
* }, {
|
|
101
|
+
* video: {
|
|
102
|
+
* type: "asset_id",
|
|
103
|
+
* assetId: "6298d673f1090f1100476d4e"
|
|
104
|
+
* },
|
|
105
|
+
* customId: "action-003",
|
|
106
|
+
* prompt: {
|
|
107
|
+
* inputText: "List all action items discussed."
|
|
108
|
+
* }
|
|
109
|
+
* }]
|
|
110
|
+
* })
|
|
111
|
+
*
|
|
112
|
+
* @example
|
|
113
|
+
* await client.analyzeAsync.batches.create({
|
|
114
|
+
* modelName: "pegasus1.5",
|
|
115
|
+
* analysisMode: "time_based_metadata",
|
|
116
|
+
* defaults: {
|
|
117
|
+
* responseFormat: {
|
|
118
|
+
* type: "segment_definitions",
|
|
119
|
+
* segmentDefinitions: [{
|
|
120
|
+
* id: "product_moments",
|
|
121
|
+
* description: "Moments where a person holds <@product> while speaking to the camera.",
|
|
122
|
+
* fields: [{
|
|
123
|
+
* name: "segment_title",
|
|
124
|
+
* type: "string",
|
|
125
|
+
* description: "A short headline for this moment"
|
|
126
|
+
* }, {
|
|
127
|
+
* name: "product_visibility",
|
|
128
|
+
* type: "string",
|
|
129
|
+
* description: "How prominently the product appears in this segment",
|
|
130
|
+
* enum: ["FULL", "PARTIAL", "BACKGROUND"]
|
|
131
|
+
* }],
|
|
132
|
+
* mediaSources: [{
|
|
133
|
+
* name: "product",
|
|
134
|
+
* mediaType: "image",
|
|
135
|
+
* url: "https://example.com/product.jpg"
|
|
136
|
+
* }]
|
|
137
|
+
* }]
|
|
138
|
+
* },
|
|
139
|
+
* temperature: 0,
|
|
140
|
+
* maxTokens: 4096,
|
|
141
|
+
* minSegmentDuration: 2
|
|
142
|
+
* },
|
|
143
|
+
* requests: [{
|
|
144
|
+
* video: {
|
|
145
|
+
* type: "asset_id",
|
|
146
|
+
* assetId: "6298d673f1090f1100476d4c"
|
|
147
|
+
* },
|
|
148
|
+
* customId: "ep-001"
|
|
149
|
+
* }, {
|
|
150
|
+
* video: {
|
|
151
|
+
* type: "asset_id",
|
|
152
|
+
* assetId: "6298d673f1090f1100476d4d"
|
|
153
|
+
* },
|
|
154
|
+
* customId: "ep-002"
|
|
155
|
+
* }]
|
|
156
|
+
* })
|
|
157
|
+
*/
|
|
158
|
+
create(request: TwelvelabsApi.analyzeAsync.CreateAnalyzeBatchRequest, requestOptions?: Batches.RequestOptions): core.HttpResponsePromise<TwelvelabsApi.CreateAnalyzeBatchResponse>;
|
|
159
|
+
private __create;
|
|
160
|
+
/**
|
|
161
|
+
* Use this method to monitor a batch. The response includes the current batch status and counts for queued, processing, ready, failed, and canceled items.
|
|
162
|
+
*
|
|
163
|
+
* Poll this method until the batch reaches the `completed`, `canceled`, or `expired` status. To retrieve the results, call the [`GET`](/v1.3/api-reference/analyze-videos/batch-analysis/retrieve-batch-results) method of the `/analyze/batches/{batch_id}/results` endpoint.
|
|
164
|
+
*
|
|
165
|
+
* Do not treat the `completed` status as a success signal. It means processing has finished for every item, not that every analysis succeeded. To see how many items succeeded, failed, or were canceled, check the `ready_items`, `failed_items`, and `canceled_items` fields. A batch never has the `failed` status.
|
|
166
|
+
*
|
|
167
|
+
* @param {string} batchId - The unique identifier of the batch.
|
|
168
|
+
* @param {Batches.RequestOptions} requestOptions - Request-specific configuration.
|
|
169
|
+
*
|
|
170
|
+
* @throws {@link TwelvelabsApi.NotFoundError}
|
|
171
|
+
*
|
|
172
|
+
* @example
|
|
173
|
+
* await client.analyzeAsync.batches.retrieve("68f4ddaf8aaa60d33df0e800")
|
|
174
|
+
*/
|
|
175
|
+
retrieve(batchId: string, requestOptions?: Batches.RequestOptions): core.HttpResponsePromise<TwelvelabsApi.AnalyzeBatchStatusResponse>;
|
|
176
|
+
private __retrieve;
|
|
177
|
+
/**
|
|
178
|
+
* Use this method to delete a batch and all the tasks associated with it. You can only delete batches with status `completed`, `canceled`, or `expired`.
|
|
179
|
+
*
|
|
180
|
+
* Deleting a batch does not affect billing. You are billed for every completed analysis regardless of whether you delete the batch afterward.
|
|
181
|
+
*
|
|
182
|
+
* To stop a batch with the `pending` or `processing` status, use the [`POST`](/v1.3/api-reference/analyze-videos/batch-analysis/cancel-batch) method of the `/analyze/batches/{batch_id}/cancel` endpoint.
|
|
183
|
+
*
|
|
184
|
+
* Batches are deleted 30 days after creation.
|
|
185
|
+
*
|
|
186
|
+
* @param {string} batchId - The unique identifier of the batch.
|
|
187
|
+
* @param {Batches.RequestOptions} requestOptions - Request-specific configuration.
|
|
188
|
+
*
|
|
189
|
+
* @throws {@link TwelvelabsApi.NotFoundError}
|
|
190
|
+
* @throws {@link TwelvelabsApi.ConflictError}
|
|
191
|
+
*
|
|
192
|
+
* @example
|
|
193
|
+
* await client.analyzeAsync.batches.delete("68f4ddaf8aaa60d33df0e800")
|
|
194
|
+
*/
|
|
195
|
+
delete(batchId: string, requestOptions?: Batches.RequestOptions): core.HttpResponsePromise<void>;
|
|
196
|
+
private __delete;
|
|
197
|
+
/**
|
|
198
|
+
* Use this method to retrieve the results for each item in a batch. You can call it while the batch has the `pending` or `processing` status.
|
|
199
|
+
*
|
|
200
|
+
* Each result entry has a status. For details on each status, see the [Item statuses](/v1.3/api-reference/analyze-videos/batch-analysis/the-batch-object#item-statuses) section on the **The batch object** page.
|
|
201
|
+
*
|
|
202
|
+
* Each result entry includes a task identifier in the `task_id` field. Use this value with the [`GET`](/v1.3/api-reference/analyze-videos/retrieve-analysis-task-status-results) method of the `/analyze/tasks/{task_id}` endpoint if you need the full analysis task response.
|
|
203
|
+
*
|
|
204
|
+
* You can retrieve results for 30 days after batch creation.
|
|
205
|
+
*/
|
|
206
|
+
results(batchId: string, requestOptions?: Batches.RequestOptions): core.HttpResponsePromise<core.Stream<TwelvelabsApi.BatchResultItem>>;
|
|
207
|
+
private __results;
|
|
208
|
+
/**
|
|
209
|
+
* Use this method to request cancellation for a batch with the `pending` or `processing` status.
|
|
210
|
+
*
|
|
211
|
+
* When you invoke this method, the platform performs the following steps:
|
|
212
|
+
* - Cancels the items in the `queued` status.
|
|
213
|
+
* - Finishes the analysis for the items in the `processing` status.
|
|
214
|
+
*
|
|
215
|
+
* The batch status changes to `canceling` immediately, and to `canceled` after every item reaches `ready`, `failed`, or `canceled`. You are not billed for canceled or failed items.
|
|
216
|
+
*
|
|
217
|
+
* @param {string} batchId - The unique identifier of the batch.
|
|
218
|
+
* @param {Batches.RequestOptions} requestOptions - Request-specific configuration.
|
|
219
|
+
*
|
|
220
|
+
* @throws {@link TwelvelabsApi.NotFoundError}
|
|
221
|
+
* @throws {@link TwelvelabsApi.ConflictError}
|
|
222
|
+
*
|
|
223
|
+
* @example
|
|
224
|
+
* await client.analyzeAsync.batches.cancel("68f4ddaf8aaa60d33df0e800")
|
|
225
|
+
*/
|
|
226
|
+
cancel(batchId: string, requestOptions?: Batches.RequestOptions): core.HttpResponsePromise<TwelvelabsApi.AnalyzeBatchStatusResponse>;
|
|
227
|
+
private __cancel;
|
|
228
|
+
protected _getCustomAuthorizationHeaders(): Promise<{
|
|
229
|
+
"x-api-key": string;
|
|
230
|
+
}>;
|
|
231
|
+
}
|