Skip to content

Commit dc51b59

Browse files
Merge pull request #133 from apivideo/ai-summary-updates
Update Summary endpoints
2 parents 683c828 + 6001ec0 commit dc51b59

19 files changed

+361
-100
lines changed

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
# Changelog
22
All changes to this project will be documented in this file.
33

4+
## [1.4.7] - 2024-11-06
5+
- AI summary updates
6+
47
## [1.4.6] - 2024-11-04
58
- Analytics updates (ccv, views, ...)
69

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ Add this dependency to your project's POM:
7070
<dependency>
7171
<groupId>video.api</groupId>
7272
<artifactId>java-api-client</artifactId>
73-
<version>1.4.6</version>
73+
<version>1.4.7</version>
7474
<scope>compile</scope>
7575
</dependency>
7676
```
@@ -80,7 +80,7 @@ Add this dependency to your project's POM:
8080
Add this dependency to your project's build file:
8181

8282
```groovy
83-
implementation "video.api:java-api-client:1.4.6"
83+
implementation "video.api:java-api-client:1.4.7"
8484
```
8585

8686
#### Others
@@ -93,7 +93,7 @@ mvn clean package
9393

9494
Then manually install the following JARs:
9595

96-
* `target/java-api-client-1.4.6.jar`
96+
* `target/java-api-client-1.4.7.jar`
9797
* `target/lib/*.jar`
9898

9999
### Code sample

api/openapi.yaml

Lines changed: 42 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1339,7 +1339,7 @@ paths:
13391339
x-client-paginated: true
13401340
x-accepts: application/json
13411341
post:
1342-
description: Generate a title, abstract, and key takeaways for a video.
1342+
description: Generate an abstract and key takeaways for a video.
13431343
operationId: POST_summaries
13441344
requestBody:
13451345
content:
@@ -1427,7 +1427,7 @@ paths:
14271427
- Summaries
14281428
x-client-action: create
14291429
x-client-description:
1430-
default: Generate a title, abstract, and key takeaways for a video.
1430+
default: Generate an abstract and key takeaways for a video.
14311431
x-contentType: application/json
14321432
x-accepts: application/json
14331433
/summaries/{summaryId}:
@@ -1563,8 +1563,7 @@ paths:
15631563
default: Get all details for a summary.
15641564
x-accepts: application/json
15651565
patch:
1566-
description: Update details for a summary. Note that this operation is only
1567-
allowed for summary objects where `sourceStatus` is `missing`.
1566+
description: Update details for a summary.
15681567
operationId: PATCH_summaries-summaryId-source
15691568
parameters:
15701569
- description: The unique identifier of the summary source you want to update.
@@ -1614,7 +1613,7 @@ paths:
16141613
content:
16151614
application/json:
16161615
examples:
1617-
Summary already exists:
1616+
Summary generation still in progress:
16181617
value:
16191618
type: https://docs.api.video/reference/summary-already-exists
16201619
title: A summary already exists or is being created on this video.
@@ -1650,8 +1649,7 @@ paths:
16501649
- Summaries
16511650
x-client-action: update
16521651
x-client-description:
1653-
default: Update details for a summary. Note that this operation is only allowed
1654-
for summary objects where `sourceStatus` is `missing`.
1652+
default: Update details for a summary.
16551653
x-contentType: application/json
16561654
x-accepts: application/json
16571655
/videos/{videoId}/source:
@@ -16648,6 +16646,10 @@ components:
1664816646
playerId: pl45KFKdlddgk654dspkze
1664916647
language: en
1665016648
transcript: true
16649+
transcriptSummary: true
16650+
transcriptSummaryAttributes:
16651+
- abstract
16652+
- takeaways
1665116653
tags:
1665216654
- maths
1665316655
- string theory
@@ -16776,6 +16778,16 @@ components:
1677616778
- The default value is `false`.
1677716779
- If you define a video language using the `language` parameter, the API uses that language to summarize the video. If you do not define a language, the API detects it based on the video.
1677816780
type: boolean
16781+
transcriptSummaryAttributes:
16782+
description: Use this parameter to define the elements of a summary that
16783+
you want to generate. If you do not define this parameter, the API generates
16784+
a full summary with all attributes.
16785+
items:
16786+
enum:
16787+
- abstract
16788+
- takeaways
16789+
type: string
16790+
type: array
1677916791
required:
1678016792
- title
1678116793
title: VideoCreationPayload
@@ -16797,15 +16809,21 @@ components:
1679716809
- auto
1679816810
example: auto
1679916811
type: string
16812+
attributes:
16813+
description: Use this parameter to define the elements of a summary that
16814+
you want to generate. If you do not define this parameter, the API generates
16815+
a full summary with all attributes.
16816+
items:
16817+
enum:
16818+
- abstract
16819+
- takeaways
16820+
type: string
16821+
type: array
1680016822
required:
1680116823
- videoId
1680216824
type: object
1680316825
summary-update-payload:
1680416826
properties:
16805-
title:
16806-
description: A video title, based on the contents of the video.
16807-
example: A short lecture on quantum theory
16808-
type: string
1680916827
abstract:
1681016828
description: A short outline of the contents of the video.
1681116829
example: In this lecture, we discuss how complicated quantum theory is,
@@ -16850,12 +16868,7 @@ components:
1685016868
abstract: In this lecture, we discuss how complicated quantum theory is, using
1685116869
the famous example of Schrödingers cat. We also discuss practical applications
1685216870
like quantum computing.
16853-
title: A short lecture on quantum theory
1685416871
properties:
16855-
title:
16856-
description: A video title, based on the contents of the video.
16857-
example: A short lecture on quantum theory
16858-
type: string
1685916872
abstract:
1686016873
description: A short outline of the contents of the video. The length of
1686116874
an `abstract` depends on the amount of content in a video that can be
@@ -17028,6 +17041,9 @@ components:
1702817041
language: en
1702917042
transcript: true
1703017043
transcriptSummary: true
17044+
transcriptSummaryAttributes:
17045+
- abstract
17046+
- takeaways
1703117047
panoramic: false
1703217048
mp4Support: true
1703317049
tags:
@@ -17140,6 +17156,16 @@ components:
1714017156
\ video. If you do not define a language, the API detects it based on\
1714117157
\ the video."
1714217158
type: boolean
17159+
transcriptSummaryAttributes:
17160+
description: Use this parameter to define the elements of a summary that
17161+
you want to generate. If you do not define this parameter, the API generates
17162+
a full summary with all attributes.
17163+
items:
17164+
enum:
17165+
- abstract
17166+
- takeaways
17167+
type: string
17168+
type: array
1714317169
title: VideoUpdatePayload
1714417170
type: object
1714517171
discarded-video-update-payload:

build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ apply plugin: 'com.diffplug.spotless'
44
apply plugin: 'maven-publish'
55

66
group = 'video.api'
7-
version = '1.4.6'
7+
version = '1.4.7'
88

99
buildscript {
1010
repositories {

docs/SummariesApi.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ Method | HTTP request | Description
1919
2020
Generate video summary
2121

22-
Generate a title, abstract, and key takeaways for a video.
22+
Generate an abstract and key takeaways for a video.
2323

2424
### Example
2525
```java
@@ -45,6 +45,7 @@ public class Example {
4545
If you do not set this parameter, **the API will not generate a summary automatically**.
4646

4747
In this case, &#x60;sourceStatus&#x60; will return &#x60;missing&#x60;, and you have to manually add a summary using the &#x60;PATCH /summaries/{summaryId}/source&#x60; endpoint operation.
48+
summaryCreationPayload.setAttributes(); // Use this parameter to define the elements of a summary that you want to generate. If you do not define this parameter, the API generates a full summary with all attributes.
4849

4950

5051
try {
@@ -95,7 +96,7 @@ Name | Type | Description | Notes
9596
9697
Update summary details
9798

98-
Update details for a summary. Note that this operation is only allowed for summary objects where `sourceStatus` is `missing`.
99+
Update details for a summary.
99100

100101
### Example
101102
```java
@@ -116,7 +117,6 @@ public class Example {
116117

117118
String summaryId = "summary_1CGHWuXjhxmeH4WiZ51234"; // The unique identifier of the summary source you want to update.
118119
SummaryUpdatePayload summaryUpdatePayload = new SummaryUpdatePayload(); //
119-
summaryUpdatePayload.setTitle("A short lecture on quantum theory"); // A video title, based on the contents of the video.
120120
summaryUpdatePayload.setAbstract("In this lecture, we discuss how complicated quantum theory is, using the famous example of Schrödingers cat. We also discuss practical applications like quantum computing."); // A short outline of the contents of the video.
121121
summaryUpdatePayload.setTakeaways(Arrays.asList("Quantum theory is complicated.","Schrödinger's cat is neither dead, nor alive.","Quantum computers are super cool.")); // A list of 3 key points from the video, in chronological order.
122122

docs/SummaryCreationPayload.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ Name | Type | Description | Notes
88
------------ | ------------- | ------------- | -------------
99
**videoId** | **String** | Create a summary of a video using the video ID. |
1010
**origin** | [**OriginEnum**](#OriginEnum) | Use this parameter to define how the API generates the summary. The only allowed value is &#x60;auto&#x60;, which means that the API generates a summary automatically. If you do not set this parameter, **the API will not generate a summary automatically**. In this case, &#x60;sourceStatus&#x60; will return &#x60;missing&#x60;, and you have to manually add a summary using the &#x60;PATCH /summaries/{summaryId}/source&#x60; endpoint operation. | [optional]
11+
**attributes** | [**List&lt;AttributesEnum&gt;**](#List&lt;AttributesEnum&gt;) | Use this parameter to define the elements of a summary that you want to generate. If you do not define this parameter, the API generates a full summary with all attributes. | [optional]
1112

1213

1314

@@ -18,6 +19,15 @@ Name | Value
1819
AUTO | &quot;auto&quot;
1920

2021

22+
23+
## Enum: List&lt;AttributesEnum&gt;
24+
25+
Name | Value
26+
---- | -----
27+
ABSTRACT | &quot;abstract&quot;
28+
TAKEAWAYS | &quot;takeaways&quot;
29+
30+
2131
## Implemented Interfaces
2232

2333
* Serializable

docs/SummarySource.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66

77
Name | Type | Description | Notes
88
------------ | ------------- | ------------- | -------------
9-
**title** | **String** | A video title, based on the contents of the video. | [optional]
109
**_abstract** | **String** | A short outline of the contents of the video. The length of an &#x60;abstract&#x60; depends on the amount of content in a video that can be transcribed. The API condenses the contents into minimum 20, maximum 300 words. | [optional]
1110
**takeaways** | **List&lt;String&gt;** | A list of 3 key points from the video, in chronological order. | [optional]
1211

docs/SummaryUpdatePayload.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66

77
Name | Type | Description | Notes
88
------------ | ------------- | ------------- | -------------
9-
**title** | **String** | A video title, based on the contents of the video. | [optional]
109
**_abstract** | **String** | A short outline of the contents of the video. | [optional]
1110
**takeaways** | **List&lt;String&gt;** | A list of 3 key points from the video, in chronological order. | [optional]
1211

docs/VideoCreationPayload.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ Name | Type | Description | Notes
2020
**language** | [**LanguageEnum**](#LanguageEnum) | Use this parameter to set the language of the video. When this parameter is set, the API creates a transcript of the video using the language you specify. You must use the [IETF language tag](https://en.wikipedia.org/wiki/IETF_language_tag) format. &#x60;language&#x60; is a permanent attribute of the video. You can update it to another language using the [&#x60;PATCH /videos/{videoId}&#x60;](https://docs.api.video/reference/api/Videos#update-a-video-object) operation. This triggers the API to generate a new transcript using a different language. | [optional]
2121
**transcript** | **Boolean** | Use this parameter to enable transcription. - When &#x60;true&#x60;, the API generates a transcript for the video. - The default value is &#x60;false&#x60;. - If you define a video language using the &#x60;language&#x60; parameter, the API uses that language to transcribe the video. If you do not define a language, the API detects it based on the video. - When the API generates a transcript, it will be available as a caption for the video. | [optional]
2222
**transcriptSummary** | **Boolean** | Use this parameter to enable summarization. We recommend using this parameter together with &#x60;transcript: true&#x60;. - When &#x60;true&#x60;, the API generates a summary for the video, based on the transcription. - The default value is &#x60;false&#x60;. - If you define a video language using the &#x60;language&#x60; parameter, the API uses that language to summarize the video. If you do not define a language, the API detects it based on the video. | [optional]
23+
**transcriptSummaryAttributes** | [**List&lt;TranscriptSummaryAttributesEnum&gt;**](#List&lt;TranscriptSummaryAttributesEnum&gt;) | Use this parameter to define the elements of a summary that you want to generate. If you do not define this parameter, the API generates a full summary with all attributes. | [optional]
2324

2425

2526

@@ -62,6 +63,15 @@ VI | &quot;vi&quot;
6263
ZH | &quot;zh&quot;
6364

6465

66+
67+
## Enum: List&lt;TranscriptSummaryAttributesEnum&gt;
68+
69+
Name | Value
70+
---- | -----
71+
ABSTRACT | &quot;abstract&quot;
72+
TAKEAWAYS | &quot;takeaways&quot;
73+
74+
6575
## Implemented Interfaces
6676

6777
* Serializable

docs/VideoUpdatePayload.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ Name | Type | Description | Notes
1717
**language** | [**LanguageEnum**](#LanguageEnum) | Use this parameter to set the language of the video. When this parameter is set, the API creates a transcript of the video using the language you specify. You must use the [IETF language tag](https://en.wikipedia.org/wiki/IETF_language_tag) format. &#x60;language&#x60; is a permanent attribute of the video. You can update it to another language using the [&#x60;PATCH /videos/{videoId}&#x60;](https://docs.api.video/reference/api/Videos#update-a-video-object) operation. This triggers the API to generate a new transcript using a different language. | [optional]
1818
**transcript** | **Boolean** | Use this parameter to enable transcription. - When &#x60;true&#x60;, the API generates a transcript for the video. - The default value is &#x60;false&#x60;. - If you define a video language using the &#x60;language&#x60; parameter, the API uses that language to transcribe the video. If you do not define a language, the API detects it based on the video. - When the API generates a transcript, it will be available as a caption for the video. | [optional]
1919
**transcriptSummary** | **Boolean** | Use this parameter to enable summarization. - When &#x60;true&#x60;, the API generates a summary for the video, based on the transcription. - The default value is &#x60;false&#x60;. - If you define a video language using the &#x60;language&#x60; parameter, the API uses that language to summarize the video. If you do not define a language, the API detects it based on the video. | [optional]
20+
**transcriptSummaryAttributes** | [**List&lt;TranscriptSummaryAttributesEnum&gt;**](#List&lt;TranscriptSummaryAttributesEnum&gt;) | Use this parameter to define the elements of a summary that you want to generate. If you do not define this parameter, the API generates a full summary with all attributes. | [optional]
2021

2122

2223

@@ -59,6 +60,15 @@ VI | &quot;vi&quot;
5960
ZH | &quot;zh&quot;
6061

6162

63+
64+
## Enum: List&lt;TranscriptSummaryAttributesEnum&gt;
65+
66+
Name | Value
67+
---- | -----
68+
ABSTRACT | &quot;abstract&quot;
69+
TAKEAWAYS | &quot;takeaways&quot;
70+
71+
6272
## Implemented Interfaces
6373

6474
* Serializable

0 commit comments

Comments
 (0)