twelvelabs-js 1.2.4 → 1.2.5
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.js +2 -2
- package/api/client/requests/AnalyzeRequest.d.ts +13 -5
- package/api/client/requests/AnalyzeStreamRequest.d.ts +13 -5
- package/api/resources/analyzeAsync/resources/tasks/client/Client.d.ts +69 -0
- package/api/resources/analyzeAsync/resources/tasks/client/Client.js +73 -4
- package/api/resources/analyzeAsync/resources/tasks/client/requests/CreateAsyncAnalyzeRequest.d.ts +81 -9
- package/api/resources/analyzeAsync/resources/tasks/types/CreateAsyncAnalyzeRequestModelName.d.ts +1 -1
- package/api/resources/assets/client/Client.d.ts +44 -0
- package/api/resources/assets/client/Client.js +148 -4
- package/api/resources/assets/client/requests/AssetsCreateRequest.d.ts +2 -0
- package/api/resources/assets/client/requests/AssetsUpdateUserMetadataRequest.d.ts +18 -0
- package/api/resources/assets/client/requests/index.d.ts +1 -0
- 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.js +6 -6
- package/api/resources/indexes/resources/indexedAssets/client/requests/IndexedAssetsCreateRequest.d.ts +3 -0
- package/api/resources/indexes/resources/videos/client/Client.js +4 -4
- package/api/resources/indexes/resources/videos/types/VideosRetrieveResponse.d.ts +3 -1
- package/api/resources/multipartUpload/client/Client.js +5 -5
- package/api/resources/multipartUpload/client/requests/CreateAssetUploadRequest.d.ts +2 -0
- package/api/resources/search/client/Client.js +2 -2
- package/api/resources/tasks/client/Client.d.ts +0 -3
- package/api/resources/tasks/client/Client.js +4 -9
- package/api/resources/tasks/client/requests/TasksCreateRequest.d.ts +1 -1
- package/api/resources/tasks/index.d.ts +0 -1
- package/api/resources/tasks/index.js +0 -1
- package/api/types/AnalyzeMaxTokens.d.ts +1 -1
- package/api/types/AnalyzePromptV2.d.ts +1 -1
- package/api/types/AnalyzeRequestModelName.d.ts +1 -1
- package/api/types/AnalyzeStreamRequestModelName.d.ts +1 -1
- package/api/types/AnalyzeTaskError.d.ts +16 -2
- package/api/types/AnalyzeTaskResponse.d.ts +8 -1
- package/api/types/AnalyzeTaskResponseRequestParams.d.ts +1 -1
- package/api/types/AnalyzeTaskResultUsage.d.ts +1 -1
- package/api/types/AnalyzeTextPrompt.d.ts +1 -5
- package/api/types/Asset.d.ts +2 -0
- package/api/types/AsyncResponseFormat.d.ts +53 -6
- package/api/types/AsyncResponseFormatSegmentTimeFormat.d.ts +20 -0
- package/api/types/AsyncResponseFormatSegmentTimeFormat.js +11 -0
- package/api/types/FinishReason.d.ts +3 -3
- package/api/types/IndexedAssetDetailed.d.ts +1 -1
- package/api/types/NonStreamAnalyzeResponse.d.ts +2 -0
- package/api/types/SegmentDefinition.d.ts +1 -0
- package/api/types/SegmentField.d.ts +29 -3
- package/api/types/SegmentFieldFormat.d.ts +24 -0
- package/api/types/{VideoItem.js → SegmentFieldFormat.js} +6 -0
- package/api/types/SegmentFieldItems.d.ts +1 -1
- package/api/types/SegmentFieldType.d.ts +4 -1
- package/api/types/SegmentFieldType.js +1 -0
- package/api/types/StreamEndResponse.d.ts +2 -0
- package/api/types/SyncResponseFormat.d.ts +48 -4
- package/api/types/TokenUsage.d.ts +1 -1
- package/api/types/UserMetadata.d.ts +3 -12
- package/api/types/VideoVector.d.ts +2 -0
- package/api/types/index.d.ts +2 -5
- package/api/types/index.js +2 -5
- package/dist/Client.js +2 -2
- package/dist/api/client/requests/AnalyzeRequest.d.ts +13 -5
- package/dist/api/client/requests/AnalyzeStreamRequest.d.ts +13 -5
- package/dist/api/resources/analyzeAsync/resources/tasks/client/Client.d.ts +69 -0
- package/dist/api/resources/analyzeAsync/resources/tasks/client/Client.js +73 -4
- package/dist/api/resources/analyzeAsync/resources/tasks/client/requests/CreateAsyncAnalyzeRequest.d.ts +81 -9
- package/dist/api/resources/analyzeAsync/resources/tasks/types/CreateAsyncAnalyzeRequestModelName.d.ts +1 -1
- package/dist/api/resources/assets/client/Client.d.ts +44 -0
- package/dist/api/resources/assets/client/Client.js +148 -4
- package/dist/api/resources/assets/client/requests/AssetsCreateRequest.d.ts +2 -0
- package/dist/api/resources/assets/client/requests/AssetsUpdateUserMetadataRequest.d.ts +18 -0
- package/dist/api/resources/assets/client/requests/index.d.ts +1 -0
- 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.js +6 -6
- package/dist/api/resources/indexes/resources/indexedAssets/client/requests/IndexedAssetsCreateRequest.d.ts +3 -0
- package/dist/api/resources/indexes/resources/videos/client/Client.js +4 -4
- package/dist/api/resources/indexes/resources/videos/types/VideosRetrieveResponse.d.ts +3 -1
- package/dist/api/resources/multipartUpload/client/Client.js +5 -5
- package/dist/api/resources/multipartUpload/client/requests/CreateAssetUploadRequest.d.ts +2 -0
- package/dist/api/resources/search/client/Client.js +2 -2
- package/dist/api/resources/tasks/client/Client.d.ts +0 -3
- package/dist/api/resources/tasks/client/Client.js +4 -9
- package/dist/api/resources/tasks/client/requests/TasksCreateRequest.d.ts +1 -1
- package/dist/api/resources/tasks/index.d.ts +0 -1
- package/dist/api/resources/tasks/index.js +0 -1
- package/dist/api/types/AnalyzeMaxTokens.d.ts +1 -1
- package/dist/api/types/AnalyzePromptV2.d.ts +1 -1
- package/dist/api/types/AnalyzeRequestModelName.d.ts +1 -1
- package/dist/api/types/AnalyzeStreamRequestModelName.d.ts +1 -1
- package/dist/api/types/AnalyzeTaskError.d.ts +16 -2
- package/dist/api/types/AnalyzeTaskResponse.d.ts +8 -1
- package/dist/api/types/AnalyzeTaskResponseRequestParams.d.ts +1 -1
- package/dist/api/types/AnalyzeTaskResultUsage.d.ts +1 -1
- package/dist/api/types/AnalyzeTextPrompt.d.ts +1 -5
- package/dist/api/types/Asset.d.ts +2 -0
- package/dist/api/types/AsyncResponseFormat.d.ts +53 -6
- package/dist/api/types/AsyncResponseFormatSegmentTimeFormat.d.ts +20 -0
- package/dist/api/types/AsyncResponseFormatSegmentTimeFormat.js +11 -0
- package/dist/api/types/FinishReason.d.ts +3 -3
- package/dist/api/types/IndexedAssetDetailed.d.ts +1 -1
- package/dist/api/types/NonStreamAnalyzeResponse.d.ts +2 -0
- package/dist/api/types/SegmentDefinition.d.ts +1 -0
- package/dist/api/types/SegmentField.d.ts +29 -3
- package/dist/api/types/SegmentFieldFormat.d.ts +24 -0
- package/{api/types/ImportLogVideoStatus.js → dist/api/types/SegmentFieldFormat.js} +6 -0
- package/dist/api/types/SegmentFieldItems.d.ts +1 -1
- package/dist/api/types/SegmentFieldType.d.ts +4 -1
- package/dist/api/types/SegmentFieldType.js +1 -0
- package/dist/api/types/StreamEndResponse.d.ts +2 -0
- package/dist/api/types/SyncResponseFormat.d.ts +48 -4
- package/dist/api/types/TokenUsage.d.ts +1 -1
- package/dist/api/types/UserMetadata.d.ts +3 -12
- package/dist/api/types/VideoVector.d.ts +2 -0
- package/dist/api/types/index.d.ts +2 -5
- package/dist/api/types/index.js +2 -5
- package/dist/serialization/resources/assets/client/index.d.ts +1 -0
- package/dist/{api/resources/tasks/resources/transfers → serialization/resources/assets/client}/index.js +1 -1
- package/dist/serialization/resources/assets/client/requests/AssetsUpdateUserMetadataRequest.d.ts +13 -0
- package/{serialization/types/VideoItem.js → dist/serialization/resources/assets/client/requests/AssetsUpdateUserMetadataRequest.js} +5 -6
- package/dist/serialization/resources/assets/client/requests/index.d.ts +1 -0
- package/dist/serialization/resources/assets/client/requests/index.js +5 -0
- package/dist/serialization/resources/assets/index.d.ts +1 -0
- package/dist/serialization/resources/assets/index.js +1 -0
- package/dist/serialization/resources/index.d.ts +1 -0
- package/dist/serialization/resources/index.js +1 -0
- package/dist/serialization/resources/indexes/resources/indexedAssets/client/requests/IndexedAssetsCreateRequest.d.ts +2 -0
- package/dist/serialization/resources/indexes/resources/indexedAssets/client/requests/IndexedAssetsCreateRequest.js +2 -0
- package/dist/serialization/resources/indexes/resources/videos/types/VideosRetrieveResponse.d.ts +1 -0
- package/dist/serialization/resources/indexes/resources/videos/types/VideosRetrieveResponse.js +1 -0
- package/dist/serialization/resources/multipartUpload/client/requests/CreateAssetUploadRequest.d.ts +2 -0
- package/dist/serialization/resources/multipartUpload/client/requests/CreateAssetUploadRequest.js +2 -0
- package/dist/serialization/types/Asset.d.ts +2 -0
- package/dist/serialization/types/Asset.js +2 -0
- package/dist/serialization/types/AsyncResponseFormat.d.ts +2 -0
- package/dist/serialization/types/AsyncResponseFormat.js +2 -0
- package/dist/serialization/types/AsyncResponseFormatSegmentTimeFormat.d.ts +10 -0
- package/dist/serialization/types/{ImportLogFailedFilesItem.js → AsyncResponseFormatSegmentTimeFormat.js} +2 -5
- package/dist/serialization/types/NonStreamAnalyzeResponse.d.ts +2 -0
- package/dist/serialization/types/NonStreamAnalyzeResponse.js +2 -0
- package/dist/serialization/types/SegmentField.d.ts +2 -0
- package/dist/serialization/types/SegmentField.js +2 -0
- package/dist/serialization/types/SegmentFieldFormat.d.ts +10 -0
- package/{serialization/types/ImportLogFailedFilesItem.js → dist/serialization/types/SegmentFieldFormat.js} +2 -5
- package/dist/serialization/types/SegmentFieldType.d.ts +1 -1
- package/dist/serialization/types/SegmentFieldType.js +1 -1
- package/dist/serialization/types/StreamEndResponse.d.ts +2 -0
- package/dist/serialization/types/StreamEndResponse.js +2 -0
- package/dist/serialization/types/VideoVector.d.ts +1 -0
- package/dist/serialization/types/VideoVector.js +1 -0
- package/dist/serialization/types/index.d.ts +2 -5
- package/dist/serialization/types/index.js +2 -5
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/package.json +1 -1
- package/reference.md +150 -146
- package/serialization/resources/assets/client/index.d.ts +1 -0
- package/{api/resources/tasks/resources/transfers → serialization/resources/assets/client}/index.js +1 -1
- package/serialization/resources/assets/client/requests/AssetsUpdateUserMetadataRequest.d.ts +13 -0
- package/serialization/resources/assets/client/requests/AssetsUpdateUserMetadataRequest.js +44 -0
- package/serialization/resources/assets/client/requests/index.d.ts +1 -0
- package/serialization/resources/assets/client/requests/index.js +5 -0
- package/serialization/resources/assets/index.d.ts +1 -0
- package/serialization/resources/assets/index.js +1 -0
- package/serialization/resources/index.d.ts +1 -0
- package/serialization/resources/index.js +1 -0
- package/serialization/resources/indexes/resources/indexedAssets/client/requests/IndexedAssetsCreateRequest.d.ts +2 -0
- package/serialization/resources/indexes/resources/indexedAssets/client/requests/IndexedAssetsCreateRequest.js +2 -0
- package/serialization/resources/indexes/resources/videos/types/VideosRetrieveResponse.d.ts +1 -0
- package/serialization/resources/indexes/resources/videos/types/VideosRetrieveResponse.js +1 -0
- package/serialization/resources/multipartUpload/client/requests/CreateAssetUploadRequest.d.ts +2 -0
- package/serialization/resources/multipartUpload/client/requests/CreateAssetUploadRequest.js +2 -0
- package/serialization/types/Asset.d.ts +2 -0
- package/serialization/types/Asset.js +2 -0
- package/serialization/types/AsyncResponseFormat.d.ts +2 -0
- package/serialization/types/AsyncResponseFormat.js +2 -0
- package/serialization/types/AsyncResponseFormatSegmentTimeFormat.d.ts +10 -0
- package/{dist/serialization/types/VideoItem.js → serialization/types/AsyncResponseFormatSegmentTimeFormat.js} +2 -6
- package/serialization/types/NonStreamAnalyzeResponse.d.ts +2 -0
- package/serialization/types/NonStreamAnalyzeResponse.js +2 -0
- package/serialization/types/SegmentField.d.ts +2 -0
- package/serialization/types/SegmentField.js +2 -0
- package/serialization/types/SegmentFieldFormat.d.ts +10 -0
- package/{api/resources/tasks/resources/index.js → serialization/types/SegmentFieldFormat.js} +6 -2
- package/serialization/types/SegmentFieldType.d.ts +1 -1
- package/serialization/types/SegmentFieldType.js +1 -1
- package/serialization/types/StreamEndResponse.d.ts +2 -0
- package/serialization/types/StreamEndResponse.js +2 -0
- package/serialization/types/VideoVector.d.ts +1 -0
- package/serialization/types/VideoVector.js +1 -0
- package/serialization/types/index.d.ts +2 -5
- package/serialization/types/index.js +2 -5
- package/version.d.ts +1 -1
- package/version.js +1 -1
- package/api/resources/tasks/resources/index.d.ts +0 -1
- package/api/resources/tasks/resources/transfers/client/Client.d.ts +0 -57
- package/api/resources/tasks/resources/transfers/client/Client.js +0 -217
- package/api/resources/tasks/resources/transfers/client/index.d.ts +0 -1
- package/api/resources/tasks/resources/transfers/client/index.js +0 -2
- package/api/resources/tasks/resources/transfers/index.d.ts +0 -1
- package/api/types/ImportLog.d.ts +0 -21
- package/api/types/ImportLogFailedFilesItem.d.ts +0 -9
- package/api/types/ImportLogVideoStatus.d.ts +0 -14
- package/api/types/VideoItem.d.ts +0 -14
- package/api/types/VideoItemFailed.d.ts +0 -14
- package/api/types/VideoItemFailed.js +0 -5
- package/dist/api/resources/tasks/resources/index.d.ts +0 -1
- package/dist/api/resources/tasks/resources/index.js +0 -37
- package/dist/api/resources/tasks/resources/transfers/client/Client.d.ts +0 -57
- package/dist/api/resources/tasks/resources/transfers/client/Client.js +0 -217
- package/dist/api/resources/tasks/resources/transfers/client/index.d.ts +0 -1
- package/dist/api/resources/tasks/resources/transfers/client/index.js +0 -2
- package/dist/api/resources/tasks/resources/transfers/index.d.ts +0 -1
- package/dist/api/types/ImportLog.d.ts +0 -21
- package/dist/api/types/ImportLog.js +0 -5
- package/dist/api/types/ImportLogFailedFilesItem.d.ts +0 -9
- package/dist/api/types/ImportLogFailedFilesItem.js +0 -5
- package/dist/api/types/ImportLogVideoStatus.d.ts +0 -14
- package/dist/api/types/ImportLogVideoStatus.js +0 -5
- package/dist/api/types/VideoItem.d.ts +0 -14
- package/dist/api/types/VideoItem.js +0 -5
- package/dist/api/types/VideoItemFailed.d.ts +0 -14
- package/dist/api/types/VideoItemFailed.js +0 -5
- package/dist/serialization/types/ImportLog.d.ts +0 -19
- package/dist/serialization/types/ImportLog.js +0 -50
- package/dist/serialization/types/ImportLogFailedFilesItem.d.ts +0 -13
- package/dist/serialization/types/ImportLogVideoStatus.d.ts +0 -17
- package/dist/serialization/types/ImportLogVideoStatus.js +0 -48
- package/dist/serialization/types/VideoItem.d.ts +0 -14
- package/dist/serialization/types/VideoItemFailed.d.ts +0 -14
- package/dist/serialization/types/VideoItemFailed.js +0 -45
- package/serialization/types/ImportLog.d.ts +0 -19
- package/serialization/types/ImportLog.js +0 -50
- package/serialization/types/ImportLogFailedFilesItem.d.ts +0 -13
- package/serialization/types/ImportLogVideoStatus.d.ts +0 -17
- package/serialization/types/ImportLogVideoStatus.js +0 -48
- package/serialization/types/VideoItem.d.ts +0 -14
- package/serialization/types/VideoItemFailed.d.ts +0 -14
- package/serialization/types/VideoItemFailed.js +0 -45
- /package/api/{types/ImportLog.js → resources/assets/client/requests/AssetsUpdateUserMetadataRequest.js} +0 -0
- /package/{api/types/ImportLogFailedFilesItem.js → dist/api/resources/assets/client/requests/AssetsUpdateUserMetadataRequest.js} +0 -0
package/Client.js
CHANGED
|
@@ -132,7 +132,7 @@ class TwelvelabsApiClient {
|
|
|
132
132
|
const _response = yield core.fetcher({
|
|
133
133
|
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
134
|
method: "POST",
|
|
135
|
-
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "twelvelabs-js", "X-Fern-SDK-Version": "1.2.
|
|
135
|
+
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "twelvelabs-js", "X-Fern-SDK-Version": "1.2.5", "User-Agent": "twelvelabs-js/1.2.5", "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
136
|
contentType: "application/json",
|
|
137
137
|
requestType: "json",
|
|
138
138
|
body: Object.assign(Object.assign({}, serializers.AnalyzeStreamRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" })), { stream: true }),
|
|
@@ -238,7 +238,7 @@ class TwelvelabsApiClient {
|
|
|
238
238
|
const _response = yield core.fetcher({
|
|
239
239
|
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
240
|
method: "POST",
|
|
241
|
-
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "twelvelabs-js", "X-Fern-SDK-Version": "1.2.
|
|
241
|
+
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "twelvelabs-js", "X-Fern-SDK-Version": "1.2.5", "User-Agent": "twelvelabs-js/1.2.5", "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
242
|
contentType: "application/json",
|
|
243
243
|
requestType: "json",
|
|
244
244
|
body: Object.assign(Object.assign({}, serializers.AnalyzeRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" })), { stream: false }),
|
|
@@ -10,7 +10,7 @@ export interface AnalyzeRequest {
|
|
|
10
10
|
/**
|
|
11
11
|
* The video understanding model to use for analysis.
|
|
12
12
|
* - `pegasus1.2`: General analysis (prompt-based text generation).
|
|
13
|
-
* - `pegasus1.5`: General analysis (prompt-based text generation) with video clipping, structured prompts with reference images,
|
|
13
|
+
* - `pegasus1.5`: General analysis (prompt-based text generation) with video clipping, structured prompts with reference images, and video segmentation (async only). See the [Pegasus](/v1.3/docs/concepts/models/pegasus#context-window) page for token limits.
|
|
14
14
|
*
|
|
15
15
|
* **Default:** `pegasus1.2`
|
|
16
16
|
*/
|
|
@@ -22,20 +22,28 @@ export interface AnalyzeRequest {
|
|
|
22
22
|
*/
|
|
23
23
|
videoId?: string;
|
|
24
24
|
video?: TwelvelabsApi.VideoContext;
|
|
25
|
-
/**
|
|
25
|
+
/**
|
|
26
|
+
* A text prompt that guides the model on the desired format or content. Works with both Pegasus 1.2 and Pegasus 1.5. To include reference images in your prompt, use the `prompt_v2` parameter instead (Pegasus 1.5 only). Mutually exclusive with the `prompt_v2` parameter.
|
|
27
|
+
*
|
|
28
|
+
* Your prompts can be instructive or descriptive, or you can phrase them as questions. Pegasus 1.2 limits prompts to 2,000 tokens. For Pegasus 1.5, this text counts toward the [context window](/v1.3/docs/concepts/models/pegasus#context-window).
|
|
29
|
+
*/
|
|
26
30
|
prompt?: TwelvelabsApi.AnalyzeTextPrompt;
|
|
27
|
-
/**
|
|
31
|
+
/**
|
|
32
|
+
* A structured prompt with `<@name>` placeholders for referencing images. Requires the `model_name` parameter set to `pegasus1.5`. Mutually exclusive with the `prompt` parameter.
|
|
33
|
+
*
|
|
34
|
+
* The prompt text and reference images count toward the [context window](/v1.3/docs/concepts/models/pegasus#context-window).
|
|
35
|
+
*/
|
|
28
36
|
promptV2?: TwelvelabsApi.AnalyzePromptV2;
|
|
29
37
|
temperature?: TwelvelabsApi.AnalyzeTemperature;
|
|
30
38
|
/** Specifies the format of the response. When you omit this parameter, the platform returns unstructured text. Only the `json_schema` type is supported for synchronous analysis. */
|
|
31
39
|
responseFormat?: TwelvelabsApi.SyncResponseFormat;
|
|
32
40
|
/**
|
|
33
|
-
* The maximum
|
|
41
|
+
* The maximum response length, in tokens. The allowed range depends on the model:
|
|
34
42
|
*
|
|
35
43
|
* | Model | Min | Max | Default |
|
|
36
44
|
* |-------|-----|-----|---------|
|
|
37
45
|
* | Pegasus 1.2 | 1 | 4,096 | 4,096 |
|
|
38
|
-
* | Pegasus 1.5 | 512 |
|
|
46
|
+
* | Pegasus 1.5 | 512 | 98,304 | 4,096 |
|
|
39
47
|
*/
|
|
40
48
|
maxTokens?: number;
|
|
41
49
|
/**
|
|
@@ -10,7 +10,7 @@ export interface AnalyzeStreamRequest {
|
|
|
10
10
|
/**
|
|
11
11
|
* The video understanding model to use for analysis.
|
|
12
12
|
* - `pegasus1.2`: General analysis (prompt-based text generation).
|
|
13
|
-
* - `pegasus1.5`: General analysis (prompt-based text generation) with video clipping, structured prompts with reference images,
|
|
13
|
+
* - `pegasus1.5`: General analysis (prompt-based text generation) with video clipping, structured prompts with reference images, and video segmentation (async only). See the [Pegasus](/v1.3/docs/concepts/models/pegasus#context-window) page for token limits.
|
|
14
14
|
*
|
|
15
15
|
* **Default:** `pegasus1.2`
|
|
16
16
|
*/
|
|
@@ -22,20 +22,28 @@ export interface AnalyzeStreamRequest {
|
|
|
22
22
|
*/
|
|
23
23
|
videoId?: string;
|
|
24
24
|
video?: TwelvelabsApi.VideoContext;
|
|
25
|
-
/**
|
|
25
|
+
/**
|
|
26
|
+
* A text prompt that guides the model on the desired format or content. Works with both Pegasus 1.2 and Pegasus 1.5. To include reference images in your prompt, use the `prompt_v2` parameter instead (Pegasus 1.5 only). Mutually exclusive with the `prompt_v2` parameter.
|
|
27
|
+
*
|
|
28
|
+
* Your prompts can be instructive or descriptive, or you can phrase them as questions. Pegasus 1.2 limits prompts to 2,000 tokens. For Pegasus 1.5, this text counts toward the [context window](/v1.3/docs/concepts/models/pegasus#context-window).
|
|
29
|
+
*/
|
|
26
30
|
prompt?: TwelvelabsApi.AnalyzeTextPrompt;
|
|
27
|
-
/**
|
|
31
|
+
/**
|
|
32
|
+
* A structured prompt with `<@name>` placeholders for referencing images. Requires the `model_name` parameter set to `pegasus1.5`. Mutually exclusive with the `prompt` parameter.
|
|
33
|
+
*
|
|
34
|
+
* The prompt text and reference images count toward the [context window](/v1.3/docs/concepts/models/pegasus#context-window).
|
|
35
|
+
*/
|
|
28
36
|
promptV2?: TwelvelabsApi.AnalyzePromptV2;
|
|
29
37
|
temperature?: TwelvelabsApi.AnalyzeTemperature;
|
|
30
38
|
/** Specifies the format of the response. When you omit this parameter, the platform returns unstructured text. Only the `json_schema` type is supported for synchronous analysis. */
|
|
31
39
|
responseFormat?: TwelvelabsApi.SyncResponseFormat;
|
|
32
40
|
/**
|
|
33
|
-
* The maximum
|
|
41
|
+
* The maximum response length, in tokens. The allowed range depends on the model:
|
|
34
42
|
*
|
|
35
43
|
* | Model | Min | Max | Default |
|
|
36
44
|
* |-------|-----|-----|---------|
|
|
37
45
|
* | Pegasus 1.2 | 1 | 4,096 | 4,096 |
|
|
38
|
-
* | Pegasus 1.5 | 512 |
|
|
46
|
+
* | Pegasus 1.5 | 512 | 98,304 | 4,096 |
|
|
39
47
|
*/
|
|
40
48
|
maxTokens?: number;
|
|
41
49
|
/**
|
|
@@ -170,6 +170,34 @@ export declare class Tasks {
|
|
|
170
170
|
* type: "url",
|
|
171
171
|
* url: "https://example.com/video.mp4"
|
|
172
172
|
* },
|
|
173
|
+
* analysisMode: "time_based_metadata",
|
|
174
|
+
* responseFormat: {
|
|
175
|
+
* type: "segment_definitions",
|
|
176
|
+
* segmentDefinitions: [{
|
|
177
|
+
* id: "scenes",
|
|
178
|
+
* description: "Detect scenes and label them.",
|
|
179
|
+
* fields: [{
|
|
180
|
+
* name: "label",
|
|
181
|
+
* type: "string",
|
|
182
|
+
* description: "A short label for this scene."
|
|
183
|
+
* }, {
|
|
184
|
+
* name: "highlight_at",
|
|
185
|
+
* type: "timestamp",
|
|
186
|
+
* description: "The single most representative moment in this scene.",
|
|
187
|
+
* format: "seconds"
|
|
188
|
+
* }]
|
|
189
|
+
* }],
|
|
190
|
+
* segmentTimeFormat: "hh:mm:ss"
|
|
191
|
+
* }
|
|
192
|
+
* })
|
|
193
|
+
*
|
|
194
|
+
* @example
|
|
195
|
+
* await client.analyzeAsync.tasks.create({
|
|
196
|
+
* modelName: "pegasus1.5",
|
|
197
|
+
* video: {
|
|
198
|
+
* type: "url",
|
|
199
|
+
* url: "https://example.com/video.mp4"
|
|
200
|
+
* },
|
|
173
201
|
* promptV2: {
|
|
174
202
|
* inputText: "Is there a <@tiger-1> in the video?",
|
|
175
203
|
* mediaSources: [{
|
|
@@ -180,6 +208,47 @@ export declare class Tasks {
|
|
|
180
208
|
* },
|
|
181
209
|
* maxTokens: 4096
|
|
182
210
|
* })
|
|
211
|
+
*
|
|
212
|
+
* @example
|
|
213
|
+
* await client.analyzeAsync.tasks.create({
|
|
214
|
+
* modelName: "pegasus1.5",
|
|
215
|
+
* video: {
|
|
216
|
+
* type: "url",
|
|
217
|
+
* url: "https://example.com/video.mp4"
|
|
218
|
+
* },
|
|
219
|
+
* prompt: "Identify intro, main content, and outro clips.",
|
|
220
|
+
* responseFormat: {
|
|
221
|
+
* type: "json_schema",
|
|
222
|
+
* jsonSchema: {
|
|
223
|
+
* "type": "object",
|
|
224
|
+
* "properties": {
|
|
225
|
+
* "clip_start": {
|
|
226
|
+
* "type": "timestamp",
|
|
227
|
+
* "format": "seconds"
|
|
228
|
+
* },
|
|
229
|
+
* "events": {
|
|
230
|
+
* "type": "array",
|
|
231
|
+
* "items": {
|
|
232
|
+
* "type": "object",
|
|
233
|
+
* "properties": {
|
|
234
|
+
* "intro_end": {
|
|
235
|
+
* "type": "timestamp",
|
|
236
|
+
* "format": "hh:mm:ss"
|
|
237
|
+
* },
|
|
238
|
+
* "outro_start": {
|
|
239
|
+
* "type": "timestamp",
|
|
240
|
+
* "format": "hh:mm:ss.fff"
|
|
241
|
+
* },
|
|
242
|
+
* "label": {
|
|
243
|
+
* "type": "string"
|
|
244
|
+
* }
|
|
245
|
+
* }
|
|
246
|
+
* }
|
|
247
|
+
* }
|
|
248
|
+
* }
|
|
249
|
+
* }
|
|
250
|
+
* }
|
|
251
|
+
* })
|
|
183
252
|
*/
|
|
184
253
|
create(request: TwelvelabsApi.analyzeAsync.CreateAsyncAnalyzeRequest, requestOptions?: Tasks.RequestOptions): core.HttpResponsePromise<TwelvelabsApi.CreateAnalyzeTaskResponse>;
|
|
185
254
|
private __create;
|
|
@@ -112,7 +112,7 @@ class Tasks {
|
|
|
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, "analyze/tasks"),
|
|
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.
|
|
115
|
+
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "twelvelabs-js", "X-Fern-SDK-Version": "1.2.5", "User-Agent": "twelvelabs-js/1.2.5", "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",
|
|
@@ -284,6 +284,34 @@ class Tasks {
|
|
|
284
284
|
* type: "url",
|
|
285
285
|
* url: "https://example.com/video.mp4"
|
|
286
286
|
* },
|
|
287
|
+
* analysisMode: "time_based_metadata",
|
|
288
|
+
* responseFormat: {
|
|
289
|
+
* type: "segment_definitions",
|
|
290
|
+
* segmentDefinitions: [{
|
|
291
|
+
* id: "scenes",
|
|
292
|
+
* description: "Detect scenes and label them.",
|
|
293
|
+
* fields: [{
|
|
294
|
+
* name: "label",
|
|
295
|
+
* type: "string",
|
|
296
|
+
* description: "A short label for this scene."
|
|
297
|
+
* }, {
|
|
298
|
+
* name: "highlight_at",
|
|
299
|
+
* type: "timestamp",
|
|
300
|
+
* description: "The single most representative moment in this scene.",
|
|
301
|
+
* format: "seconds"
|
|
302
|
+
* }]
|
|
303
|
+
* }],
|
|
304
|
+
* segmentTimeFormat: "hh:mm:ss"
|
|
305
|
+
* }
|
|
306
|
+
* })
|
|
307
|
+
*
|
|
308
|
+
* @example
|
|
309
|
+
* await client.analyzeAsync.tasks.create({
|
|
310
|
+
* modelName: "pegasus1.5",
|
|
311
|
+
* video: {
|
|
312
|
+
* type: "url",
|
|
313
|
+
* url: "https://example.com/video.mp4"
|
|
314
|
+
* },
|
|
287
315
|
* promptV2: {
|
|
288
316
|
* inputText: "Is there a <@tiger-1> in the video?",
|
|
289
317
|
* mediaSources: [{
|
|
@@ -294,6 +322,47 @@ class Tasks {
|
|
|
294
322
|
* },
|
|
295
323
|
* maxTokens: 4096
|
|
296
324
|
* })
|
|
325
|
+
*
|
|
326
|
+
* @example
|
|
327
|
+
* await client.analyzeAsync.tasks.create({
|
|
328
|
+
* modelName: "pegasus1.5",
|
|
329
|
+
* video: {
|
|
330
|
+
* type: "url",
|
|
331
|
+
* url: "https://example.com/video.mp4"
|
|
332
|
+
* },
|
|
333
|
+
* prompt: "Identify intro, main content, and outro clips.",
|
|
334
|
+
* responseFormat: {
|
|
335
|
+
* type: "json_schema",
|
|
336
|
+
* jsonSchema: {
|
|
337
|
+
* "type": "object",
|
|
338
|
+
* "properties": {
|
|
339
|
+
* "clip_start": {
|
|
340
|
+
* "type": "timestamp",
|
|
341
|
+
* "format": "seconds"
|
|
342
|
+
* },
|
|
343
|
+
* "events": {
|
|
344
|
+
* "type": "array",
|
|
345
|
+
* "items": {
|
|
346
|
+
* "type": "object",
|
|
347
|
+
* "properties": {
|
|
348
|
+
* "intro_end": {
|
|
349
|
+
* "type": "timestamp",
|
|
350
|
+
* "format": "hh:mm:ss"
|
|
351
|
+
* },
|
|
352
|
+
* "outro_start": {
|
|
353
|
+
* "type": "timestamp",
|
|
354
|
+
* "format": "hh:mm:ss.fff"
|
|
355
|
+
* },
|
|
356
|
+
* "label": {
|
|
357
|
+
* "type": "string"
|
|
358
|
+
* }
|
|
359
|
+
* }
|
|
360
|
+
* }
|
|
361
|
+
* }
|
|
362
|
+
* }
|
|
363
|
+
* }
|
|
364
|
+
* }
|
|
365
|
+
* })
|
|
297
366
|
*/
|
|
298
367
|
create(request, requestOptions) {
|
|
299
368
|
return core.HttpResponsePromise.fromPromise(this.__create(request, requestOptions));
|
|
@@ -304,7 +373,7 @@ class Tasks {
|
|
|
304
373
|
const _response = yield core.fetcher({
|
|
305
374
|
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"),
|
|
306
375
|
method: "POST",
|
|
307
|
-
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "twelvelabs-js", "X-Fern-SDK-Version": "1.2.
|
|
376
|
+
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "twelvelabs-js", "X-Fern-SDK-Version": "1.2.5", "User-Agent": "twelvelabs-js/1.2.5", "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),
|
|
308
377
|
contentType: "application/json",
|
|
309
378
|
requestType: "json",
|
|
310
379
|
body: serializers.analyzeAsync.CreateAsyncAnalyzeRequest.jsonOrThrow(request, {
|
|
@@ -385,7 +454,7 @@ class Tasks {
|
|
|
385
454
|
const _response = yield core.fetcher({
|
|
386
455
|
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)}`),
|
|
387
456
|
method: "GET",
|
|
388
|
-
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "twelvelabs-js", "X-Fern-SDK-Version": "1.2.
|
|
457
|
+
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "twelvelabs-js", "X-Fern-SDK-Version": "1.2.5", "User-Agent": "twelvelabs-js/1.2.5", "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),
|
|
389
458
|
contentType: "application/json",
|
|
390
459
|
requestType: "json",
|
|
391
460
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 600000,
|
|
@@ -453,7 +522,7 @@ class Tasks {
|
|
|
453
522
|
const _response = yield core.fetcher({
|
|
454
523
|
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)}`),
|
|
455
524
|
method: "DELETE",
|
|
456
|
-
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "twelvelabs-js", "X-Fern-SDK-Version": "1.2.
|
|
525
|
+
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "twelvelabs-js", "X-Fern-SDK-Version": "1.2.5", "User-Agent": "twelvelabs-js/1.2.5", "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),
|
|
457
526
|
contentType: "application/json",
|
|
458
527
|
requestType: "json",
|
|
459
528
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 600000,
|
package/api/resources/analyzeAsync/resources/tasks/client/requests/CreateAsyncAnalyzeRequest.d.ts
CHANGED
|
@@ -91,6 +91,34 @@ import * as TwelvelabsApi from "../../../../../../index";
|
|
|
91
91
|
* type: "url",
|
|
92
92
|
* url: "https://example.com/video.mp4"
|
|
93
93
|
* },
|
|
94
|
+
* analysisMode: "time_based_metadata",
|
|
95
|
+
* responseFormat: {
|
|
96
|
+
* type: "segment_definitions",
|
|
97
|
+
* segmentDefinitions: [{
|
|
98
|
+
* id: "scenes",
|
|
99
|
+
* description: "Detect scenes and label them.",
|
|
100
|
+
* fields: [{
|
|
101
|
+
* name: "label",
|
|
102
|
+
* type: "string",
|
|
103
|
+
* description: "A short label for this scene."
|
|
104
|
+
* }, {
|
|
105
|
+
* name: "highlight_at",
|
|
106
|
+
* type: "timestamp",
|
|
107
|
+
* description: "The single most representative moment in this scene.",
|
|
108
|
+
* format: "seconds"
|
|
109
|
+
* }]
|
|
110
|
+
* }],
|
|
111
|
+
* segmentTimeFormat: "hh:mm:ss"
|
|
112
|
+
* }
|
|
113
|
+
* }
|
|
114
|
+
*
|
|
115
|
+
* @example
|
|
116
|
+
* {
|
|
117
|
+
* modelName: "pegasus1.5",
|
|
118
|
+
* video: {
|
|
119
|
+
* type: "url",
|
|
120
|
+
* url: "https://example.com/video.mp4"
|
|
121
|
+
* },
|
|
94
122
|
* promptV2: {
|
|
95
123
|
* inputText: "Is there a <@tiger-1> in the video?",
|
|
96
124
|
* mediaSources: [{
|
|
@@ -101,12 +129,53 @@ import * as TwelvelabsApi from "../../../../../../index";
|
|
|
101
129
|
* },
|
|
102
130
|
* maxTokens: 4096
|
|
103
131
|
* }
|
|
132
|
+
*
|
|
133
|
+
* @example
|
|
134
|
+
* {
|
|
135
|
+
* modelName: "pegasus1.5",
|
|
136
|
+
* video: {
|
|
137
|
+
* type: "url",
|
|
138
|
+
* url: "https://example.com/video.mp4"
|
|
139
|
+
* },
|
|
140
|
+
* prompt: "Identify intro, main content, and outro clips.",
|
|
141
|
+
* responseFormat: {
|
|
142
|
+
* type: "json_schema",
|
|
143
|
+
* jsonSchema: {
|
|
144
|
+
* "type": "object",
|
|
145
|
+
* "properties": {
|
|
146
|
+
* "clip_start": {
|
|
147
|
+
* "type": "timestamp",
|
|
148
|
+
* "format": "seconds"
|
|
149
|
+
* },
|
|
150
|
+
* "events": {
|
|
151
|
+
* "type": "array",
|
|
152
|
+
* "items": {
|
|
153
|
+
* "type": "object",
|
|
154
|
+
* "properties": {
|
|
155
|
+
* "intro_end": {
|
|
156
|
+
* "type": "timestamp",
|
|
157
|
+
* "format": "hh:mm:ss"
|
|
158
|
+
* },
|
|
159
|
+
* "outro_start": {
|
|
160
|
+
* "type": "timestamp",
|
|
161
|
+
* "format": "hh:mm:ss.fff"
|
|
162
|
+
* },
|
|
163
|
+
* "label": {
|
|
164
|
+
* "type": "string"
|
|
165
|
+
* }
|
|
166
|
+
* }
|
|
167
|
+
* }
|
|
168
|
+
* }
|
|
169
|
+
* }
|
|
170
|
+
* }
|
|
171
|
+
* }
|
|
172
|
+
* }
|
|
104
173
|
*/
|
|
105
174
|
export interface CreateAsyncAnalyzeRequest {
|
|
106
175
|
/**
|
|
107
176
|
* The video understanding model to use for analysis.
|
|
108
177
|
* - `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,
|
|
178
|
+
* - `pegasus1.5`: General analysis (prompt-based text generation) with video clipping, structured prompts with reference images, and video segmentation. See the [Pegasus](/v1.3/docs/concepts/models/pegasus#context-window) page for token limits.
|
|
110
179
|
*
|
|
111
180
|
* **Default:** `pegasus1.2`
|
|
112
181
|
*/
|
|
@@ -128,11 +197,7 @@ export interface CreateAsyncAnalyzeRequest {
|
|
|
128
197
|
/**
|
|
129
198
|
* 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.
|
|
130
199
|
*
|
|
131
|
-
*
|
|
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.
|
|
133
|
-
* - Your prompts can be instructive or descriptive, or you can also phrase them as questions.
|
|
134
|
-
* - The maximum length of a prompt is 2,000 tokens.
|
|
135
|
-
* </Note>
|
|
200
|
+
* Your prompts can be instructive or descriptive, or you can phrase them as questions. Pegasus 1.2 limits prompts to 2,000 tokens. For Pegasus 1.5, this text counts toward the [context window](/v1.3/docs/concepts/models/pegasus#context-window).
|
|
136
201
|
*
|
|
137
202
|
* **Examples**:
|
|
138
203
|
*
|
|
@@ -140,6 +205,11 @@ export interface CreateAsyncAnalyzeRequest {
|
|
|
140
205
|
* - 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.
|
|
141
206
|
*/
|
|
142
207
|
prompt?: string;
|
|
208
|
+
/**
|
|
209
|
+
* A structured prompt with `<@name>` placeholders for referencing images. Requires the `model_name` parameter set to `pegasus1.5`. Mutually exclusive with the `prompt` parameter.
|
|
210
|
+
*
|
|
211
|
+
* The prompt text and reference images count toward the [context window](/v1.3/docs/concepts/models/pegasus#context-window).
|
|
212
|
+
*/
|
|
143
213
|
promptV2?: TwelvelabsApi.AnalyzePromptV2;
|
|
144
214
|
/**
|
|
145
215
|
* The analysis approach for this task.
|
|
@@ -151,13 +221,13 @@ export interface CreateAsyncAnalyzeRequest {
|
|
|
151
221
|
analysisMode?: TwelvelabsApi.analyzeAsync.CreateAsyncAnalyzeRequestAnalysisMode;
|
|
152
222
|
temperature?: TwelvelabsApi.AnalyzeTemperature;
|
|
153
223
|
/**
|
|
154
|
-
* The maximum
|
|
224
|
+
* The maximum response length, in tokens. The allowed range depends on the model and analysis mode:
|
|
155
225
|
*
|
|
156
226
|
* | Model | Mode | Min | Max | Default |
|
|
157
227
|
* |-------|------|-----|-----|---------|
|
|
158
228
|
* | Pegasus 1.2 | — | 1 | 4,096 | 4096 |
|
|
159
|
-
* | Pegasus 1.5 | `general` | 512 |
|
|
160
|
-
* | Pegasus 1.5 | `time_based_metadata` | 2,048 |
|
|
229
|
+
* | Pegasus 1.5 | `general` | 512 | 98,304 | 4,096 |
|
|
230
|
+
* | Pegasus 1.5 | `time_based_metadata` | 2,048 | 98,304 | 32,768 |
|
|
161
231
|
*/
|
|
162
232
|
maxTokens?: number;
|
|
163
233
|
responseFormat?: TwelvelabsApi.AsyncResponseFormat;
|
|
@@ -180,6 +250,7 @@ export interface CreateAsyncAnalyzeRequest {
|
|
|
180
250
|
* - If omitted, defaults to `0`.
|
|
181
251
|
* - 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
252
|
* - Mutually exclusive with `response_format.segment_definitions[].time_ranges`.
|
|
253
|
+
* - Together with `end_time`, this parameter determines the billable video duration. If you omit both, billing uses the full video duration. For details, see the [Frequently asked questions](/v1.3/docs/resources/frequently-asked-questions#how-is-video-segmentation-priced) page.
|
|
183
254
|
* </Note>
|
|
184
255
|
*/
|
|
185
256
|
startTime?: number;
|
|
@@ -190,6 +261,7 @@ export interface CreateAsyncAnalyzeRequest {
|
|
|
190
261
|
* - If omitted, defaults to the video duration.
|
|
191
262
|
* - 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
263
|
* - Mutually exclusive with `response_format.segment_definitions[].time_ranges`.
|
|
264
|
+
* - Together with `start_time`, this parameter determines the billable video duration. If you omit both, billing uses the full video duration. For details, see the [Frequently asked questions](/v1.3/docs/resources/frequently-asked-questions#how-is-video-segmentation-priced) page.
|
|
193
265
|
* </Note>
|
|
194
266
|
*/
|
|
195
267
|
endTime?: number;
|
package/api/resources/analyzeAsync/resources/tasks/types/CreateAsyncAnalyzeRequestModelName.d.ts
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
/**
|
|
5
5
|
* The video understanding model to use for analysis.
|
|
6
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,
|
|
7
|
+
* - `pegasus1.5`: General analysis (prompt-based text generation) with video clipping, structured prompts with reference images, and video segmentation. See the [Pegasus](/v1.3/docs/concepts/models/pegasus#context-window) page for token limits.
|
|
8
8
|
*
|
|
9
9
|
* **Default:** `pegasus1.2`
|
|
10
10
|
*/
|
|
@@ -115,6 +115,50 @@ export declare class Assets {
|
|
|
115
115
|
*/
|
|
116
116
|
delete(assetId: string, request?: TwelvelabsApi.AssetsDeleteRequest, requestOptions?: Assets.RequestOptions): core.HttpResponsePromise<void>;
|
|
117
117
|
private __delete;
|
|
118
|
+
/**
|
|
119
|
+
* This method deletes the user-defined metadata of the specified asset.
|
|
120
|
+
*
|
|
121
|
+
* This action cannot be undone.
|
|
122
|
+
*
|
|
123
|
+
* @param {string} assetId - The unique identifier of the asset whose user-defined metadata to delete.
|
|
124
|
+
* @param {Assets.RequestOptions} requestOptions - Request-specific configuration.
|
|
125
|
+
*
|
|
126
|
+
* @throws {@link TwelvelabsApi.BadRequestError}
|
|
127
|
+
* @throws {@link TwelvelabsApi.NotFoundError}
|
|
128
|
+
*
|
|
129
|
+
* @example
|
|
130
|
+
* await client.assets.deleteUserMetadata("6298d673f1090f1100476d4c")
|
|
131
|
+
*/
|
|
132
|
+
deleteUserMetadata(assetId: string, requestOptions?: Assets.RequestOptions): core.HttpResponsePromise<void>;
|
|
133
|
+
private __deleteUserMetadata;
|
|
134
|
+
/**
|
|
135
|
+
* This method updates the user-defined metadata of the specified asset. The platform merges your changes with the existing metadata:
|
|
136
|
+
* - A key with a value creates or replaces that key.
|
|
137
|
+
* - A key set to `null` deletes that key.
|
|
138
|
+
* - A key set to an empty string (`""`) is ignored.
|
|
139
|
+
* - A key you omit from the request keeps its current value.
|
|
140
|
+
*
|
|
141
|
+
* To replace all metadata, first delete it using [`DELETE`](/v1.3/api-reference/upload-content/direct-uploads/delete-asset-user-metadata) method of the `/assets/{asset_id}/user-metadata` endpoint, then use this method to set the new values.
|
|
142
|
+
*
|
|
143
|
+
* @param {string} assetId - The unique identifier of the asset whose user-defined metadata to update.
|
|
144
|
+
* @param {TwelvelabsApi.AssetsUpdateUserMetadataRequest} request
|
|
145
|
+
* @param {Assets.RequestOptions} requestOptions - Request-specific configuration.
|
|
146
|
+
*
|
|
147
|
+
* @throws {@link TwelvelabsApi.BadRequestError}
|
|
148
|
+
* @throws {@link TwelvelabsApi.NotFoundError}
|
|
149
|
+
*
|
|
150
|
+
* @example
|
|
151
|
+
* await client.assets.updateUserMetadata("6298d673f1090f1100476d4c", {
|
|
152
|
+
* userMetadata: {
|
|
153
|
+
* "category": "recentlyAdded",
|
|
154
|
+
* "batchNumber": 5,
|
|
155
|
+
* "rating": 9.3,
|
|
156
|
+
* "needsReview": true
|
|
157
|
+
* }
|
|
158
|
+
* })
|
|
159
|
+
*/
|
|
160
|
+
updateUserMetadata(assetId: string, request: TwelvelabsApi.AssetsUpdateUserMetadataRequest, requestOptions?: Assets.RequestOptions): core.HttpResponsePromise<void>;
|
|
161
|
+
private __updateUserMetadata;
|
|
118
162
|
protected _getCustomAuthorizationHeaders(): Promise<{
|
|
119
163
|
"x-api-key": string;
|
|
120
164
|
}>;
|