gcore 0.6.0__py3-none-any.whl → 0.8.0__py3-none-any.whl

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.

Potentially problematic release.


This version of gcore might be problematic. Click here for more details.

Files changed (185) hide show
  1. gcore/_client.py +9 -0
  2. gcore/_models.py +24 -3
  3. gcore/_version.py +1 -1
  4. gcore/pagination.py +101 -63
  5. gcore/resources/__init__.py +14 -0
  6. gcore/resources/cloud/__init__.py +28 -0
  7. gcore/resources/cloud/cloud.py +64 -0
  8. gcore/resources/cloud/cost_reports.py +811 -0
  9. gcore/resources/cloud/file_shares/file_shares.py +10 -0
  10. gcore/resources/cloud/gpu_baremetal_clusters/gpu_baremetal_clusters.py +61 -26
  11. gcore/resources/cloud/inference/registry_credentials.py +4 -6
  12. gcore/resources/cloud/usage_reports.py +337 -0
  13. gcore/resources/iam/users.py +5 -5
  14. gcore/resources/streaming/__init__.py +159 -0
  15. gcore/resources/streaming/ai_tasks.py +1288 -0
  16. gcore/resources/streaming/broadcasts.py +579 -0
  17. gcore/resources/streaming/directories.py +515 -0
  18. gcore/resources/streaming/players.py +577 -0
  19. gcore/resources/streaming/playlists.py +1059 -0
  20. gcore/resources/streaming/quality_sets.py +331 -0
  21. gcore/resources/streaming/restreams.py +484 -0
  22. gcore/resources/streaming/statistics.py +3224 -0
  23. gcore/resources/streaming/streaming.py +390 -0
  24. gcore/resources/streaming/streams/__init__.py +33 -0
  25. gcore/resources/streaming/streams/overlays.py +716 -0
  26. gcore/resources/streaming/streams/streams.py +1592 -0
  27. gcore/resources/streaming/videos/__init__.py +33 -0
  28. gcore/resources/streaming/videos/subtitles.py +623 -0
  29. gcore/resources/streaming/videos/videos.py +1553 -0
  30. gcore/resources/waap/ip_info.py +28 -10
  31. gcore/types/cloud/__init__.py +10 -0
  32. gcore/types/cloud/cost_report_aggregated.py +865 -0
  33. gcore/types/cloud/cost_report_aggregated_monthly.py +865 -0
  34. gcore/types/cloud/cost_report_detailed.py +1343 -0
  35. gcore/types/cloud/cost_report_get_aggregated_monthly_params.py +394 -0
  36. gcore/types/cloud/cost_report_get_aggregated_params.py +409 -0
  37. gcore/types/cloud/cost_report_get_detailed_params.py +435 -0
  38. gcore/types/cloud/file_share.py +37 -3
  39. gcore/types/cloud/file_share_create_params.py +16 -0
  40. gcore/types/cloud/floating_ip.py +0 -9
  41. gcore/types/cloud/floating_ip_detailed.py +0 -9
  42. gcore/types/cloud/gpu_baremetal_cluster.py +2 -2
  43. gcore/types/cloud/gpu_baremetal_cluster_create_params.py +9 -0
  44. gcore/types/cloud/quota_get_all_response.py +24 -2
  45. gcore/types/cloud/quota_get_by_region_response.py +24 -2
  46. gcore/types/cloud/quotas/request_create_params.py +12 -1
  47. gcore/types/cloud/quotas/request_get_response.py +12 -1
  48. gcore/types/cloud/quotas/request_list_response.py +12 -1
  49. gcore/types/cloud/subnet.py +1 -1
  50. gcore/types/cloud/usage_report.py +1612 -0
  51. gcore/types/cloud/usage_report_get_params.py +432 -0
  52. gcore/types/streaming/__init__.py +143 -0
  53. gcore/types/streaming/ai_contentmoderation_casm.py +39 -0
  54. gcore/types/streaming/ai_contentmoderation_hardnudity.py +54 -0
  55. gcore/types/streaming/ai_contentmoderation_nsfw.py +39 -0
  56. gcore/types/streaming/ai_contentmoderation_softnudity.py +66 -0
  57. gcore/types/streaming/ai_contentmoderation_sport.py +39 -0
  58. gcore/types/streaming/ai_contentmoderation_weapon.py +39 -0
  59. gcore/types/streaming/ai_task.py +205 -0
  60. gcore/types/streaming/ai_task_cancel_response.py +12 -0
  61. gcore/types/streaming/ai_task_create_params.py +168 -0
  62. gcore/types/streaming/ai_task_create_response.py +10 -0
  63. gcore/types/streaming/ai_task_get_ai_settings_params.py +27 -0
  64. gcore/types/streaming/ai_task_get_ai_settings_response.py +12 -0
  65. gcore/types/streaming/ai_task_get_response.py +313 -0
  66. gcore/types/streaming/ai_task_list_params.py +50 -0
  67. gcore/types/streaming/broadcast.py +71 -0
  68. gcore/types/streaming/broadcast_create_params.py +76 -0
  69. gcore/types/streaming/broadcast_list_params.py +12 -0
  70. gcore/types/streaming/broadcast_spectators_count.py +12 -0
  71. gcore/types/streaming/broadcast_update_params.py +76 -0
  72. gcore/types/streaming/clip.py +78 -0
  73. gcore/types/streaming/create_video_param.py +214 -0
  74. gcore/types/streaming/direct_upload_parameters.py +33 -0
  75. gcore/types/streaming/directories_tree.py +19 -0
  76. gcore/types/streaming/directory_base.py +31 -0
  77. gcore/types/streaming/directory_create_params.py +15 -0
  78. gcore/types/streaming/directory_get_response.py +19 -0
  79. gcore/types/streaming/directory_item.py +13 -0
  80. gcore/types/streaming/directory_update_params.py +18 -0
  81. gcore/types/streaming/directory_video.py +13 -0
  82. gcore/types/streaming/ffprobes.py +25 -0
  83. gcore/types/streaming/max_stream_series.py +21 -0
  84. gcore/types/streaming/meet_series.py +23 -0
  85. gcore/types/streaming/player.py +114 -0
  86. gcore/types/streaming/player_create_params.py +18 -0
  87. gcore/types/streaming/player_list_params.py +12 -0
  88. gcore/types/streaming/player_param.py +114 -0
  89. gcore/types/streaming/player_update_params.py +18 -0
  90. gcore/types/streaming/playlist.py +102 -0
  91. gcore/types/streaming/playlist_create.py +12 -0
  92. gcore/types/streaming/playlist_create_params.py +102 -0
  93. gcore/types/streaming/playlist_list_params.py +12 -0
  94. gcore/types/streaming/playlist_list_videos_response.py +10 -0
  95. gcore/types/streaming/playlist_update_params.py +102 -0
  96. gcore/types/streaming/playlist_video.py +215 -0
  97. gcore/types/streaming/popular_videos.py +17 -0
  98. gcore/types/streaming/quality_set_set_default_params.py +23 -0
  99. gcore/types/streaming/quality_sets.py +57 -0
  100. gcore/types/streaming/restream.py +37 -0
  101. gcore/types/streaming/restream_create_params.py +41 -0
  102. gcore/types/streaming/restream_list_params.py +12 -0
  103. gcore/types/streaming/restream_update_params.py +41 -0
  104. gcore/types/streaming/statistic_get_ffprobes_params.py +22 -0
  105. gcore/types/streaming/statistic_get_live_unique_viewers_params.py +26 -0
  106. gcore/types/streaming/statistic_get_live_unique_viewers_response.py +25 -0
  107. gcore/types/streaming/statistic_get_live_watch_time_cdn_params.py +32 -0
  108. gcore/types/streaming/statistic_get_live_watch_time_total_cdn_params.py +30 -0
  109. gcore/types/streaming/statistic_get_max_streams_series_params.py +20 -0
  110. gcore/types/streaming/statistic_get_meet_series_params.py +20 -0
  111. gcore/types/streaming/statistic_get_popular_videos_params.py +15 -0
  112. gcore/types/streaming/statistic_get_storage_series_params.py +20 -0
  113. gcore/types/streaming/statistic_get_stream_series_params.py +20 -0
  114. gcore/types/streaming/statistic_get_unique_viewers_cdn_params.py +27 -0
  115. gcore/types/streaming/statistic_get_unique_viewers_params.py +34 -0
  116. gcore/types/streaming/statistic_get_views_by_browsers_params.py +15 -0
  117. gcore/types/streaming/statistic_get_views_by_country_params.py +15 -0
  118. gcore/types/streaming/statistic_get_views_by_hostname_params.py +15 -0
  119. gcore/types/streaming/statistic_get_views_by_operating_system_params.py +15 -0
  120. gcore/types/streaming/statistic_get_views_by_referer_params.py +15 -0
  121. gcore/types/streaming/statistic_get_views_by_region_params.py +15 -0
  122. gcore/types/streaming/statistic_get_views_heatmap_params.py +21 -0
  123. gcore/types/streaming/statistic_get_views_params.py +34 -0
  124. gcore/types/streaming/statistic_get_vod_storage_volume_params.py +17 -0
  125. gcore/types/streaming/statistic_get_vod_transcoding_duration_params.py +17 -0
  126. gcore/types/streaming/statistic_get_vod_unique_viewers_cdn_params.py +26 -0
  127. gcore/types/streaming/statistic_get_vod_watch_time_cdn_params.py +32 -0
  128. gcore/types/streaming/statistic_get_vod_watch_time_total_cdn_params.py +30 -0
  129. gcore/types/streaming/statistic_get_vod_watch_time_total_cdn_response.py +22 -0
  130. gcore/types/streaming/storage_series.py +23 -0
  131. gcore/types/streaming/stream.py +420 -0
  132. gcore/types/streaming/stream_create_clip_params.py +48 -0
  133. gcore/types/streaming/stream_create_params.py +165 -0
  134. gcore/types/streaming/stream_list_clips_response.py +10 -0
  135. gcore/types/streaming/stream_list_params.py +18 -0
  136. gcore/types/streaming/stream_series.py +21 -0
  137. gcore/types/streaming/stream_start_recording_response.py +76 -0
  138. gcore/types/streaming/stream_update_params.py +169 -0
  139. gcore/types/streaming/streams/__init__.py +11 -0
  140. gcore/types/streaming/streams/overlay.py +43 -0
  141. gcore/types/streaming/streams/overlay_create_params.py +36 -0
  142. gcore/types/streaming/streams/overlay_create_response.py +10 -0
  143. gcore/types/streaming/streams/overlay_list_response.py +10 -0
  144. gcore/types/streaming/streams/overlay_update_multiple_params.py +39 -0
  145. gcore/types/streaming/streams/overlay_update_multiple_response.py +10 -0
  146. gcore/types/streaming/streams/overlay_update_params.py +33 -0
  147. gcore/types/streaming/subtitle.py +12 -0
  148. gcore/types/streaming/subtitle_base.py +18 -0
  149. gcore/types/streaming/subtitle_base_param.py +18 -0
  150. gcore/types/streaming/unique_viewers.py +35 -0
  151. gcore/types/streaming/unique_viewers_cdn.py +17 -0
  152. gcore/types/streaming/video.py +444 -0
  153. gcore/types/streaming/video_create_multiple_params.py +28 -0
  154. gcore/types/streaming/video_create_multiple_response.py +10 -0
  155. gcore/types/streaming/video_create_params.py +13 -0
  156. gcore/types/streaming/video_create_response.py +10 -0
  157. gcore/types/streaming/video_list_names_params.py +13 -0
  158. gcore/types/streaming/video_list_params.py +59 -0
  159. gcore/types/streaming/video_update_params.py +214 -0
  160. gcore/types/streaming/videos/__init__.py +7 -0
  161. gcore/types/streaming/videos/subtitle_create_params.py +17 -0
  162. gcore/types/streaming/videos/subtitle_list_response.py +10 -0
  163. gcore/types/streaming/videos/subtitle_update_params.py +20 -0
  164. gcore/types/streaming/views.py +35 -0
  165. gcore/types/streaming/views_by_browser.py +17 -0
  166. gcore/types/streaming/views_by_country.py +19 -0
  167. gcore/types/streaming/views_by_hostname.py +17 -0
  168. gcore/types/streaming/views_by_operating_system.py +17 -0
  169. gcore/types/streaming/views_by_referer.py +17 -0
  170. gcore/types/streaming/views_by_region.py +19 -0
  171. gcore/types/streaming/views_heatmap.py +19 -0
  172. gcore/types/streaming/vod_statistics_series.py +21 -0
  173. gcore/types/streaming/vod_total_stream_duration_series.py +22 -0
  174. gcore/types/waap/domains/custom_rule_create_params.py +4 -4
  175. gcore/types/waap/domains/custom_rule_update_params.py +4 -4
  176. gcore/types/waap/ip_info_get_blocked_requests_params.py +5 -1
  177. gcore/types/waap/ip_info_get_counts_params.py +2 -1
  178. gcore/types/waap/ip_info_get_top_sessions_params.py +5 -1
  179. gcore/types/waap/ip_info_get_top_urls_params.py +5 -1
  180. gcore/types/waap/ip_info_get_top_user_agents_params.py +5 -1
  181. gcore/types/waap/waap_custom_rule.py +4 -4
  182. {gcore-0.6.0.dist-info → gcore-0.8.0.dist-info}/METADATA +1 -1
  183. {gcore-0.6.0.dist-info → gcore-0.8.0.dist-info}/RECORD +185 -37
  184. {gcore-0.6.0.dist-info → gcore-0.8.0.dist-info}/WHEEL +0 -0
  185. {gcore-0.6.0.dist-info → gcore-0.8.0.dist-info}/licenses/LICENSE +0 -0
@@ -0,0 +1,444 @@
1
+ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ from typing import List, Optional
4
+ from typing_extensions import Literal
5
+
6
+ from ..._models import BaseModel
7
+
8
+ __all__ = ["Video", "ConvertedVideo"]
9
+
10
+
11
+ class ConvertedVideo(BaseModel):
12
+ id: Optional[int] = None
13
+ """ID of the converted file of the specific quality"""
14
+
15
+ error: Optional[str] = None
16
+ """Video processing error text in this quality"""
17
+
18
+ height: Optional[int] = None
19
+ """Height in pixels of the converted video file of the specific quality.
20
+
21
+ Can be `null` for audio-only files.
22
+ """
23
+
24
+ mp4_url: Optional[str] = None
25
+ """
26
+ A URL to a rendition file of the specified quality in MP4 format for
27
+ downloading.
28
+
29
+ **Download methods** For each converted video, additional download endpoints are
30
+ available under `converted_videos`/`mp4_urls`. An MP4 download enpoints:
31
+
32
+ - /videos/{`client_id`}\\__{slug}/{filename}.mp4
33
+ - /videos/{`client_id`}\\__{slug}/{filename}.mp4/download
34
+ - /videos/{`client_id`}\\__{slug}/{filename}.mp4/download={`custom_filename`} The
35
+ first option returns the file as is. The following options respond with the
36
+ header that directly tells browsers to download the file instead of playing it
37
+ in the browser.
38
+
39
+ ```
40
+ Content-Disposition: attachment
41
+ ```
42
+
43
+ The third option allows you to set a custom name for the file being downloaded.
44
+ You can optionally specify a custom filename (just name excluding the .mp4
45
+ extension) using the download= query. Filename Constraints
46
+
47
+ - Length: 1-255 characters
48
+ - Must NOT include the .mp4 extension (it is added automatically)
49
+ - Allowed characters: a-z, A-Z, 0-9, \\__(underscore), -(dash), .(dot)
50
+ - First character cannot be .(dot) Example valid filenames: `holiday2025`,
51
+ `_backup.final`, `clip-v1.2`
52
+
53
+ **Default MP4 file name structure** Link to the file {filename} contains
54
+ information about the encoding method using format: `___.mp4`
55
+
56
+ - ```– Internal quality identifier and file version. Please do not use it, can be changed at any time without any notice.
57
+
58
+ ```
59
+ - ```– Codec name that was used to encode the video, or audio codec if it is an audio-only file.
60
+
61
+ ```
62
+ - ```– Encoding bitrate in Kbps.
63
+
64
+ ```
65
+ - ````– Video height, or word "audio" if it is an audio-only file.
66
+ Note that this link format has been applied since 14.08.2024. If the video entity was uploaded earlier, links may have old simplified format.
67
+ Example: ``` /videos/{`client_id`}_{slug}/`qid3567v1_h264_4050_1080`.mp4 ```
68
+
69
+ ````
70
+
71
+ **Dynamic speed limiting** This mode sets different limits for different users
72
+ or for different types of content. The speed is adjusted based on requests with
73
+ the “speed” and “buffer” arguments. Example: `?speed=50k&buffer=500k` Read more
74
+ in Product Documentation in CDN section "Network limits".
75
+
76
+ **Secure token authentication (updated)** Access to MP4 download links can be
77
+ protected using secure tokens passed as query parameters. The token generation
78
+ logic has been updated to allow fine-grained protection per file and bitrate.
79
+ Token generation uses the entire MP4 path, which ensures the token only grants
80
+ access to a specific quality/version of the video. This prevents unintended
81
+ access to other bitrate versions of an ABR stream. Token Query Parameters:
82
+
83
+ - token: The generated hash
84
+ - expires: Expiration timestamp
85
+ - speed: (optional) Speed limit in bytes/sec, or empty string
86
+ - buffer: (optional) Buffer size in bytes, or empty string Optional (for
87
+ IP-bound tokens):
88
+ - ip: The user’s IP address Example:
89
+ `?md5=QX39c77lbQKvYgMMAvpyMQ&expires=1743167062` Read more in Product
90
+ Documentation in Streaming section "Protected temporarily link".
91
+
92
+ **Examples**
93
+
94
+ - Audio-only:
95
+ `` https://demo-public.gvideo.io/videos/`2675_JNnccG5l97XPxsov`/`qid3585v1_aac_128_audio`.mp4 ``
96
+ - Video:
97
+ `` https://demo-public.gvideo.io/videos/`2675_3MlggU4xDb1Ssa5Y`/`qid3567v1_h264_4050_1080`.mp4/download ``
98
+ - Video with custom download filename:
99
+ `` https://demo-public.gvideo.io/videos/`2675_XtMKxzJM6Xt7SBUV`/1080.mp4/download=`highlights_v1`.`1_2025`-05-30 ``
100
+ """
101
+
102
+ name: Optional[str] = None
103
+ """Specific quality name"""
104
+
105
+ progress: Optional[int] = None
106
+ """Status of transcoding into the specific quality, from 0 to 100"""
107
+
108
+ size: Optional[int] = None
109
+ """Size in bytes of the converted file of the specific quality.
110
+
111
+ Can be `null` until transcoding is fully completed.
112
+ """
113
+
114
+ status: Optional[Literal["processing", "complete", "error"]] = None
115
+ """Status of transcoding:
116
+
117
+ - processing – video is being transcoded to this quality,
118
+ - complete – quality is fully processed,
119
+ - error – quality processing error, see parameter "error".
120
+ """
121
+
122
+ width: Optional[int] = None
123
+ """Width in pixels of the converted video file of the specified quality.
124
+
125
+ Can be `null` for audio files.
126
+ """
127
+
128
+
129
+ class Video(BaseModel):
130
+ id: Optional[int] = None
131
+ """Video ID"""
132
+
133
+ ad_id: Optional[int] = None
134
+ """ID of ad that should be shown.
135
+
136
+ If empty the default ad is show. If there is no default ad, no ad is shownю
137
+ """
138
+
139
+ cdn_views: Optional[int] = None
140
+ """Total number of video views.
141
+
142
+ It is calculated based on the analysis of all views, no matter in which player.
143
+ """
144
+
145
+ client_id: Optional[int] = None
146
+ """Client ID"""
147
+
148
+ client_user_id: Optional[int] = None
149
+ """Custom meta field for storing the Identifier in your system.
150
+
151
+ We do not use this field in any way when processing the stream. Example:
152
+ `client_user_id = 1001`
153
+ """
154
+
155
+ converted_videos: Optional[List[ConvertedVideo]] = None
156
+ """Array of data about each transcoded quality"""
157
+
158
+ custom_iframe_url: Optional[str] = None
159
+ """Custom URL of Iframe for video player to be used in share panel in player.
160
+
161
+ Auto generated Iframe URL provided by default.
162
+ """
163
+
164
+ dash_url: Optional[str] = None
165
+ """
166
+ A URL to a master playlist MPEG-DASH (master.mpd) with CMAF or WebM based
167
+ chunks. Chunk type will be selected automatically for each quality:
168
+
169
+ - CMAF for H264 and H265 codecs.
170
+ - WebM for AV1 codec.
171
+
172
+ This URL is a link to the main manifest. But you can also manually specify
173
+ suffix-options that will allow you to change the manifest to your request:
174
+ `` /videos/{`client_id`}_{slug}/master[-min-N][-max-N][-(h264|hevc|av1)].mpd ``
175
+ List of suffix-options:
176
+
177
+ - [-min-N] – ABR soft limitation of qualities from below.
178
+ - [-max-N] – ABR soft limitation of qualities from above.
179
+ - [-(h264|hevc|av1) – Video codec soft limitation. Applicable if the video was
180
+ transcoded into multiple codecs H264, H265 and AV1 at once, but you want to
181
+ return just 1 video codec in a manifest. Read the Product Documentation for
182
+ details. Read more what is ABR soft-limiting in the "`hls_url`" field above.
183
+
184
+ Caution. Solely master.mpd is officially documented and intended for your use.
185
+ Any additional internal manifests, sub-manifests, parameters, chunk names, file
186
+ extensions, and related components are internal infrastructure entities. These
187
+ may undergo modifications without prior notice, in any manner or form. It is
188
+ strongly advised not to store them in your database or cache them on your end.
189
+ """
190
+
191
+ description: Optional[str] = None
192
+ """Additional text field for video description"""
193
+
194
+ duration: Optional[int] = None
195
+ """Video duration in milliseconds.
196
+
197
+ May differ from "`origin_video_duration`" value if the video was uploaded with
198
+ clipping through the parameters "`clip_start_seconds`" and
199
+ "`clip_duration_seconds`"
200
+ """
201
+
202
+ error: Optional[str] = None
203
+ """Video processing error text will be saved here if "status: error" """
204
+
205
+ hls_cmaf_url: Optional[str] = None
206
+ """A URL to a master playlist HLS (master-cmaf.m3u8) with CMAF-based chunks.
207
+
208
+ Chunks are in fMP4 container. It's a code-agnostic container, which allows to
209
+ use any like H264, H265, AV1, etc.
210
+
211
+ It is possible to use the same suffix-options as described in the "`hls_url`"
212
+ attribute.
213
+
214
+ Caution. Solely master.m3u8 (and master[-options].m3u8) is officially documented
215
+ and intended for your use. Any additional internal manifests, sub-manifests,
216
+ parameters, chunk names, file extensions, and related components are internal
217
+ infrastructure entities. These may undergo modifications without prior notice,
218
+ in any manner or form. It is strongly advised not to store them in your database
219
+ or cache them on your end.
220
+ """
221
+
222
+ hls_url: Optional[str] = None
223
+ """
224
+ A URL to a master playlist HLS (master.m3u8). Chunk type will be selected
225
+ automatically:
226
+
227
+ - TS if your video was encoded to H264 only.
228
+ - CMAF if your video was encoded additionally to H265 and/or AV1 codecs (as
229
+ Apple does not support these codecs over MPEG TS, and they are not
230
+ standardized in TS-container).
231
+
232
+ You can also manually specify suffix-options that will allow you to change the
233
+ manifest to your request:
234
+ `` /videos/{`client_id`}_{`video_slug`}/master[-cmaf][-min-N][-max-N][-img][-(h264|hevc|av1)].m3u8 ``
235
+ List of suffix-options:
236
+
237
+ - [-cmaf] – getting HLS CMAF version of the manifest. Look at the `hls_cmaf_url`
238
+ field.
239
+ - [-min-N] – ABR soft limitation of qualities from below.
240
+ - [-max-N] – ABR soft limitation of qualities from above.
241
+ - [-img] – Roku trick play: to add tiles directly into .m3u8 manifest. Read the
242
+ Product Documentation for details.
243
+ - [-(h264|hevc|av1) – Video codec soft limitation. Applicable if the video was
244
+ transcoded into multiple codecs H264, H265 and AV1 at once, but you want to
245
+ return just 1 video codec in a manifest. Read the Product Documentation for
246
+ details. ABR soft-limiting: Soft limitation of the list of qualities allows
247
+ you to return not the entire list of transcoded qualities for a video, but
248
+ only those you need. For more details look at the Product Documentation. For
249
+ example, the video is available in 7 qualities from 360p to 4K, but you want
250
+ to return not more than 480p only due to the conditions of distribution of
251
+ content to a specific end-user (i.e. free account):
252
+ - To a generic `.../master.m3u8` manifest
253
+ - Add a suffix-option to limit quality `.../master-max-480.m3u8`
254
+ - Add a suffix-option to limit quality and codec
255
+ `.../master-min-320-max-320-h264.m3u8`
256
+
257
+ Caution. Solely master.m3u8 (and master[-options].m3u8) is officially documented
258
+ and intended for your use. Any additional internal manifests, sub-manifests,
259
+ parameters, chunk names, file extensions, and related components are internal
260
+ infrastructure entities. These may undergo modifications without prior notice,
261
+ in any manner or form. It is strongly advised not to store them in your database
262
+ or cache them on your end.
263
+ """
264
+
265
+ iframe_url: Optional[str] = None
266
+ """A URL to a built-in HTML video player with the video inside.
267
+
268
+ It can be inserted into an iframe on your website and the video will
269
+ automatically play in all browsers. The player can be opened or shared via this
270
+ direct link. Also the video player can be integrated into your web pages using
271
+ the Iframe tag. Example of usage on a web page:
272
+
273
+ <iframe width="100%" height="100%" src="https://player.gvideo.co/videos/`2675_FnlHXwA16ZMxmUr`" frameborder="0" allow="autoplay; encrypted-media" allowfullscreen></iframe>
274
+
275
+ There are some link modificators you can specify and add manually:
276
+ - ?`no_low_latency` – player is forced to use non-low-latency streams HLS MPEG TS, instead of MPEG-DASH CMAF or HLS/LL-HLS CMAF.
277
+ - ?t=(integer) – time to start playback from specified point in the video. Applicable for VOD only.
278
+ - ?`sub_lang`=(language) – force subtitles to specific language (2 letters ISO 639 code of a language).
279
+ - Read more in the Product Documentation.
280
+ """
281
+
282
+ name: Optional[str] = None
283
+ """
284
+ Title of the video. Often used as a human-readable name of the video, but can
285
+ contain any text you wish. The values are not unique and may be repeated.
286
+ Examples:
287
+
288
+ - Educational training 2024-03-29
289
+ - Series X S3E14, The empire strikes back
290
+ - 480fd499-2de2-4988-bc1a-a4eebe9818ee
291
+ """
292
+
293
+ origin_size: Optional[int] = None
294
+ """Size of original file"""
295
+
296
+ origin_url: Optional[str] = None
297
+ """
298
+ URL to an original file from which the information for transcoding was taken.
299
+ May contain a link for scenarios:
300
+
301
+ - If the video was downloaded from another origin
302
+ - If the video is a recording of a live stream
303
+ - Otherwise it is "null" **Copy from another server** URL to an original file
304
+ that was downloaded. Look at method "Copy from another server" in POST
305
+ /videos. **Recording of an original live stream** URL to the original
306
+ non-transcoded stream recording with original quality, saved in MP4 format.
307
+ File is created immediately after the completion of the stream recording. The
308
+ stream from which the recording was made is reflected in "`stream_id`" field.
309
+ Can be used for internal operations when a recording needs to be received
310
+ faster than the transcoded versions are ready. But this version is not
311
+ intended for public distribution. Views and downloads occur in the usual way,
312
+ like viewing an MP4 rendition. The MP4 file becomes available for downloading
313
+ when the video entity "status" changes from "new" to "pending". The file is
314
+ stored for 7 days, after which it will be automatically deleted. Format of URL
315
+ is `` /videos/_/`origin__`.mp4 `` Where:
316
+ - ```– Encoding bitrate in Kbps.
317
+
318
+ ```
319
+ - ```– Video height.
320
+ This is a premium feature, available only upon request through your manager or support team.
321
+ ```
322
+ """
323
+
324
+ origin_video_duration: Optional[int] = None
325
+ """Original video duration in milliseconds"""
326
+
327
+ poster: Optional[str] = None
328
+ """
329
+ Poster is your own static image which can be displayed before the video begins
330
+ playing. This is often a frame of the video or a custom title screen. Field
331
+ contains a link to your own uploaded image. Also look at "screenshot" attribute.
332
+ """
333
+
334
+ poster_thumb: Optional[str] = None
335
+ """Field contains a link to minimized poster image.
336
+
337
+ Original "poster" image is proportionally scaled to a size of 200 pixels in
338
+ height.
339
+ """
340
+
341
+ projection: Optional[str] = None
342
+ """Regulates the video format:
343
+
344
+ - **regular** — plays the video as usual
345
+ - **vr360** — plays the video in 360 degree mode
346
+ - **vr180** — plays the video in 180 degree mode
347
+ - **vr360tb** — plays the video in 3D 360 degree mode Top-Bottom.
348
+
349
+ Default is regular
350
+ """
351
+
352
+ recording_started_at: Optional[str] = None
353
+ """
354
+ If the video was saved from a stream, then start time of the stream recording is
355
+ saved here. Format is date time in ISO 8601
356
+ """
357
+
358
+ screenshot: Optional[str] = None
359
+ """A URL to the default screenshot is here.
360
+
361
+ The image is selected from an array of all screenshots based on the
362
+ “`screenshot_id`” attribute. If you use your own "poster", the link to it will
363
+ be here too. Our video player uses this field to display the static image before
364
+ the video starts playing. As soon as the user hits "play" the image will go
365
+ away. If you use your own external video player, then you can use the value of
366
+ this field to set the poster/thumbnail in your player. Example:
367
+
368
+ - `video_js`.poster: `api.screenshot`
369
+ - clappr.poster: `api.screenshot`
370
+ """
371
+
372
+ screenshot_id: Optional[int] = None
373
+ """
374
+ ID of auto generated screenshots to be used for default screenshot. Counting
375
+ from 0. A value of -1 sets the "screenshot" attribute to the URL of your own
376
+ image from the "poster" attribute.
377
+ """
378
+
379
+ screenshots: Optional[List[str]] = None
380
+ """Array of auto generated screenshots from the video.
381
+
382
+ By default 5 static screenshots are taken from different places in the video. If
383
+ the video is short, there may be fewer screenshots. Screenshots are created
384
+ automatically, so they may contain not very good frames from the video. To use
385
+ your own image look at "poster" attribute.
386
+ """
387
+
388
+ share_url: Optional[str] = None
389
+ """
390
+ Custom URL or iframe displayed in the link field when a user clicks on a sharing
391
+ button in player. If empty, the link field and social network sharing is
392
+ disabled
393
+ """
394
+
395
+ slug: Optional[str] = None
396
+ """
397
+ A unique alphanumeric identifier used in public URLs to retrieve and view the
398
+ video. It is unique for each video, generated randomly and set automatically by
399
+ the system. Format of usage in URL is \\**.../videos/{`client_id`}\\__{slug}/...\\**
400
+ Example:
401
+
402
+ - Player: /videos/`12345_neAq1bYZ2`
403
+ - Manifest: /videos/`12345_neAq1bYZ2`/master.m3u8
404
+ - Rendition: /videos/`12345_neAq1bYZ2`/`qid90v1_720`.mp4
405
+ """
406
+
407
+ sprite: Optional[str] = None
408
+ """Link to picture with video storyboard.
409
+
410
+ Image in JPG format. The picture is a set of rectangles with frames from the
411
+ video. Typically storyboard is used to show preview images when hovering the
412
+ video's timeline.
413
+ """
414
+
415
+ sprite_vtt: Optional[str] = None
416
+ """Storyboard in VTT format.
417
+
418
+ This format implies an explicit indication of the timing and frame area from a
419
+ large sprite image.
420
+ """
421
+
422
+ status: Optional[Literal["empty", "pending", "viewable", "ready", "error"]] = None
423
+ """Video processing status:
424
+
425
+ - empty – initial status, when video-entity is created, but video-file has not
426
+ yet been fully uploaded (TUS uploading, or downloading from an origin is not
427
+ finished yet)
428
+ - pending – video is in queue to be processed
429
+ - viewable – video has at least 1 quality and can already be viewed via a link,
430
+ but not all qualities are ready yet
431
+ - ready – video is completely ready, available for viewing with all qualities
432
+ - error – error while processing a video, look at "error" field
433
+ """
434
+
435
+ stream_id: Optional[int] = None
436
+ """If the video was saved from a stream, then ID of that stream is saved here"""
437
+
438
+ views: Optional[int] = None
439
+ """
440
+ Number of video views through the built-in HTML video player of the Streaming
441
+ Platform only. This attribute does not count views from other external players
442
+ and native OS players, so here may be less number of views than in
443
+ "`cdn_views`".
444
+ """
@@ -0,0 +1,28 @@
1
+ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ from __future__ import annotations
4
+
5
+ from typing import Iterable
6
+ from typing_extensions import TypedDict
7
+
8
+ from .create_video_param import CreateVideoParam
9
+ from .subtitle_base_param import SubtitleBaseParam
10
+
11
+ __all__ = ["VideoCreateMultipleParams", "Video"]
12
+
13
+
14
+ class VideoCreateMultipleParams(TypedDict, total=False):
15
+ fields: str
16
+ """
17
+ Restriction to return only the specified attributes, instead of the entire
18
+ dataset. Specify, if you need to get short response. The following fields are
19
+ available for specifying: id, name, duration, status, `created_at`,
20
+ `updated_at`, `hls_url`, screenshots, `converted_videos`, priority. Example,
21
+ ?fields=id,name,`hls_url`
22
+ """
23
+
24
+ videos: Iterable[Video]
25
+
26
+
27
+ class Video(CreateVideoParam, total=False):
28
+ subtitles: Iterable[SubtitleBaseParam]
@@ -0,0 +1,10 @@
1
+ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ from typing import List
4
+ from typing_extensions import TypeAlias
5
+
6
+ from .video import Video
7
+
8
+ __all__ = ["VideoCreateMultipleResponse"]
9
+
10
+ VideoCreateMultipleResponse: TypeAlias = List[Video]
@@ -0,0 +1,13 @@
1
+ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ from __future__ import annotations
4
+
5
+ from typing_extensions import TypedDict
6
+
7
+ from .create_video_param import CreateVideoParam
8
+
9
+ __all__ = ["VideoCreateParams"]
10
+
11
+
12
+ class VideoCreateParams(TypedDict, total=False):
13
+ video: CreateVideoParam
@@ -0,0 +1,10 @@
1
+ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ from typing import List
4
+ from typing_extensions import TypeAlias
5
+
6
+ from .video import Video
7
+
8
+ __all__ = ["VideoCreateResponse"]
9
+
10
+ VideoCreateResponse: TypeAlias = List[Video]
@@ -0,0 +1,13 @@
1
+ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ from __future__ import annotations
4
+
5
+ from typing import Iterable
6
+ from typing_extensions import TypedDict
7
+
8
+ __all__ = ["VideoListNamesParams"]
9
+
10
+
11
+ class VideoListNamesParams(TypedDict, total=False):
12
+ ids: Iterable[int]
13
+ """Comma-separated set of video IDs. Example, ?ids=7,17"""
@@ -0,0 +1,59 @@
1
+ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ from __future__ import annotations
4
+
5
+ from typing_extensions import TypedDict
6
+
7
+ __all__ = ["VideoListParams"]
8
+
9
+
10
+ class VideoListParams(TypedDict, total=False):
11
+ id: str
12
+ """IDs of the videos to find.
13
+
14
+ You can specify one or more identifiers separated by commas. Example,
15
+ ?id=1,101,1001
16
+ """
17
+
18
+ client_user_id: int
19
+ """Find videos where "`client_user_id`" meta field is equal to the search value"""
20
+
21
+ fields: str
22
+ """
23
+ Restriction to return only the specified attributes, instead of the entire
24
+ dataset. Specify, if you need to get short response. The following fields are
25
+ available for specifying: id, name, duration, status, `created_at`,
26
+ `updated_at`, `hls_url`, screenshots, `converted_videos`, priority, `stream_id`.
27
+ Example, ?fields=id,name,`hls_url`
28
+ """
29
+
30
+ page: int
31
+ """Page number. Use it to list the paginated content"""
32
+
33
+ per_page: int
34
+ """Items per page number. Use it to list the paginated content"""
35
+
36
+ search: str
37
+ """Aggregated search condition.
38
+
39
+ If set, the video list is filtered by one combined SQL criterion:
40
+
41
+ - id={s} OR slug={s} OR name like {s} i.e. "/videos?search=1000" returns list of
42
+ videos where id=1000 or slug=1000 or name contains "1000".
43
+ """
44
+
45
+ status: str
46
+ """Use it to get videos filtered by their status. Possible values:
47
+
48
+ - empty
49
+ - pending
50
+ - viewable
51
+ - ready
52
+ - error
53
+ """
54
+
55
+ stream_id: int
56
+ """
57
+ Find videos recorded from a specific stream, so for which "`stream_id`" field is
58
+ equal to the search value
59
+ """