twelvelabs-js 1.2.0 → 1.2.2
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 +34 -50
- package/Client.js +37 -165
- package/README.md +206 -166
- package/api/client/requests/AnalyzeRequest.d.ts +7 -24
- package/api/client/requests/AnalyzeStreamRequest.d.ts +7 -24
- package/api/client/requests/index.d.ts +0 -2
- package/api/errors/ConflictError.d.ts +9 -0
- package/{dist/serialization/client/requests/GistRequest.js → api/errors/ConflictError.js} +14 -7
- package/api/errors/index.d.ts +1 -0
- package/api/errors/index.js +1 -0
- package/api/resources/analyzeAsync/client/Client.d.ts +20 -0
- package/api/resources/analyzeAsync/client/Client.js +17 -0
- package/api/resources/analyzeAsync/client/index.d.ts +1 -0
- package/api/resources/analyzeAsync/client/index.js +2 -0
- package/api/resources/analyzeAsync/index.d.ts +2 -0
- package/api/resources/analyzeAsync/index.js +18 -0
- package/api/resources/analyzeAsync/resources/index.d.ts +3 -0
- package/{dist/serialization/resources/search/types/SearchCreateRequestSortOption.js → api/resources/analyzeAsync/resources/index.js} +7 -6
- package/api/resources/analyzeAsync/resources/tasks/client/Client.d.ts +131 -0
- package/api/resources/analyzeAsync/resources/tasks/client/Client.js +403 -0
- package/api/resources/analyzeAsync/resources/tasks/client/index.d.ts +1 -0
- package/api/resources/analyzeAsync/resources/tasks/client/index.js +17 -0
- package/api/resources/analyzeAsync/resources/tasks/client/requests/CreateAsyncAnalyzeRequest.d.ts +23 -0
- package/api/resources/analyzeAsync/resources/tasks/client/requests/TasksListRequest.d.ts +32 -0
- package/api/resources/analyzeAsync/resources/tasks/client/requests/index.d.ts +2 -0
- package/api/resources/analyzeAsync/resources/tasks/client/requests/index.js +2 -0
- package/api/resources/analyzeAsync/resources/tasks/index.d.ts +2 -0
- package/api/resources/analyzeAsync/resources/tasks/index.js +18 -0
- package/api/resources/analyzeAsync/resources/tasks/types/TasksListResponse.d.ts +9 -0
- package/api/resources/analyzeAsync/resources/tasks/types/index.d.ts +1 -0
- package/api/resources/analyzeAsync/resources/tasks/types/index.js +17 -0
- package/api/resources/assets/client/Client.js +4 -4
- package/api/resources/embed/client/Client.js +1 -4
- package/api/resources/embed/client/requests/EmbedCreateRequest.d.ts +1 -17
- package/api/resources/embed/resources/tasks/client/Client.js +4 -4
- package/api/resources/embed/resources/tasks/client/requests/TasksCreateRequest.d.ts +1 -2
- package/api/resources/embed/resources/tasks/client/requests/TasksRetrieveRequest.d.ts +1 -5
- package/api/resources/embed/resources/v2/client/Client.d.ts +64 -5
- package/api/resources/embed/resources/v2/client/Client.js +65 -6
- package/api/resources/embed/resources/v2/client/requests/CreateEmbeddingsRequest.d.ts +85 -2
- package/api/resources/embed/resources/v2/resources/tasks/client/Client.d.ts +14 -4
- package/api/resources/embed/resources/v2/resources/tasks/client/Client.js +17 -7
- package/api/resources/embed/resources/v2/resources/tasks/client/requests/CreateAsyncEmbeddingRequest.d.ts +15 -1
- package/api/resources/embed/resources/v2/resources/tasks/types/CreateAsyncEmbeddingRequestModelName.d.ts +1 -1
- package/api/resources/embed/resources/v2/types/CreateEmbeddingsRequestInputType.d.ts +4 -2
- package/api/resources/embed/resources/v2/types/CreateEmbeddingsRequestInputType.js +1 -0
- package/api/resources/embed/resources/v2/types/CreateEmbeddingsRequestModelName.d.ts +1 -1
- package/api/resources/entityCollections/client/Client.js +5 -5
- package/api/resources/entityCollections/resources/entities/client/Client.js +8 -8
- package/api/resources/index.d.ts +1 -0
- package/api/resources/index.js +2 -1
- package/api/resources/indexes/client/Client.js +5 -5
- package/api/resources/indexes/resources/indexedAssets/client/Client.js +5 -5
- package/api/resources/indexes/resources/indexedAssets/client/requests/IndexedAssetsRetrieveRequest.d.ts +1 -5
- package/api/resources/indexes/resources/videos/client/Client.d.ts +1 -1
- package/api/resources/indexes/resources/videos/client/Client.js +5 -5
- package/api/resources/indexes/resources/videos/client/requests/VideosRetrieveRequest.d.ts +1 -5
- package/api/resources/indexes/types/IndexesCreateRequestModelsItem.d.ts +1 -2
- package/api/resources/multipartUpload/client/Client.js +5 -5
- package/api/resources/search/client/Client.d.ts +4 -9
- package/api/resources/search/client/Client.js +6 -22
- package/api/resources/search/client/requests/SearchCreateRequest.d.ts +14 -35
- package/api/resources/search/types/index.d.ts +0 -1
- package/api/resources/search/types/index.js +0 -1
- package/api/resources/tasks/client/Client.js +4 -4
- package/api/resources/tasks/resources/transfers/client/Client.js +3 -3
- package/api/types/AnalyzeMaxTokens.d.ts +9 -0
- package/api/types/AnalyzeTaskError.d.ts +10 -0
- package/api/types/AnalyzeTaskResponse.d.ts +22 -0
- package/api/types/AnalyzeTaskResult.d.ts +15 -0
- package/api/types/AnalyzeTaskResultUsage.d.ts +12 -0
- package/api/types/AnalyzeTaskStatus.d.ts +14 -0
- package/api/types/AnalyzeTaskStatus.js +13 -0
- package/api/types/AnalyzeTaskWebhookInfo.d.ts +16 -0
- package/api/types/AnalyzeTemperature.d.ts +9 -0
- package/api/types/AnalyzeTextPrompt.d.ts +18 -0
- package/api/types/AudioInputRequest.d.ts +14 -2
- package/api/types/AudioInputRequestEmbeddingTypeItem.d.ts +8 -0
- package/api/types/AudioInputRequestEmbeddingTypeItem.js +10 -0
- package/api/types/ChunkInfo.d.ts +1 -1
- package/api/types/CompletedChunk.d.ts +1 -1
- package/api/types/CreateAnalyzeTaskResponse.d.ts +12 -0
- package/api/types/CreateAssetUploadResponse.d.ts +1 -1
- package/api/types/EmbeddingData.d.ts +7 -6
- package/api/types/EmbeddingDataEmbeddingOption.d.ts +2 -1
- package/api/types/EmbeddingDataEmbeddingOption.js +1 -0
- package/api/types/EmbeddingMediaMetadata.d.ts +5 -2
- package/api/types/EmbeddingMultiInputMetadata.d.ts +8 -0
- package/api/types/EmbeddingMultiInputMetadata.js +5 -0
- package/api/types/ExpiresAt.d.ts +1 -1
- package/api/types/GeneratedTextData.d.ts +7 -0
- package/api/types/GeneratedTextData.js +5 -0
- package/api/types/ImageInputRequest.d.ts +1 -1
- package/api/types/ImportLog.d.ts +1 -1
- package/api/types/ImportLogVideoStatus.d.ts +1 -1
- package/api/types/MediaSource.d.ts +1 -1
- package/api/types/MultiInputMediaSource.d.ts +27 -0
- package/api/types/MultiInputMediaSource.js +5 -0
- package/api/types/MultiInputMediaSourceMediaType.d.ts +12 -0
- package/api/types/MultiInputMediaSourceMediaType.js +9 -0
- package/api/types/MultiInputRequest.d.ts +20 -0
- package/api/types/MultiInputRequest.js +5 -0
- package/api/types/NonStreamAnalyzeResponse.d.ts +1 -2
- package/api/types/One.d.ts +10 -0
- package/api/types/One.js +5 -0
- package/api/types/Rank.d.ts +0 -4
- package/api/types/ResponseFormat.d.ts +1 -1
- package/api/types/SearchItem.d.ts +0 -2
- package/api/types/SearchItemClipsItem.d.ts +0 -2
- package/api/types/SummarizeChapterResult.d.ts +2 -0
- package/api/types/SummarizeChapterResultSummarizeType.d.ts +10 -0
- package/api/types/SummarizeChapterResultSummarizeType.js +9 -0
- package/api/types/SummarizeHighlightResult.d.ts +2 -0
- package/api/types/SummarizeHighlightResultSummarizeType.d.ts +10 -0
- package/{dist/api/types/GistRequestTypesItem.js → api/types/SummarizeHighlightResultSummarizeType.js} +3 -5
- package/api/types/SummarizeSummaryResult.d.ts +2 -0
- package/api/types/SummarizeSummaryResultSummarizeType.d.ts +10 -0
- package/api/types/SummarizeSummaryResultSummarizeType.js +9 -0
- package/api/types/TextImageInputRequest.d.ts +1 -1
- package/api/types/TextInputRequest.d.ts +1 -1
- package/api/types/Two.d.ts +10 -0
- package/api/types/Two.js +5 -0
- package/api/types/Url.d.ts +14 -0
- package/api/types/Url.js +5 -0
- package/api/types/VideoContext.d.ts +19 -0
- package/api/types/VideoContext.js +5 -0
- package/api/types/VideoInputRequest.d.ts +14 -2
- package/api/types/VideoInputRequestEmbeddingTypeItem.d.ts +8 -0
- package/api/types/VideoInputRequestEmbeddingTypeItem.js +10 -0
- package/api/types/index.d.ts +24 -6
- package/api/types/index.js +24 -6
- package/dist/Client.d.ts +34 -50
- package/dist/Client.js +37 -165
- package/dist/api/client/requests/AnalyzeRequest.d.ts +7 -24
- package/dist/api/client/requests/AnalyzeStreamRequest.d.ts +7 -24
- package/dist/api/client/requests/index.d.ts +0 -2
- package/dist/api/errors/ConflictError.d.ts +9 -0
- package/dist/api/errors/ConflictError.js +52 -0
- package/dist/api/errors/index.d.ts +1 -0
- package/dist/api/errors/index.js +1 -0
- package/dist/api/resources/analyzeAsync/client/Client.d.ts +20 -0
- package/dist/api/resources/analyzeAsync/client/Client.js +17 -0
- package/dist/api/resources/analyzeAsync/client/index.d.ts +1 -0
- package/dist/api/resources/analyzeAsync/client/index.js +2 -0
- package/dist/api/resources/analyzeAsync/index.d.ts +2 -0
- package/dist/api/resources/analyzeAsync/index.js +18 -0
- package/dist/api/resources/analyzeAsync/resources/index.d.ts +3 -0
- package/dist/api/resources/analyzeAsync/resources/index.js +42 -0
- package/dist/api/resources/analyzeAsync/resources/tasks/client/Client.d.ts +131 -0
- package/dist/api/resources/analyzeAsync/resources/tasks/client/Client.js +403 -0
- package/dist/api/resources/analyzeAsync/resources/tasks/client/index.d.ts +1 -0
- package/dist/api/resources/analyzeAsync/resources/tasks/client/index.js +17 -0
- package/dist/api/resources/analyzeAsync/resources/tasks/client/requests/CreateAsyncAnalyzeRequest.d.ts +23 -0
- package/dist/api/resources/analyzeAsync/resources/tasks/client/requests/CreateAsyncAnalyzeRequest.js +5 -0
- package/dist/api/resources/analyzeAsync/resources/tasks/client/requests/TasksListRequest.d.ts +32 -0
- package/dist/api/resources/analyzeAsync/resources/tasks/client/requests/TasksListRequest.js +5 -0
- package/dist/api/resources/analyzeAsync/resources/tasks/client/requests/index.d.ts +2 -0
- package/dist/api/resources/analyzeAsync/resources/tasks/client/requests/index.js +2 -0
- package/dist/api/resources/analyzeAsync/resources/tasks/index.d.ts +2 -0
- package/dist/api/resources/analyzeAsync/resources/tasks/index.js +18 -0
- package/dist/api/resources/analyzeAsync/resources/tasks/types/TasksListResponse.d.ts +9 -0
- package/dist/api/resources/analyzeAsync/resources/tasks/types/TasksListResponse.js +5 -0
- package/dist/api/resources/analyzeAsync/resources/tasks/types/index.d.ts +1 -0
- package/dist/api/resources/analyzeAsync/resources/tasks/types/index.js +17 -0
- package/dist/api/resources/assets/client/Client.js +4 -4
- package/dist/api/resources/embed/client/Client.js +1 -4
- package/dist/api/resources/embed/client/requests/EmbedCreateRequest.d.ts +1 -17
- package/dist/api/resources/embed/resources/tasks/client/Client.js +4 -4
- package/dist/api/resources/embed/resources/tasks/client/requests/TasksCreateRequest.d.ts +1 -2
- package/dist/api/resources/embed/resources/tasks/client/requests/TasksRetrieveRequest.d.ts +1 -5
- package/dist/api/resources/embed/resources/v2/client/Client.d.ts +64 -5
- package/dist/api/resources/embed/resources/v2/client/Client.js +65 -6
- package/dist/api/resources/embed/resources/v2/client/requests/CreateEmbeddingsRequest.d.ts +85 -2
- package/dist/api/resources/embed/resources/v2/resources/tasks/client/Client.d.ts +14 -4
- package/dist/api/resources/embed/resources/v2/resources/tasks/client/Client.js +17 -7
- package/dist/api/resources/embed/resources/v2/resources/tasks/client/requests/CreateAsyncEmbeddingRequest.d.ts +15 -1
- package/dist/api/resources/embed/resources/v2/resources/tasks/types/CreateAsyncEmbeddingRequestModelName.d.ts +1 -1
- package/dist/api/resources/embed/resources/v2/types/CreateEmbeddingsRequestInputType.d.ts +4 -2
- package/dist/api/resources/embed/resources/v2/types/CreateEmbeddingsRequestInputType.js +1 -0
- package/dist/api/resources/embed/resources/v2/types/CreateEmbeddingsRequestModelName.d.ts +1 -1
- package/dist/api/resources/entityCollections/client/Client.js +5 -5
- package/dist/api/resources/entityCollections/resources/entities/client/Client.js +8 -8
- package/dist/api/resources/index.d.ts +1 -0
- package/dist/api/resources/index.js +2 -1
- package/dist/api/resources/indexes/client/Client.js +5 -5
- package/dist/api/resources/indexes/resources/indexedAssets/client/Client.js +5 -5
- package/dist/api/resources/indexes/resources/indexedAssets/client/requests/IndexedAssetsRetrieveRequest.d.ts +1 -5
- package/dist/api/resources/indexes/resources/videos/client/Client.d.ts +1 -1
- package/dist/api/resources/indexes/resources/videos/client/Client.js +5 -5
- package/dist/api/resources/indexes/resources/videos/client/requests/VideosRetrieveRequest.d.ts +1 -5
- package/dist/api/resources/indexes/types/IndexesCreateRequestModelsItem.d.ts +1 -2
- package/dist/api/resources/multipartUpload/client/Client.js +5 -5
- package/dist/api/resources/search/client/Client.d.ts +4 -9
- package/dist/api/resources/search/client/Client.js +6 -22
- package/dist/api/resources/search/client/requests/SearchCreateRequest.d.ts +14 -35
- package/dist/api/resources/search/types/index.d.ts +0 -1
- package/dist/api/resources/search/types/index.js +0 -1
- package/dist/api/resources/tasks/client/Client.js +4 -4
- package/dist/api/resources/tasks/resources/transfers/client/Client.js +3 -3
- package/dist/api/types/AnalyzeMaxTokens.d.ts +9 -0
- package/dist/api/types/AnalyzeMaxTokens.js +5 -0
- package/dist/api/types/AnalyzeTaskError.d.ts +10 -0
- package/dist/api/types/AnalyzeTaskError.js +5 -0
- package/dist/api/types/AnalyzeTaskResponse.d.ts +22 -0
- package/dist/api/types/AnalyzeTaskResponse.js +5 -0
- package/dist/api/types/AnalyzeTaskResult.d.ts +15 -0
- package/dist/api/types/AnalyzeTaskResult.js +5 -0
- package/dist/api/types/AnalyzeTaskResultUsage.d.ts +12 -0
- package/dist/api/types/AnalyzeTaskResultUsage.js +5 -0
- package/dist/api/types/AnalyzeTaskStatus.d.ts +14 -0
- package/dist/api/types/AnalyzeTaskStatus.js +13 -0
- package/dist/api/types/AnalyzeTaskWebhookInfo.d.ts +16 -0
- package/dist/api/types/AnalyzeTaskWebhookInfo.js +5 -0
- package/dist/api/types/AnalyzeTemperature.d.ts +9 -0
- package/dist/api/types/AnalyzeTemperature.js +5 -0
- package/dist/api/types/AnalyzeTextPrompt.d.ts +18 -0
- package/dist/api/types/AnalyzeTextPrompt.js +5 -0
- package/dist/api/types/AudioInputRequest.d.ts +14 -2
- package/dist/api/types/AudioInputRequestEmbeddingTypeItem.d.ts +8 -0
- package/dist/api/types/AudioInputRequestEmbeddingTypeItem.js +10 -0
- package/dist/api/types/ChunkInfo.d.ts +1 -1
- package/dist/api/types/CompletedChunk.d.ts +1 -1
- package/dist/api/types/CreateAnalyzeTaskResponse.d.ts +12 -0
- package/dist/api/types/CreateAnalyzeTaskResponse.js +5 -0
- package/dist/api/types/CreateAssetUploadResponse.d.ts +1 -1
- package/dist/api/types/EmbeddingData.d.ts +7 -6
- package/dist/api/types/EmbeddingDataEmbeddingOption.d.ts +2 -1
- package/dist/api/types/EmbeddingDataEmbeddingOption.js +1 -0
- package/dist/api/types/EmbeddingMediaMetadata.d.ts +5 -2
- package/dist/api/types/EmbeddingMultiInputMetadata.d.ts +8 -0
- package/dist/api/types/EmbeddingMultiInputMetadata.js +5 -0
- package/dist/api/types/ExpiresAt.d.ts +1 -1
- package/dist/api/types/GeneratedTextData.d.ts +7 -0
- package/dist/api/types/GeneratedTextData.js +5 -0
- package/dist/api/types/ImageInputRequest.d.ts +1 -1
- package/dist/api/types/ImportLog.d.ts +1 -1
- package/dist/api/types/ImportLogVideoStatus.d.ts +1 -1
- package/dist/api/types/MediaSource.d.ts +1 -1
- package/dist/api/types/MultiInputMediaSource.d.ts +27 -0
- package/dist/api/types/MultiInputMediaSource.js +5 -0
- package/dist/api/types/MultiInputMediaSourceMediaType.d.ts +12 -0
- package/dist/api/types/MultiInputMediaSourceMediaType.js +9 -0
- package/dist/api/types/MultiInputRequest.d.ts +20 -0
- package/dist/api/types/MultiInputRequest.js +5 -0
- package/dist/api/types/NonStreamAnalyzeResponse.d.ts +1 -2
- package/dist/api/types/One.d.ts +10 -0
- package/dist/api/types/One.js +5 -0
- package/dist/api/types/Rank.d.ts +0 -4
- package/dist/api/types/ResponseFormat.d.ts +1 -1
- package/dist/api/types/SearchItem.d.ts +0 -2
- package/dist/api/types/SearchItemClipsItem.d.ts +0 -2
- package/dist/api/types/SummarizeChapterResult.d.ts +2 -0
- package/dist/api/types/SummarizeChapterResultSummarizeType.d.ts +10 -0
- package/dist/api/types/SummarizeChapterResultSummarizeType.js +9 -0
- package/dist/api/types/SummarizeHighlightResult.d.ts +2 -0
- package/dist/api/types/SummarizeHighlightResultSummarizeType.d.ts +10 -0
- package/{api/types/GistRequestTypesItem.js → dist/api/types/SummarizeHighlightResultSummarizeType.js} +3 -5
- package/dist/api/types/SummarizeSummaryResult.d.ts +2 -0
- package/dist/api/types/SummarizeSummaryResultSummarizeType.d.ts +10 -0
- package/dist/api/types/SummarizeSummaryResultSummarizeType.js +9 -0
- package/dist/api/types/TextImageInputRequest.d.ts +1 -1
- package/dist/api/types/TextInputRequest.d.ts +1 -1
- package/dist/api/types/Two.d.ts +10 -0
- package/dist/api/types/Two.js +5 -0
- package/dist/api/types/Url.d.ts +14 -0
- package/dist/api/types/Url.js +5 -0
- package/dist/api/types/VideoContext.d.ts +19 -0
- package/dist/api/types/VideoContext.js +5 -0
- package/dist/api/types/VideoInputRequest.d.ts +14 -2
- package/dist/api/types/VideoInputRequestEmbeddingTypeItem.d.ts +8 -0
- package/dist/api/types/VideoInputRequestEmbeddingTypeItem.js +10 -0
- package/dist/api/types/index.d.ts +24 -6
- package/dist/api/types/index.js +24 -6
- package/dist/serialization/client/requests/AnalyzeRequest.d.ts +9 -4
- package/dist/serialization/client/requests/AnalyzeRequest.js +9 -4
- package/dist/serialization/client/requests/AnalyzeStreamRequest.d.ts +9 -4
- package/dist/serialization/client/requests/AnalyzeStreamRequest.js +9 -4
- package/dist/serialization/client/requests/index.d.ts +0 -2
- package/dist/serialization/client/requests/index.js +1 -5
- package/dist/serialization/resources/analyzeAsync/index.d.ts +1 -0
- package/dist/serialization/resources/analyzeAsync/index.js +17 -0
- package/dist/serialization/resources/analyzeAsync/resources/index.d.ts +3 -0
- package/dist/serialization/resources/analyzeAsync/resources/index.js +42 -0
- package/dist/serialization/resources/analyzeAsync/resources/tasks/client/index.d.ts +1 -0
- package/dist/serialization/resources/analyzeAsync/resources/tasks/client/index.js +17 -0
- package/dist/serialization/resources/analyzeAsync/resources/tasks/client/requests/CreateAsyncAnalyzeRequest.d.ts +21 -0
- package/{serialization/client/requests/SummarizeRequest.js → dist/serialization/resources/analyzeAsync/resources/tasks/client/requests/CreateAsyncAnalyzeRequest.js} +12 -9
- package/dist/serialization/resources/analyzeAsync/resources/tasks/client/requests/index.d.ts +1 -0
- package/dist/serialization/resources/analyzeAsync/resources/tasks/client/requests/index.js +5 -0
- package/dist/serialization/resources/analyzeAsync/resources/tasks/index.d.ts +2 -0
- package/dist/serialization/resources/analyzeAsync/resources/tasks/index.js +18 -0
- package/dist/serialization/resources/analyzeAsync/resources/tasks/types/TasksListResponse.d.ts +15 -0
- package/{serialization/client/requests/GistRequest.js → dist/serialization/resources/analyzeAsync/resources/tasks/types/TasksListResponse.js} +7 -6
- package/dist/serialization/resources/analyzeAsync/resources/tasks/types/index.d.ts +1 -0
- package/dist/serialization/resources/analyzeAsync/resources/tasks/types/index.js +17 -0
- package/dist/serialization/resources/embed/resources/v2/client/requests/CreateEmbeddingsRequest.d.ts +2 -0
- package/dist/serialization/resources/embed/resources/v2/client/requests/CreateEmbeddingsRequest.js +2 -0
- package/dist/serialization/resources/embed/resources/v2/types/CreateEmbeddingsRequestInputType.d.ts +1 -1
- package/dist/serialization/resources/embed/resources/v2/types/CreateEmbeddingsRequestInputType.js +1 -1
- package/dist/serialization/resources/index.d.ts +1 -0
- package/dist/serialization/resources/index.js +2 -1
- package/dist/serialization/resources/search/types/index.d.ts +0 -1
- package/dist/serialization/resources/search/types/index.js +0 -1
- package/{serialization/types/ScoreSearchTerms.d.ts → dist/serialization/types/AnalyzeMaxTokens.d.ts} +2 -2
- package/dist/serialization/types/{ScoreSearchTerms.js → AnalyzeMaxTokens.js} +2 -2
- package/dist/serialization/types/AnalyzeTaskError.d.ts +12 -0
- package/dist/serialization/types/AnalyzeTaskError.js +43 -0
- package/dist/serialization/types/AnalyzeTaskResponse.d.ts +22 -0
- package/dist/serialization/types/{SummarizeResponse.js → AnalyzeTaskResponse.js} +13 -13
- package/dist/serialization/types/AnalyzeTaskResult.d.ts +18 -0
- package/{serialization/types/Gist.js → dist/serialization/types/AnalyzeTaskResult.js} +9 -8
- package/dist/serialization/types/AnalyzeTaskResultUsage.d.ts +13 -0
- package/dist/serialization/types/AnalyzeTaskResultUsage.js +44 -0
- package/dist/serialization/types/AnalyzeTaskStatus.d.ts +10 -0
- package/dist/serialization/types/AnalyzeTaskStatus.js +41 -0
- package/dist/serialization/types/AnalyzeTaskWebhookInfo.d.ts +15 -0
- package/dist/serialization/types/AnalyzeTaskWebhookInfo.js +46 -0
- package/dist/serialization/types/AnalyzeTemperature.d.ts +10 -0
- package/dist/serialization/types/AnalyzeTemperature.js +41 -0
- package/dist/serialization/types/{Confidence.d.ts → AnalyzeTextPrompt.d.ts} +2 -2
- package/{serialization/types/ScoreSearchTerms.js → dist/serialization/types/AnalyzeTextPrompt.js} +2 -2
- package/dist/serialization/types/AudioInputRequest.d.ts +2 -0
- package/dist/serialization/types/AudioInputRequest.js +2 -0
- package/dist/serialization/types/AudioInputRequestEmbeddingTypeItem.d.ts +10 -0
- package/dist/serialization/types/AudioInputRequestEmbeddingTypeItem.js +41 -0
- package/dist/serialization/types/CreateAnalyzeTaskResponse.d.ts +14 -0
- package/dist/serialization/types/CreateAnalyzeTaskResponse.js +45 -0
- package/dist/serialization/types/EmbeddingDataEmbeddingOption.d.ts +1 -1
- package/dist/serialization/types/EmbeddingDataEmbeddingOption.js +1 -1
- package/dist/serialization/types/EmbeddingMediaMetadata.d.ts +5 -1
- package/dist/serialization/types/EmbeddingMediaMetadata.js +2 -0
- package/dist/serialization/types/EmbeddingMultiInputMetadata.d.ts +11 -0
- package/dist/serialization/types/EmbeddingMultiInputMetadata.js +41 -0
- package/{serialization/types/Confidence.d.ts → dist/serialization/types/GeneratedTextData.d.ts} +2 -2
- package/dist/serialization/types/{Confidence.js → GeneratedTextData.js} +2 -2
- package/dist/serialization/types/MultiInputMediaSource.d.ts +17 -0
- package/dist/serialization/types/MultiInputMediaSource.js +48 -0
- package/dist/serialization/types/MultiInputMediaSourceMediaType.d.ts +10 -0
- package/dist/serialization/types/{GistRequestTypesItem.js → MultiInputMediaSourceMediaType.js} +2 -2
- package/dist/serialization/types/MultiInputRequest.d.ts +14 -0
- package/dist/serialization/types/MultiInputRequest.js +45 -0
- package/dist/serialization/types/NonStreamAnalyzeResponse.d.ts +2 -1
- package/dist/serialization/types/NonStreamAnalyzeResponse.js +2 -1
- package/dist/serialization/types/One.d.ts +12 -0
- package/dist/serialization/types/One.js +43 -0
- package/dist/serialization/types/SearchItem.d.ts +0 -4
- package/dist/serialization/types/SearchItem.js +0 -4
- package/dist/serialization/types/SearchItemClipsItem.d.ts +0 -4
- package/dist/serialization/types/SearchItemClipsItem.js +0 -4
- package/dist/serialization/types/SummarizeChapterResult.d.ts +2 -0
- package/dist/serialization/types/SummarizeChapterResult.js +2 -0
- package/dist/serialization/types/SummarizeChapterResultSummarizeType.d.ts +10 -0
- package/dist/serialization/types/SummarizeChapterResultSummarizeType.js +41 -0
- package/dist/serialization/types/SummarizeHighlightResult.d.ts +2 -0
- package/dist/serialization/types/SummarizeHighlightResult.js +2 -0
- package/dist/serialization/types/SummarizeHighlightResultSummarizeType.d.ts +10 -0
- package/dist/serialization/types/SummarizeHighlightResultSummarizeType.js +41 -0
- package/dist/serialization/types/SummarizeSummaryResult.d.ts +2 -0
- package/dist/serialization/types/SummarizeSummaryResult.js +2 -0
- package/dist/serialization/types/SummarizeSummaryResultSummarizeType.d.ts +10 -0
- package/dist/serialization/types/SummarizeSummaryResultSummarizeType.js +41 -0
- package/dist/serialization/types/Two.d.ts +12 -0
- package/dist/serialization/types/Two.js +43 -0
- package/dist/serialization/types/Url.d.ts +12 -0
- package/dist/serialization/types/Url.js +43 -0
- package/dist/serialization/types/VideoContext.d.ts +22 -0
- package/dist/serialization/types/VideoContext.js +53 -0
- package/dist/serialization/types/VideoInputRequest.d.ts +2 -0
- package/dist/serialization/types/VideoInputRequest.js +2 -0
- package/dist/serialization/types/VideoInputRequestEmbeddingTypeItem.d.ts +10 -0
- package/dist/serialization/types/VideoInputRequestEmbeddingTypeItem.js +41 -0
- package/dist/serialization/types/index.d.ts +24 -6
- package/dist/serialization/types/index.js +24 -6
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/dist/wrapper/TwelveLabs.d.ts +1 -2
- package/dist/wrapper/TwelveLabs.js +1 -2
- package/dist/wrapper/resources/SearchWrapper.d.ts +33 -3
- package/dist/wrapper/resources/SearchWrapper.js +150 -3
- package/package.json +1 -1
- package/reference.md +328 -22
- package/serialization/client/requests/AnalyzeRequest.d.ts +9 -4
- package/serialization/client/requests/AnalyzeRequest.js +9 -4
- package/serialization/client/requests/AnalyzeStreamRequest.d.ts +9 -4
- package/serialization/client/requests/AnalyzeStreamRequest.js +9 -4
- package/serialization/client/requests/index.d.ts +0 -2
- package/serialization/client/requests/index.js +1 -5
- package/serialization/resources/analyzeAsync/index.d.ts +1 -0
- package/serialization/resources/analyzeAsync/index.js +17 -0
- package/serialization/resources/analyzeAsync/resources/index.d.ts +3 -0
- package/serialization/resources/analyzeAsync/resources/index.js +42 -0
- package/serialization/resources/analyzeAsync/resources/tasks/client/index.d.ts +1 -0
- package/serialization/resources/analyzeAsync/resources/tasks/client/index.js +17 -0
- package/serialization/resources/analyzeAsync/resources/tasks/client/requests/CreateAsyncAnalyzeRequest.d.ts +21 -0
- package/{dist/serialization/client/requests/SummarizeRequest.js → serialization/resources/analyzeAsync/resources/tasks/client/requests/CreateAsyncAnalyzeRequest.js} +12 -9
- package/serialization/resources/analyzeAsync/resources/tasks/client/requests/index.d.ts +1 -0
- package/serialization/resources/analyzeAsync/resources/tasks/client/requests/index.js +5 -0
- package/serialization/resources/analyzeAsync/resources/tasks/index.d.ts +2 -0
- package/serialization/resources/analyzeAsync/resources/tasks/index.js +18 -0
- package/serialization/resources/analyzeAsync/resources/tasks/types/TasksListResponse.d.ts +15 -0
- package/serialization/resources/analyzeAsync/resources/tasks/types/TasksListResponse.js +46 -0
- package/serialization/resources/analyzeAsync/resources/tasks/types/index.d.ts +1 -0
- package/serialization/resources/analyzeAsync/resources/tasks/types/index.js +17 -0
- package/serialization/resources/embed/resources/v2/client/requests/CreateEmbeddingsRequest.d.ts +2 -0
- package/serialization/resources/embed/resources/v2/client/requests/CreateEmbeddingsRequest.js +2 -0
- package/serialization/resources/embed/resources/v2/types/CreateEmbeddingsRequestInputType.d.ts +1 -1
- package/serialization/resources/embed/resources/v2/types/CreateEmbeddingsRequestInputType.js +1 -1
- package/serialization/resources/index.d.ts +1 -0
- package/serialization/resources/index.js +2 -1
- package/serialization/resources/search/types/index.d.ts +0 -1
- package/serialization/resources/search/types/index.js +0 -1
- package/{dist/serialization/types/ScoreSearchTerms.d.ts → serialization/types/AnalyzeMaxTokens.d.ts} +2 -2
- package/serialization/types/{Confidence.js → AnalyzeMaxTokens.js} +2 -2
- package/serialization/types/AnalyzeTaskError.d.ts +12 -0
- package/serialization/types/AnalyzeTaskError.js +43 -0
- package/serialization/types/AnalyzeTaskResponse.d.ts +22 -0
- package/serialization/types/{SummarizeResponse.js → AnalyzeTaskResponse.js} +13 -13
- package/serialization/types/AnalyzeTaskResult.d.ts +18 -0
- package/{dist/serialization/types/Gist.js → serialization/types/AnalyzeTaskResult.js} +9 -8
- package/serialization/types/AnalyzeTaskResultUsage.d.ts +13 -0
- package/serialization/types/AnalyzeTaskResultUsage.js +44 -0
- package/serialization/types/AnalyzeTaskStatus.d.ts +10 -0
- package/serialization/types/AnalyzeTaskStatus.js +41 -0
- package/serialization/types/AnalyzeTaskWebhookInfo.d.ts +15 -0
- package/serialization/types/AnalyzeTaskWebhookInfo.js +46 -0
- package/serialization/types/AnalyzeTemperature.d.ts +10 -0
- package/serialization/types/AnalyzeTemperature.js +41 -0
- package/serialization/types/AnalyzeTextPrompt.d.ts +10 -0
- package/serialization/types/AnalyzeTextPrompt.js +41 -0
- package/serialization/types/AudioInputRequest.d.ts +2 -0
- package/serialization/types/AudioInputRequest.js +2 -0
- package/serialization/types/AudioInputRequestEmbeddingTypeItem.d.ts +10 -0
- package/serialization/types/AudioInputRequestEmbeddingTypeItem.js +41 -0
- package/serialization/types/CreateAnalyzeTaskResponse.d.ts +14 -0
- package/serialization/types/CreateAnalyzeTaskResponse.js +45 -0
- package/serialization/types/EmbeddingDataEmbeddingOption.d.ts +1 -1
- package/serialization/types/EmbeddingDataEmbeddingOption.js +1 -1
- package/serialization/types/EmbeddingMediaMetadata.d.ts +5 -1
- package/serialization/types/EmbeddingMediaMetadata.js +2 -0
- package/serialization/types/EmbeddingMultiInputMetadata.d.ts +11 -0
- package/serialization/types/EmbeddingMultiInputMetadata.js +41 -0
- package/serialization/types/GeneratedTextData.d.ts +10 -0
- package/serialization/types/GeneratedTextData.js +41 -0
- package/serialization/types/MultiInputMediaSource.d.ts +17 -0
- package/serialization/types/MultiInputMediaSource.js +48 -0
- package/serialization/types/MultiInputMediaSourceMediaType.d.ts +10 -0
- package/{dist/serialization/types/ThresholdSearch.js → serialization/types/MultiInputMediaSourceMediaType.js} +2 -2
- package/serialization/types/MultiInputRequest.d.ts +14 -0
- package/serialization/types/MultiInputRequest.js +45 -0
- package/serialization/types/NonStreamAnalyzeResponse.d.ts +2 -1
- package/serialization/types/NonStreamAnalyzeResponse.js +2 -1
- package/serialization/types/One.d.ts +12 -0
- package/serialization/types/One.js +43 -0
- package/serialization/types/SearchItem.d.ts +0 -4
- package/serialization/types/SearchItem.js +0 -4
- package/serialization/types/SearchItemClipsItem.d.ts +0 -4
- package/serialization/types/SearchItemClipsItem.js +0 -4
- package/serialization/types/SummarizeChapterResult.d.ts +2 -0
- package/serialization/types/SummarizeChapterResult.js +2 -0
- package/serialization/types/SummarizeChapterResultSummarizeType.d.ts +10 -0
- package/serialization/types/SummarizeChapterResultSummarizeType.js +41 -0
- package/serialization/types/SummarizeHighlightResult.d.ts +2 -0
- package/serialization/types/SummarizeHighlightResult.js +2 -0
- package/serialization/types/SummarizeHighlightResultSummarizeType.d.ts +10 -0
- package/serialization/types/SummarizeHighlightResultSummarizeType.js +41 -0
- package/serialization/types/SummarizeSummaryResult.d.ts +2 -0
- package/serialization/types/SummarizeSummaryResult.js +2 -0
- package/serialization/types/SummarizeSummaryResultSummarizeType.d.ts +10 -0
- package/serialization/types/SummarizeSummaryResultSummarizeType.js +41 -0
- package/serialization/types/Two.d.ts +12 -0
- package/serialization/types/Two.js +43 -0
- package/serialization/types/Url.d.ts +12 -0
- package/serialization/types/Url.js +43 -0
- package/serialization/types/VideoContext.d.ts +22 -0
- package/serialization/types/VideoContext.js +53 -0
- package/serialization/types/VideoInputRequest.d.ts +2 -0
- package/serialization/types/VideoInputRequest.js +2 -0
- package/serialization/types/VideoInputRequestEmbeddingTypeItem.d.ts +10 -0
- package/serialization/types/VideoInputRequestEmbeddingTypeItem.js +41 -0
- package/serialization/types/index.d.ts +24 -6
- package/serialization/types/index.js +24 -6
- package/version.d.ts +1 -1
- package/version.js +1 -1
- package/wrapper/TwelveLabs.d.ts +1 -2
- package/wrapper/TwelveLabs.js +1 -2
- package/wrapper/resources/SearchWrapper.d.ts +33 -3
- package/wrapper/resources/SearchWrapper.js +150 -3
- package/api/client/requests/GistRequest.d.ts +0 -22
- package/api/client/requests/SummarizeRequest.d.ts +0 -51
- package/api/resources/search/types/SearchCreateRequestSortOption.d.ts +0 -24
- package/api/resources/search/types/SearchCreateRequestSortOption.js +0 -10
- package/api/types/Confidence.d.ts +0 -15
- package/api/types/Gist.d.ts +0 -18
- package/api/types/GistRequestTypesItem.d.ts +0 -9
- package/api/types/ScoreSearchTerms.d.ts +0 -11
- package/api/types/SummarizeResponse.d.ts +0 -16
- package/api/types/ThresholdSearch.d.ts +0 -15
- package/api/types/ThresholdSearch.js +0 -12
- package/dist/api/client/requests/GistRequest.d.ts +0 -22
- package/dist/api/client/requests/SummarizeRequest.d.ts +0 -51
- package/dist/api/resources/search/types/SearchCreateRequestSortOption.d.ts +0 -24
- package/dist/api/resources/search/types/SearchCreateRequestSortOption.js +0 -10
- package/dist/api/types/Confidence.d.ts +0 -15
- package/dist/api/types/Gist.d.ts +0 -18
- package/dist/api/types/GistRequestTypesItem.d.ts +0 -9
- package/dist/api/types/ScoreSearchTerms.d.ts +0 -11
- package/dist/api/types/SummarizeResponse.d.ts +0 -16
- package/dist/api/types/ThresholdSearch.d.ts +0 -15
- package/dist/api/types/ThresholdSearch.js +0 -12
- package/dist/serialization/client/requests/GistRequest.d.ts +0 -14
- package/dist/serialization/client/requests/SummarizeRequest.d.ts +0 -18
- package/dist/serialization/resources/search/types/SearchCreateRequestSortOption.d.ts +0 -10
- package/dist/serialization/types/Gist.d.ts +0 -17
- package/dist/serialization/types/GistRequestTypesItem.d.ts +0 -10
- package/dist/serialization/types/SummarizeResponse.d.ts +0 -22
- package/dist/serialization/types/ThresholdSearch.d.ts +0 -10
- package/serialization/client/requests/GistRequest.d.ts +0 -14
- package/serialization/client/requests/SummarizeRequest.d.ts +0 -18
- package/serialization/resources/search/types/SearchCreateRequestSortOption.d.ts +0 -10
- package/serialization/resources/search/types/SearchCreateRequestSortOption.js +0 -41
- package/serialization/types/Gist.d.ts +0 -17
- package/serialization/types/GistRequestTypesItem.d.ts +0 -10
- package/serialization/types/GistRequestTypesItem.js +0 -41
- package/serialization/types/SummarizeResponse.d.ts +0 -22
- package/serialization/types/ThresholdSearch.d.ts +0 -10
- package/serialization/types/ThresholdSearch.js +0 -41
- /package/api/{client/requests/GistRequest.js → resources/analyzeAsync/resources/tasks/client/requests/CreateAsyncAnalyzeRequest.js} +0 -0
- /package/api/{client/requests/SummarizeRequest.js → resources/analyzeAsync/resources/tasks/client/requests/TasksListRequest.js} +0 -0
- /package/api/{types/Confidence.js → resources/analyzeAsync/resources/tasks/types/TasksListResponse.js} +0 -0
- /package/api/types/{Gist.js → AnalyzeMaxTokens.js} +0 -0
- /package/api/types/{ScoreSearchTerms.js → AnalyzeTaskError.js} +0 -0
- /package/api/types/{SummarizeResponse.js → AnalyzeTaskResponse.js} +0 -0
- /package/{dist/api/client/requests/GistRequest.js → api/types/AnalyzeTaskResult.js} +0 -0
- /package/{dist/api/client/requests/SummarizeRequest.js → api/types/AnalyzeTaskResultUsage.js} +0 -0
- /package/{dist/api/types/Confidence.js → api/types/AnalyzeTaskWebhookInfo.js} +0 -0
- /package/{dist/api/types/Gist.js → api/types/AnalyzeTemperature.js} +0 -0
- /package/{dist/api/types/ScoreSearchTerms.js → api/types/AnalyzeTextPrompt.js} +0 -0
- /package/{dist/api/types/SummarizeResponse.js → api/types/CreateAnalyzeTaskResponse.js} +0 -0
package/Client.d.ts
CHANGED
|
@@ -11,6 +11,7 @@ import { MultipartUpload } from "./api/resources/multipartUpload/client/Client";
|
|
|
11
11
|
import { EntityCollections } from "./api/resources/entityCollections/client/Client";
|
|
12
12
|
import { Embed } from "./api/resources/embed/client/Client";
|
|
13
13
|
import { Search } from "./api/resources/search/client/Client";
|
|
14
|
+
import { AnalyzeAsync } from "./api/resources/analyzeAsync/client/Client";
|
|
14
15
|
export declare namespace TwelvelabsApiClient {
|
|
15
16
|
interface Options {
|
|
16
17
|
environment?: core.Supplier<environments.TwelvelabsApiEnvironment | string>;
|
|
@@ -38,6 +39,7 @@ export declare class TwelvelabsApiClient {
|
|
|
38
39
|
protected _entityCollections: EntityCollections | undefined;
|
|
39
40
|
protected _embed: Embed | undefined;
|
|
40
41
|
protected _search: Search | undefined;
|
|
42
|
+
protected _analyzeAsync: AnalyzeAsync | undefined;
|
|
41
43
|
constructor(_options: TwelvelabsApiClient.Options);
|
|
42
44
|
get tasks(): Tasks;
|
|
43
45
|
get indexes(): Indexes;
|
|
@@ -46,71 +48,53 @@ export declare class TwelvelabsApiClient {
|
|
|
46
48
|
get entityCollections(): EntityCollections;
|
|
47
49
|
get embed(): Embed;
|
|
48
50
|
get search(): Search;
|
|
51
|
+
get analyzeAsync(): AnalyzeAsync;
|
|
49
52
|
/**
|
|
53
|
+
* This method synchronously analyzes your videos and generates fully customizable text based on your prompts.
|
|
50
54
|
*
|
|
51
|
-
* <
|
|
52
|
-
*
|
|
53
|
-
*
|
|
54
|
-
*
|
|
55
|
-
*
|
|
56
|
-
*
|
|
57
|
-
*
|
|
58
|
-
* This endpoint is rate-limited. For details, see the [Rate limits](/v1.3/docs/get-started/rate-limits) page.
|
|
59
|
-
* </Note>
|
|
55
|
+
* <Accordion title="Input requirements">
|
|
56
|
+
* - Minimum duration: 4 seconds
|
|
57
|
+
* - Maximum duration: 1 hour
|
|
58
|
+
* - Formats: [FFmpeg supported formats](https://ffmpeg.org/ffmpeg-formats.html)
|
|
59
|
+
* - Resolution: 360x360 to 5184x2160 pixels
|
|
60
|
+
* - Aspect ratio: Between 1:1 and 1:2.4, or between 2.4:1 and 1:1.
|
|
61
|
+
* </Accordion>
|
|
60
62
|
*
|
|
61
|
-
*
|
|
62
|
-
*
|
|
63
|
-
*
|
|
64
|
-
*
|
|
65
|
-
* @throws {@link TwelvelabsApi.TooManyRequestsError}
|
|
66
|
-
*
|
|
67
|
-
* @example
|
|
68
|
-
* await client.summarize({
|
|
69
|
-
* videoId: "6298d673f1090f1100476d4c",
|
|
70
|
-
* type: "summary",
|
|
71
|
-
* prompt: "Generate a summary of this video for a social media post, up to two sentences.",
|
|
72
|
-
* temperature: 0.2
|
|
73
|
-
* })
|
|
74
|
-
*/
|
|
75
|
-
summarize(request: TwelvelabsApi.SummarizeRequest, requestOptions?: TwelvelabsApiClient.RequestOptions): core.HttpResponsePromise<TwelvelabsApi.SummarizeResponse>;
|
|
76
|
-
private __summarize;
|
|
77
|
-
/**
|
|
78
|
-
* <Note title="Deprecation notice">
|
|
79
|
-
* This endpoint will be sunset and removed on February 15, 2026. Instead, use the [`POST`](/v1.3/api-reference/analyze-videos/analyze) method of the `/analyze` endpoint, passing the [`response_format`](/v1.3/api-reference/analyze-videos/analyze#request.body.response_format) parameter to specify the format of the response as structured JSON. For migration instructions, see the [Release notes](/v1.3/docs/get-started/release-notes#predefined-formats-for-video-analysis-will-be-sunset-and-removed) page.
|
|
80
|
-
* </Note>
|
|
63
|
+
* **When to use this method**:
|
|
64
|
+
* - Analyze videos up to 1 hour
|
|
65
|
+
* - Retrieve immediate results without waiting for asynchronous processing
|
|
66
|
+
* - Stream text fragments in real-time for immediate processing and feedback
|
|
81
67
|
*
|
|
82
|
-
*
|
|
83
|
-
*
|
|
84
|
-
* @param {TwelvelabsApi.GistRequest} request
|
|
85
|
-
* @param {TwelvelabsApiClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
86
|
-
*
|
|
87
|
-
* @throws {@link TwelvelabsApi.BadRequestError}
|
|
88
|
-
* @throws {@link TwelvelabsApi.TooManyRequestsError}
|
|
89
|
-
*
|
|
90
|
-
* @example
|
|
91
|
-
* await client.gist({
|
|
92
|
-
* videoId: "6298d673f1090f1100476d4c",
|
|
93
|
-
* types: ["title", "topic"]
|
|
94
|
-
* })
|
|
95
|
-
*/
|
|
96
|
-
gist(request: TwelvelabsApi.GistRequest, requestOptions?: TwelvelabsApiClient.RequestOptions): core.HttpResponsePromise<TwelvelabsApi.Gist>;
|
|
97
|
-
private __gist;
|
|
98
|
-
/**
|
|
99
|
-
* This endpoint analyzes your videos and creates fully customizable text based on your prompts, including but not limited to tables of content, action items, memos, and detailed analyses.
|
|
68
|
+
* **Do not use this method for**:
|
|
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.
|
|
100
70
|
*
|
|
101
71
|
* <Note title="Notes">
|
|
102
72
|
* - This endpoint is rate-limited. For details, see the [Rate limits](/v1.3/docs/get-started/rate-limits) page.
|
|
103
|
-
* - This endpoint supports streaming responses. For details on integrating this feature into your application, refer to the [Analyze videos](/v1.3/docs/guides/analyze-videos) page.
|
|
104
73
|
* </Note>
|
|
105
74
|
*/
|
|
106
75
|
analyzeStream(request: TwelvelabsApi.AnalyzeStreamRequest, requestOptions?: TwelvelabsApiClient.RequestOptions): core.HttpResponsePromise<core.Stream<TwelvelabsApi.StreamAnalyzeResponse>>;
|
|
107
76
|
private __analyzeStream;
|
|
108
77
|
/**
|
|
109
|
-
* This
|
|
78
|
+
* This method synchronously analyzes your videos and generates fully customizable text based on your prompts.
|
|
79
|
+
*
|
|
80
|
+
* <Accordion title="Input requirements">
|
|
81
|
+
* - Minimum duration: 4 seconds
|
|
82
|
+
* - Maximum duration: 1 hour
|
|
83
|
+
* - Formats: [FFmpeg supported formats](https://ffmpeg.org/ffmpeg-formats.html)
|
|
84
|
+
* - Resolution: 360x360 to 5184x2160 pixels
|
|
85
|
+
* - Aspect ratio: Between 1:1 and 1:2.4, or between 2.4:1 and 1:1.
|
|
86
|
+
* </Accordion>
|
|
87
|
+
*
|
|
88
|
+
* **When to use this method**:
|
|
89
|
+
* - Analyze videos up to 1 hour
|
|
90
|
+
* - Retrieve immediate results without waiting for asynchronous processing
|
|
91
|
+
* - Stream text fragments in real-time for immediate processing and feedback
|
|
92
|
+
*
|
|
93
|
+
* **Do not use this method for**:
|
|
94
|
+
* - 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.
|
|
110
95
|
*
|
|
111
96
|
* <Note title="Notes">
|
|
112
97
|
* - This endpoint is rate-limited. For details, see the [Rate limits](/v1.3/docs/get-started/rate-limits) page.
|
|
113
|
-
* - This endpoint supports streaming responses. For details on integrating this feature into your application, refer to the [Analyze videos](/v1.3/docs/guides/analyze-videos) page.
|
|
114
98
|
* </Note>
|
|
115
99
|
*
|
|
116
100
|
* @param {TwelvelabsApi.AnalyzeRequest} request
|
package/Client.js
CHANGED
|
@@ -62,6 +62,7 @@ const Client_4 = require("./api/resources/multipartUpload/client/Client");
|
|
|
62
62
|
const Client_5 = require("./api/resources/entityCollections/client/Client");
|
|
63
63
|
const Client_6 = require("./api/resources/embed/client/Client");
|
|
64
64
|
const Client_7 = require("./api/resources/search/client/Client");
|
|
65
|
+
const Client_8 = require("./api/resources/analyzeAsync/client/Client");
|
|
65
66
|
class TwelvelabsApiClient {
|
|
66
67
|
constructor(_options) {
|
|
67
68
|
this._options = _options;
|
|
@@ -94,175 +95,31 @@ class TwelvelabsApiClient {
|
|
|
94
95
|
var _a;
|
|
95
96
|
return ((_a = this._search) !== null && _a !== void 0 ? _a : (this._search = new Client_7.Search(this._options)));
|
|
96
97
|
}
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
* This endpoint will be sunset and removed. Use the [`POST`](/v1.3/api-reference/analyze-videos/analyze) method of the `/analyze` endpoint. Pass the [`response_format`](/v1.3/api-reference/analyze-videos/analyze#request.body.response_format) parameter to specify the format of the response as structured JSON. For migration instructions, see the [Release notes](/v1.3/docs/get-started/release-notes#predefined-formats-for-video-analysis-will-be-sunset-and-removed) page.
|
|
101
|
-
* </Note>
|
|
102
|
-
*
|
|
103
|
-
* This endpoint analyzes videos and generates summaries, chapters, or highlights. Optionally, you can provide a prompt to customize the output.
|
|
104
|
-
*
|
|
105
|
-
* <Note title="Note">
|
|
106
|
-
* This endpoint is rate-limited. For details, see the [Rate limits](/v1.3/docs/get-started/rate-limits) page.
|
|
107
|
-
* </Note>
|
|
108
|
-
*
|
|
109
|
-
* @param {TwelvelabsApi.SummarizeRequest} request
|
|
110
|
-
* @param {TwelvelabsApiClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
111
|
-
*
|
|
112
|
-
* @throws {@link TwelvelabsApi.BadRequestError}
|
|
113
|
-
* @throws {@link TwelvelabsApi.TooManyRequestsError}
|
|
114
|
-
*
|
|
115
|
-
* @example
|
|
116
|
-
* await client.summarize({
|
|
117
|
-
* videoId: "6298d673f1090f1100476d4c",
|
|
118
|
-
* type: "summary",
|
|
119
|
-
* prompt: "Generate a summary of this video for a social media post, up to two sentences.",
|
|
120
|
-
* temperature: 0.2
|
|
121
|
-
* })
|
|
122
|
-
*/
|
|
123
|
-
summarize(request, requestOptions) {
|
|
124
|
-
return core.HttpResponsePromise.fromPromise(this.__summarize(request, requestOptions));
|
|
125
|
-
}
|
|
126
|
-
__summarize(request, requestOptions) {
|
|
127
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
128
|
-
var _a, _b;
|
|
129
|
-
const _response = yield core.fetcher({
|
|
130
|
-
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, "summarize"),
|
|
131
|
-
method: "POST",
|
|
132
|
-
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "twelvelabs-js", "X-Fern-SDK-Version": "1.2.0", "User-Agent": "twelvelabs-js/1.2.0", "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),
|
|
133
|
-
contentType: "application/json",
|
|
134
|
-
requestType: "json",
|
|
135
|
-
body: serializers.SummarizeRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
|
136
|
-
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
137
|
-
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
138
|
-
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
139
|
-
});
|
|
140
|
-
if (_response.ok) {
|
|
141
|
-
return {
|
|
142
|
-
data: serializers.SummarizeResponse.parseOrThrow(_response.body, {
|
|
143
|
-
unrecognizedObjectKeys: "passthrough",
|
|
144
|
-
allowUnrecognizedUnionMembers: true,
|
|
145
|
-
allowUnrecognizedEnumValues: true,
|
|
146
|
-
breadcrumbsPrefix: ["response"],
|
|
147
|
-
}),
|
|
148
|
-
rawResponse: _response.rawResponse,
|
|
149
|
-
};
|
|
150
|
-
}
|
|
151
|
-
if (_response.error.reason === "status-code") {
|
|
152
|
-
switch (_response.error.statusCode) {
|
|
153
|
-
case 400:
|
|
154
|
-
throw new TwelvelabsApi.BadRequestError(_response.error.body, _response.rawResponse);
|
|
155
|
-
case 429:
|
|
156
|
-
throw new TwelvelabsApi.TooManyRequestsError(_response.error.body, _response.rawResponse);
|
|
157
|
-
default:
|
|
158
|
-
throw new errors.TwelvelabsApiError({
|
|
159
|
-
statusCode: _response.error.statusCode,
|
|
160
|
-
body: _response.error.body,
|
|
161
|
-
rawResponse: _response.rawResponse,
|
|
162
|
-
});
|
|
163
|
-
}
|
|
164
|
-
}
|
|
165
|
-
switch (_response.error.reason) {
|
|
166
|
-
case "non-json":
|
|
167
|
-
throw new errors.TwelvelabsApiError({
|
|
168
|
-
statusCode: _response.error.statusCode,
|
|
169
|
-
body: _response.error.rawBody,
|
|
170
|
-
rawResponse: _response.rawResponse,
|
|
171
|
-
});
|
|
172
|
-
case "timeout":
|
|
173
|
-
throw new errors.TwelvelabsApiTimeoutError("Timeout exceeded when calling POST /summarize.");
|
|
174
|
-
case "unknown":
|
|
175
|
-
throw new errors.TwelvelabsApiError({
|
|
176
|
-
message: _response.error.errorMessage,
|
|
177
|
-
rawResponse: _response.rawResponse,
|
|
178
|
-
});
|
|
179
|
-
}
|
|
180
|
-
});
|
|
98
|
+
get analyzeAsync() {
|
|
99
|
+
var _a;
|
|
100
|
+
return ((_a = this._analyzeAsync) !== null && _a !== void 0 ? _a : (this._analyzeAsync = new Client_8.AnalyzeAsync(this._options)));
|
|
181
101
|
}
|
|
182
102
|
/**
|
|
183
|
-
*
|
|
184
|
-
* This endpoint will be sunset and removed on February 15, 2026. Instead, use the [`POST`](/v1.3/api-reference/analyze-videos/analyze) method of the `/analyze` endpoint, passing the [`response_format`](/v1.3/api-reference/analyze-videos/analyze#request.body.response_format) parameter to specify the format of the response as structured JSON. For migration instructions, see the [Release notes](/v1.3/docs/get-started/release-notes#predefined-formats-for-video-analysis-will-be-sunset-and-removed) page.
|
|
185
|
-
* </Note>
|
|
103
|
+
* This method synchronously analyzes your videos and generates fully customizable text based on your prompts.
|
|
186
104
|
*
|
|
187
|
-
*
|
|
105
|
+
* <Accordion title="Input requirements">
|
|
106
|
+
* - Minimum duration: 4 seconds
|
|
107
|
+
* - Maximum duration: 1 hour
|
|
108
|
+
* - Formats: [FFmpeg supported formats](https://ffmpeg.org/ffmpeg-formats.html)
|
|
109
|
+
* - Resolution: 360x360 to 5184x2160 pixels
|
|
110
|
+
* - Aspect ratio: Between 1:1 and 1:2.4, or between 2.4:1 and 1:1.
|
|
111
|
+
* </Accordion>
|
|
188
112
|
*
|
|
189
|
-
*
|
|
190
|
-
*
|
|
113
|
+
* **When to use this method**:
|
|
114
|
+
* - Analyze videos up to 1 hour
|
|
115
|
+
* - Retrieve immediate results without waiting for asynchronous processing
|
|
116
|
+
* - Stream text fragments in real-time for immediate processing and feedback
|
|
191
117
|
*
|
|
192
|
-
*
|
|
193
|
-
*
|
|
194
|
-
*
|
|
195
|
-
* @example
|
|
196
|
-
* await client.gist({
|
|
197
|
-
* videoId: "6298d673f1090f1100476d4c",
|
|
198
|
-
* types: ["title", "topic"]
|
|
199
|
-
* })
|
|
200
|
-
*/
|
|
201
|
-
gist(request, requestOptions) {
|
|
202
|
-
return core.HttpResponsePromise.fromPromise(this.__gist(request, requestOptions));
|
|
203
|
-
}
|
|
204
|
-
__gist(request, requestOptions) {
|
|
205
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
206
|
-
var _a, _b;
|
|
207
|
-
const _response = yield core.fetcher({
|
|
208
|
-
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, "gist"),
|
|
209
|
-
method: "POST",
|
|
210
|
-
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "twelvelabs-js", "X-Fern-SDK-Version": "1.2.0", "User-Agent": "twelvelabs-js/1.2.0", "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),
|
|
211
|
-
contentType: "application/json",
|
|
212
|
-
requestType: "json",
|
|
213
|
-
body: serializers.GistRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
|
214
|
-
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
215
|
-
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
216
|
-
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
217
|
-
});
|
|
218
|
-
if (_response.ok) {
|
|
219
|
-
return {
|
|
220
|
-
data: serializers.Gist.parseOrThrow(_response.body, {
|
|
221
|
-
unrecognizedObjectKeys: "passthrough",
|
|
222
|
-
allowUnrecognizedUnionMembers: true,
|
|
223
|
-
allowUnrecognizedEnumValues: true,
|
|
224
|
-
breadcrumbsPrefix: ["response"],
|
|
225
|
-
}),
|
|
226
|
-
rawResponse: _response.rawResponse,
|
|
227
|
-
};
|
|
228
|
-
}
|
|
229
|
-
if (_response.error.reason === "status-code") {
|
|
230
|
-
switch (_response.error.statusCode) {
|
|
231
|
-
case 400:
|
|
232
|
-
throw new TwelvelabsApi.BadRequestError(_response.error.body, _response.rawResponse);
|
|
233
|
-
case 429:
|
|
234
|
-
throw new TwelvelabsApi.TooManyRequestsError(_response.error.body, _response.rawResponse);
|
|
235
|
-
default:
|
|
236
|
-
throw new errors.TwelvelabsApiError({
|
|
237
|
-
statusCode: _response.error.statusCode,
|
|
238
|
-
body: _response.error.body,
|
|
239
|
-
rawResponse: _response.rawResponse,
|
|
240
|
-
});
|
|
241
|
-
}
|
|
242
|
-
}
|
|
243
|
-
switch (_response.error.reason) {
|
|
244
|
-
case "non-json":
|
|
245
|
-
throw new errors.TwelvelabsApiError({
|
|
246
|
-
statusCode: _response.error.statusCode,
|
|
247
|
-
body: _response.error.rawBody,
|
|
248
|
-
rawResponse: _response.rawResponse,
|
|
249
|
-
});
|
|
250
|
-
case "timeout":
|
|
251
|
-
throw new errors.TwelvelabsApiTimeoutError("Timeout exceeded when calling POST /gist.");
|
|
252
|
-
case "unknown":
|
|
253
|
-
throw new errors.TwelvelabsApiError({
|
|
254
|
-
message: _response.error.errorMessage,
|
|
255
|
-
rawResponse: _response.rawResponse,
|
|
256
|
-
});
|
|
257
|
-
}
|
|
258
|
-
});
|
|
259
|
-
}
|
|
260
|
-
/**
|
|
261
|
-
* This endpoint analyzes your videos and creates fully customizable text based on your prompts, including but not limited to tables of content, action items, memos, and detailed analyses.
|
|
118
|
+
* **Do not use this method for**:
|
|
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.
|
|
262
120
|
*
|
|
263
121
|
* <Note title="Notes">
|
|
264
122
|
* - This endpoint is rate-limited. For details, see the [Rate limits](/v1.3/docs/get-started/rate-limits) page.
|
|
265
|
-
* - This endpoint supports streaming responses. For details on integrating this feature into your application, refer to the [Analyze videos](/v1.3/docs/guides/analyze-videos) page.
|
|
266
123
|
* </Note>
|
|
267
124
|
*/
|
|
268
125
|
analyzeStream(request, requestOptions) {
|
|
@@ -274,7 +131,7 @@ class TwelvelabsApiClient {
|
|
|
274
131
|
const _response = yield core.fetcher({
|
|
275
132
|
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"),
|
|
276
133
|
method: "POST",
|
|
277
|
-
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "twelvelabs-js", "X-Fern-SDK-Version": "1.2.
|
|
134
|
+
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "twelvelabs-js", "X-Fern-SDK-Version": "1.2.2", "User-Agent": "twelvelabs-js/1.2.2", "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),
|
|
278
135
|
contentType: "application/json",
|
|
279
136
|
requestType: "json",
|
|
280
137
|
body: Object.assign(Object.assign({}, serializers.AnalyzeStreamRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" })), { stream: true }),
|
|
@@ -336,11 +193,26 @@ class TwelvelabsApiClient {
|
|
|
336
193
|
});
|
|
337
194
|
}
|
|
338
195
|
/**
|
|
339
|
-
* This
|
|
196
|
+
* This method synchronously analyzes your videos and generates fully customizable text based on your prompts.
|
|
197
|
+
*
|
|
198
|
+
* <Accordion title="Input requirements">
|
|
199
|
+
* - Minimum duration: 4 seconds
|
|
200
|
+
* - Maximum duration: 1 hour
|
|
201
|
+
* - Formats: [FFmpeg supported formats](https://ffmpeg.org/ffmpeg-formats.html)
|
|
202
|
+
* - Resolution: 360x360 to 5184x2160 pixels
|
|
203
|
+
* - Aspect ratio: Between 1:1 and 1:2.4, or between 2.4:1 and 1:1.
|
|
204
|
+
* </Accordion>
|
|
205
|
+
*
|
|
206
|
+
* **When to use this method**:
|
|
207
|
+
* - Analyze videos up to 1 hour
|
|
208
|
+
* - Retrieve immediate results without waiting for asynchronous processing
|
|
209
|
+
* - Stream text fragments in real-time for immediate processing and feedback
|
|
210
|
+
*
|
|
211
|
+
* **Do not use this method for**:
|
|
212
|
+
* - 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.
|
|
340
213
|
*
|
|
341
214
|
* <Note title="Notes">
|
|
342
215
|
* - This endpoint is rate-limited. For details, see the [Rate limits](/v1.3/docs/get-started/rate-limits) page.
|
|
343
|
-
* - This endpoint supports streaming responses. For details on integrating this feature into your application, refer to the [Analyze videos](/v1.3/docs/guides/analyze-videos) page.
|
|
344
216
|
* </Note>
|
|
345
217
|
*
|
|
346
218
|
* @param {TwelvelabsApi.AnalyzeRequest} request
|
|
@@ -386,7 +258,7 @@ class TwelvelabsApiClient {
|
|
|
386
258
|
const _response = yield core.fetcher({
|
|
387
259
|
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"),
|
|
388
260
|
method: "POST",
|
|
389
|
-
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "twelvelabs-js", "X-Fern-SDK-Version": "1.2.
|
|
261
|
+
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "twelvelabs-js", "X-Fern-SDK-Version": "1.2.2", "User-Agent": "twelvelabs-js/1.2.2", "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),
|
|
390
262
|
contentType: "application/json",
|
|
391
263
|
requestType: "json",
|
|
392
264
|
body: Object.assign(Object.assign({}, serializers.AnalyzeRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" })), { stream: false }),
|