Skip to content

Commit 61299ed

Browse files
feat(api): aggregated API specs update
1 parent b745f43 commit 61299ed

6 files changed

Lines changed: 86 additions & 79 deletions

File tree

.stats.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
configured_endpoints: 633
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/gcore%2Fgcore-8f63354e3e247d4c5010b1c3a26dde23083f7f750c7f4906ec4417e42696b8b3.yml
3-
openapi_spec_hash: ff1ed42b10de1567fa35e3c5260bf431
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/gcore%2Fgcore-5a4b8411d18f52b85677665c177979374da5c60ab6757f83b0b949826f0099aa.yml
3+
openapi_spec_hash: c2464785b6a2754e1a62d0b416715934
44
config_hash: c71c5fd84e30d315500ae54ec3a83b71

src/gcore/resources/streaming/quality_sets.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ def list(
6262
Our experts have selected the optimal parameters for transcoding, to ensure
6363
maximum video/audio quality with the best compression. Default quality sets are
6464
described in the
65-
[documentation](https://gcore.com/docs/streaming-platform/live-streams-and-videos-protocols-and-codecs/output-parameters-after-transcoding-bitrate-frame-rate-and-codecs).
65+
[documentation](/docs/streaming-platform/live-streams-and-videos-protocols-and-codecs/output-parameters-and-codecs#custom-quality-sets).
6666
These values are the default for everyone. There is no need to configure
6767
anything additional.
6868
@@ -204,7 +204,7 @@ async def list(
204204
Our experts have selected the optimal parameters for transcoding, to ensure
205205
maximum video/audio quality with the best compression. Default quality sets are
206206
described in the
207-
[documentation](https://gcore.com/docs/streaming-platform/live-streams-and-videos-protocols-and-codecs/output-parameters-after-transcoding-bitrate-frame-rate-and-codecs).
207+
[documentation](/docs/streaming-platform/live-streams-and-videos-protocols-and-codecs/output-parameters-and-codecs#custom-quality-sets).
208208
These values are the default for everyone. There is no need to configure
209209
anything additional.
210210

src/gcore/resources/streaming/streams/streams.py

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -126,9 +126,7 @@ def create(
126126
- Restreaming
127127
- (soon) AI Automatic Speech Recognition for subtitles/captions generating
128128
129-
For more information see specific API methods, and the Knowledge Base. To
130-
organize streaming with ultra-low latency, look for WebRTC delivery in different
131-
section in the Knowledge Base.
129+
For more information see specific API methods, and the Knowledge Base.
132130
133131
![HTML Overlays](https://demo-files.gvideo.io/apidocs/low-latency-football.gif)
134132
@@ -471,6 +469,9 @@ def create_clip(
471469
highlights in sport events, or cutting an important moment in the news or live
472470
performance.
473471
472+
DVR function must be enabled for clip recording. If the DVR is disabled, the
473+
response will be error 422.
474+
474475
Instant clip becomes available for viewing in the following formats:
475476
476477
- HLS .m3u8,
@@ -863,9 +864,7 @@ async def create(
863864
- Restreaming
864865
- (soon) AI Automatic Speech Recognition for subtitles/captions generating
865866
866-
For more information see specific API methods, and the Knowledge Base. To
867-
organize streaming with ultra-low latency, look for WebRTC delivery in different
868-
section in the Knowledge Base.
867+
For more information see specific API methods, and the Knowledge Base.
869868
870869
![HTML Overlays](https://demo-files.gvideo.io/apidocs/low-latency-football.gif)
871870
@@ -1208,6 +1207,9 @@ async def create_clip(
12081207
highlights in sport events, or cutting an important moment in the news or live
12091208
performance.
12101209
1210+
DVR function must be enabled for clip recording. If the DVR is disabled, the
1211+
response will be error 422.
1212+
12111213
Instant clip becomes available for viewing in the following formats:
12121214
12131215
- HLS .m3u8,

src/gcore/resources/streaming/videos/videos.py

Lines changed: 18 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -135,18 +135,15 @@ def create(
135135
our video hosting. If necessary, you can disable automatic creation of
136136
subtitles. If AI is disabled in your account, no AI functionality is called.
137137
138-
**Advanced Features**
139-
140-
For details on the requirements for incoming original files, and output video
141-
parameters after transcoding, refer to the Knowledge Base documentation. By
142-
default video will be transcoded according to the original resolution, and a
143-
quality ladder suitable for your original video will be applied. There is no
144-
automatic upscaling; the maximum quality is taken from the original video.
145-
146-
If you want to upload specific files not explicitly listed in requirements or
147-
wish to modify the standard quality ladder (i.e. decrease quality or add new
148-
non-standard qualities), then such customization is possible. Please reach out
149-
to us for assistance.
138+
**Advanced Features** For details on the requirements for incoming original
139+
files, and output video parameters after transcoding, refer to the Knowledge
140+
Base documentation. By default video will be transcoded according to the
141+
original resolution, and a quality ladder suitable for your original video will
142+
be applied. There is no automatic upscaling; the maximum quality is taken from
143+
the original video. If you want to upload specific files not explicitly listed
144+
in requirements or wish to modify the standard quality ladder (i.e. decrease
145+
quality or add new non-standard qualities), then such customization is possible.
146+
Please reach out to us for assistance.
150147
151148
Additionally, check the Knowledge Base for any supplementary information you may
152149
need.
@@ -886,18 +883,15 @@ async def create(
886883
our video hosting. If necessary, you can disable automatic creation of
887884
subtitles. If AI is disabled in your account, no AI functionality is called.
888885
889-
**Advanced Features**
890-
891-
For details on the requirements for incoming original files, and output video
892-
parameters after transcoding, refer to the Knowledge Base documentation. By
893-
default video will be transcoded according to the original resolution, and a
894-
quality ladder suitable for your original video will be applied. There is no
895-
automatic upscaling; the maximum quality is taken from the original video.
896-
897-
If you want to upload specific files not explicitly listed in requirements or
898-
wish to modify the standard quality ladder (i.e. decrease quality or add new
899-
non-standard qualities), then such customization is possible. Please reach out
900-
to us for assistance.
886+
**Advanced Features** For details on the requirements for incoming original
887+
files, and output video parameters after transcoding, refer to the Knowledge
888+
Base documentation. By default video will be transcoded according to the
889+
original resolution, and a quality ladder suitable for your original video will
890+
be applied. There is no automatic upscaling; the maximum quality is taken from
891+
the original video. If you want to upload specific files not explicitly listed
892+
in requirements or wish to modify the standard quality ladder (i.e. decrease
893+
quality or add new non-standard qualities), then such customization is possible.
894+
Please reach out to us for assistance.
901895
902896
Additionally, check the Knowledge Base for any supplementary information you may
903897
need.

src/gcore/types/streaming/stream.py

Lines changed: 14 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -327,8 +327,8 @@ class Stream(BaseModel):
327327
Double-check the documentation for your encoder.
328328
329329
Please note that 1 connection and 1 protocol can be used at a single moment in
330-
time per unique stream key input. Trying to send 2+ connection requests into
331-
`push_url` to once, or 2+ protocols at once will not lead to a result.
330+
time per unique stream key input. Trying to send 2+ connection requests into the
331+
single `push_url`, or 2+ protocols at once will not lead to a result.
332332
333333
For example, transcoding process will fail if:
334334
@@ -373,8 +373,8 @@ class Stream(BaseModel):
373373
necessary, ask us and we will help you.
374374
375375
Please note that 1 connection and 1 protocol can be used at a single moment in
376-
time per unique stream key input. Trying to send 2+ connection requests into
377-
`push_url_srt` to once, or 2+ protocols at once will not lead to a result.
376+
time per unique stream key input. Trying to send 2+ connection requests into the
377+
single `push_url_srt`, or 2+ protocols at once will not lead to a result.
378378
379379
For example, transcoding process will fail if:
380380
@@ -431,8 +431,8 @@ class Stream(BaseModel):
431431
start in browser" has been added.
432432
433433
Please note that 1 connection and 1 protocol can be used at a single moment in
434-
time per unique stream key input. Trying to send 2+ connection requests into
435-
`push_url_whip` to once, or 2+ protocols at once will not lead to a result.
434+
time per unique stream key input. Trying to send 2+ connection requests into the
435+
single `push_url_whip`, or 2+ protocols at once will not lead to a result.
436436
437437
For example, transcoding process will fail if:
438438
@@ -493,6 +493,14 @@ class Stream(BaseModel):
493493
then only the time of the last session is displayed here.
494494
"""
495495

496+
stream_source_type: Optional[Literal["rtmp", "srt", "webrtc", "https"]] = None
497+
"""
498+
For the current transcoding, this specifies the source protocol: RTMP, SRT,
499+
WebRTC, or HTTPS. This does not specify which source is used primary or backup,
500+
only the source protocol type. If transcoding is inactive, the value will be
501+
null.
502+
"""
503+
496504
transcoded_qualities: Optional[List[str]] = None
497505
"""Array of qualities to which live stream is transcoded"""
498506

src/gcore/types/streaming/video.py

Lines changed: 42 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -31,28 +31,28 @@ class ConvertedVideo(BaseModel):
3131
For each converted video, additional download endpoints are available under
3232
`converted_videos`/`mp4_urls`. An MP4 download enpoints:
3333
34-
- /videos/{`client_id`}\\__{slug}/{filename}.mp4
35-
- /videos/{`client_id`}\\__{slug}/{filename}.mp4/download
36-
- /videos/{`client_id`}\\__{slug}/{filename}.mp4/download={`custom_filename`}
34+
1. `/videos/{client_id}_{slug}/{filename}.mp4`
35+
2. `/videos/{client_id}_{slug}/{filename}.mp4/download`
36+
3. `/videos/{client_id}_{slug}/{filename}.mp4/download={custom_filename}`
3737
3838
The first option returns the file as is. Response will be:
3939
4040
```
41-
GET .mp4
42-
...
43-
content-type: video/mp4
41+
GET .mp4
42+
...
43+
content-type: video/mp4
4444
```
4545
46-
The second option with /download will respond with HTTP response header that
46+
The second option with `/download` will respond with HTTP response header that
4747
directly tells browsers to download the file instead of playing it in the
4848
browser:
4949
5050
```
51-
GET .mp4/download
52-
...
53-
content-type: video/mp4
54-
content-disposition: attachment
55-
access-control-expose-headers: Content-Disposition
51+
GET .mp4/download
52+
...
53+
content-type: video/mp4
54+
content-disposition: attachment
55+
access-control-expose-headers: Content-Disposition
5656
```
5757
5858
The third option allows you to set a custom name for the file being downloaded.
@@ -68,18 +68,18 @@ class ConvertedVideo(BaseModel):
6868
- Example valid filenames: `holiday2025`, `_backup.final`, `clip-v1.2`
6969
7070
```
71-
GET .mp4/download={custom_filename}
72-
...
73-
content-type: video/mp4
74-
content-disposition: attachment; filename="{custom_filename}.mp4"
75-
access-control-expose-headers: Content-Disposition
71+
GET .mp4/download={custom_filename}
72+
...
73+
content-type: video/mp4
74+
content-disposition: attachment; filename="{custom_filename}.mp4"
75+
access-control-expose-headers: Content-Disposition
7676
```
7777
7878
Examples:
7979
80-
- Video:
80+
- MP4:
8181
`https://demo-public.gvideo.io/videos/2675_1OFgHZ1FWZNNvx1A/qid3567v1_h264_4050_1080.mp4/download`
82-
- Video with custom download filename:
82+
- MP4 with custom download filename:
8383
`https://demo-public.gvideo.io/videos/2675_1OFgHZ1FWZNNvx1A/qid3567v1_h264_4050_1080.mp4/download=highlights_v1.1_2025-05-30`
8484
8585
**Default MP4 file name structure**
@@ -107,11 +107,10 @@ class ConvertedVideo(BaseModel):
107107
108108
Read more in Product Documentation in CDN section "Network limits".
109109
110-
**Secure token authentication (updated)**
110+
**Secure token authentication for MP4 (updated)**
111111
112-
Access to MP4 download links can be protected using secure tokens passed as
113-
query parameters. The token generation logic has been updated to allow
114-
fine-grained protection per file and bitrate.
112+
Access to MP4 download links only can be protected using advanced secure tokens
113+
passed as query parameters.
115114
116115
Token generation uses the entire MP4 path, which ensures the token only grants
117116
access to a specific quality/version of the video. This prevents unintended
@@ -207,7 +206,10 @@ class Video(BaseModel):
207206
208207
This URL is a link to the main manifest. But you can also manually specify
209208
suffix-options that will allow you to change the manifest to your request:
210-
`/videos/{client_id}_{slug}/master[-min-N][-max-N][-(h264|hevc|av1)].mpd`
209+
210+
```
211+
/videos/{client_id}_{slug}/master[-min-N][-max-N][-(h264|hevc|av1)].mpd
212+
```
211213
212214
List of suffix-options:
213215
@@ -259,9 +261,9 @@ class Video(BaseModel):
259261
"""
260262

261263
hls_url: Optional[str] = None
262-
"""A URL to a master playlist HLS (master.m3u8).
263-
264-
Chunk type will be selected automatically:
264+
"""
265+
A URL to a master playlist HLS (master.m3u8). Chunk type will be selected
266+
automatically:
265267
266268
- TS if your video was encoded to H264 only.
267269
- CMAF if your video was encoded additionally to H265 and/or AV1 codecs (as
@@ -270,7 +272,10 @@ class Video(BaseModel):
270272
271273
You can also manually specify suffix-options that will allow you to change the
272274
manifest to your request:
273-
`/videos/{client_id}_{video_slug}/master[-cmaf][-min-N][-max-N][-img][-(h264|hevc|av1)].m3u8`
275+
276+
```
277+
/videos/{client_id}_{video_slug}/master[-cmaf][-min-N][-max-N][-img][-(h264|hevc|av1)].m3u8
278+
```
274279
275280
List of suffix-options:
276281
@@ -287,15 +292,16 @@ class Video(BaseModel):
287292
288293
ABR soft-limiting: Soft limitation of the list of qualities allows you to return
289294
not the entire list of transcoded qualities for a video, but only those you
290-
need. For more details look at the Product Documentation. For example, the video
291-
is available in 7 qualities from 360p to 4K, but you want to return not more
292-
than 480p only due to the conditions of distribution of content to a specific
293-
end-user (i.e. free account):
295+
need. For example, the video is available in 7 qualities from 360p to 4K, but
296+
you want to return not more than 480p only due to the conditions of distribution
297+
of content to a specific end-user (i.e. free account): ABR soft-limiting
298+
examples:
294299
295300
- To a generic `.../master.m3u8` manifest
296301
- Add a suffix-option to limit quality `.../master-max-480.m3u8`
297302
- Add a suffix-option to limit quality and codec
298-
`.../master-min-320-max-320-h264.m3u8`
303+
`.../master-min-320-max-320-h264.m3u8` For more details look at the Product
304+
Documentation.
299305
300306
Caution. Solely master.m3u8 (and master[-options].m3u8) is officially documented
301307
and intended for your use. Any additional internal manifests, sub-manifests,
@@ -353,12 +359,9 @@ class Video(BaseModel):
353359
- If the video is a recording of a live stream
354360
- Otherwise it is "null"
355361
356-
**Copy from another server**
357-
358-
URL to an original file that was downloaded. Look at method "Copy from another
359-
server" in POST /videos.
360-
361-
**Recording of an original live stream**
362+
**Copy from another server** URL to an original file that was downloaded. Look
363+
at method "Copy from another server" in POST /videos. **Recording of an original
364+
live stream**
362365
363366
URL to the original non-transcoded stream recording with original quality, saved
364367
in MP4 format. File is created immediately after the completion of the stream

0 commit comments

Comments
 (0)