gcore 0.13.0__py3-none-any.whl → 0.14.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 (334) hide show
  1. gcore/__init__.py +3 -1
  2. gcore/_base_client.py +9 -9
  3. gcore/_client.py +25 -10
  4. gcore/_models.py +10 -4
  5. gcore/_qs.py +7 -7
  6. gcore/_types.py +18 -11
  7. gcore/_utils/_transform.py +2 -2
  8. gcore/_utils/_utils.py +4 -4
  9. gcore/_version.py +1 -1
  10. gcore/pagination.py +137 -0
  11. gcore/resources/__init__.py +14 -0
  12. gcore/resources/cdn/__init__.py +201 -0
  13. gcore/resources/cdn/audit_log.py +406 -0
  14. gcore/resources/cdn/cdn.py +957 -0
  15. gcore/resources/cdn/certificates.py +1062 -0
  16. gcore/resources/cdn/ip_ranges.py +224 -0
  17. gcore/resources/cdn/logs/__init__.py +33 -0
  18. gcore/resources/cdn/logs/logs.py +1424 -0
  19. gcore/resources/cdn/logs/settings.py +1081 -0
  20. gcore/resources/cdn/logs_uploader/__init__.py +61 -0
  21. gcore/resources/cdn/logs_uploader/configs.py +868 -0
  22. gcore/resources/cdn/logs_uploader/logs_uploader.py +166 -0
  23. gcore/resources/cdn/logs_uploader/policies.py +1060 -0
  24. gcore/resources/cdn/logs_uploader/targets.py +811 -0
  25. gcore/resources/cdn/metrics.py +419 -0
  26. gcore/resources/cdn/network_capacity.py +139 -0
  27. gcore/resources/cdn/origin_groups.py +1496 -0
  28. gcore/resources/cdn/resources/__init__.py +47 -0
  29. gcore/resources/cdn/resources/resources.py +2060 -0
  30. gcore/resources/cdn/resources/rules.py +1027 -0
  31. gcore/resources/cdn/resources/shield.py +259 -0
  32. gcore/resources/cdn/rule_templates.py +883 -0
  33. gcore/resources/cdn/shields.py +139 -0
  34. gcore/resources/cdn/statistics.py +1408 -0
  35. gcore/resources/cdn/trusted_ca_certificates.py +592 -0
  36. gcore/resources/cloud/audit_logs.py +33 -29
  37. gcore/resources/cloud/baremetal/flavors.py +21 -17
  38. gcore/resources/cloud/baremetal/images.py +19 -15
  39. gcore/resources/cloud/baremetal/servers.py +141 -119
  40. gcore/resources/cloud/billing_reservations.py +41 -33
  41. gcore/resources/cloud/cloud.py +24 -0
  42. gcore/resources/cloud/cost_reports.py +149 -119
  43. gcore/resources/cloud/file_shares/access_rules.py +25 -13
  44. gcore/resources/cloud/file_shares/file_shares.py +107 -71
  45. gcore/resources/cloud/floating_ips.py +101 -59
  46. gcore/resources/cloud/gpu_baremetal_clusters/flavors.py +13 -9
  47. gcore/resources/cloud/gpu_baremetal_clusters/gpu_baremetal_clusters.py +275 -65
  48. gcore/resources/cloud/gpu_baremetal_clusters/images.py +69 -53
  49. gcore/resources/cloud/gpu_baremetal_clusters/interfaces.py +9 -5
  50. gcore/resources/cloud/gpu_baremetal_clusters/servers.py +151 -127
  51. gcore/resources/cloud/inference/api_keys.py +51 -31
  52. gcore/resources/cloud/inference/applications/deployments.py +49 -31
  53. gcore/resources/cloud/inference/applications/templates.py +17 -9
  54. gcore/resources/cloud/inference/deployments/deployments.py +171 -139
  55. gcore/resources/cloud/inference/deployments/logs.py +17 -13
  56. gcore/resources/cloud/inference/flavors.py +21 -13
  57. gcore/resources/cloud/inference/inference.py +9 -5
  58. gcore/resources/cloud/inference/registry_credentials.py +45 -25
  59. gcore/resources/cloud/inference/secrets.py +45 -25
  60. gcore/resources/cloud/instances/flavors.py +17 -13
  61. gcore/resources/cloud/instances/images.py +153 -129
  62. gcore/resources/cloud/instances/instances.py +287 -213
  63. gcore/resources/cloud/instances/interfaces.py +165 -161
  64. gcore/resources/cloud/instances/metrics.py +9 -5
  65. gcore/resources/cloud/ip_ranges.py +25 -15
  66. gcore/resources/cloud/k8s/clusters/clusters.py +151 -87
  67. gcore/resources/cloud/k8s/clusters/nodes.py +19 -11
  68. gcore/resources/cloud/k8s/clusters/pools/nodes.py +19 -11
  69. gcore/resources/cloud/k8s/clusters/pools/pools.py +83 -59
  70. gcore/resources/cloud/k8s/flavors.py +13 -9
  71. gcore/resources/cloud/k8s/k8s.py +9 -5
  72. gcore/resources/cloud/load_balancers/flavors.py +11 -7
  73. gcore/resources/cloud/load_balancers/l7_policies/l7_policies.py +103 -83
  74. gcore/resources/cloud/load_balancers/l7_policies/rules.py +77 -57
  75. gcore/resources/cloud/load_balancers/listeners.py +125 -105
  76. gcore/resources/cloud/load_balancers/load_balancers.py +155 -123
  77. gcore/resources/cloud/load_balancers/metrics.py +9 -5
  78. gcore/resources/cloud/load_balancers/pools/health_monitors.py +25 -17
  79. gcore/resources/cloud/load_balancers/pools/members.py +31 -23
  80. gcore/resources/cloud/load_balancers/pools/pools.py +155 -129
  81. gcore/resources/cloud/load_balancers/statuses.py +17 -9
  82. gcore/resources/cloud/networks/networks.py +79 -55
  83. gcore/resources/cloud/networks/routers.py +75 -47
  84. gcore/resources/cloud/networks/subnets.py +105 -81
  85. gcore/resources/cloud/placement_groups.py +33 -17
  86. gcore/resources/cloud/projects.py +53 -41
  87. gcore/resources/cloud/quotas/quotas.py +25 -13
  88. gcore/resources/cloud/quotas/requests.py +41 -25
  89. gcore/resources/cloud/regions.py +25 -23
  90. gcore/resources/cloud/registries/artifacts.py +17 -9
  91. gcore/resources/cloud/registries/registries.py +55 -29
  92. gcore/resources/cloud/registries/repositories.py +17 -9
  93. gcore/resources/cloud/registries/tags.py +9 -5
  94. gcore/resources/cloud/registries/users.py +65 -35
  95. gcore/resources/cloud/reserved_fixed_ips/reserved_fixed_ips.py +123 -107
  96. gcore/resources/cloud/reserved_fixed_ips/vip.py +45 -25
  97. gcore/resources/cloud/secrets.py +43 -27
  98. gcore/resources/cloud/security_groups/rules.py +55 -43
  99. gcore/resources/cloud/security_groups/security_groups.py +79 -47
  100. gcore/resources/cloud/ssh_keys.py +51 -31
  101. gcore/resources/cloud/tasks.py +57 -45
  102. gcore/resources/cloud/usage_reports.py +27 -23
  103. gcore/resources/cloud/users/role_assignments.py +49 -33
  104. gcore/resources/cloud/volumes.py +237 -201
  105. gcore/resources/dns/dns.py +17 -13
  106. gcore/resources/dns/locations.py +29 -17
  107. gcore/resources/dns/metrics.py +13 -9
  108. gcore/resources/dns/pickers/pickers.py +5 -5
  109. gcore/resources/dns/pickers/presets.py +9 -5
  110. gcore/resources/dns/zones/dnssec.py +19 -11
  111. gcore/resources/dns/zones/rrsets.py +149 -91
  112. gcore/resources/dns/zones/zones.py +245 -187
  113. gcore/resources/fastedge/apps/apps.py +105 -89
  114. gcore/resources/fastedge/apps/logs.py +25 -21
  115. gcore/resources/fastedge/binaries.py +33 -17
  116. gcore/resources/fastedge/fastedge.py +5 -5
  117. gcore/resources/fastedge/kv_stores.py +43 -31
  118. gcore/resources/fastedge/secrets.py +69 -45
  119. gcore/resources/fastedge/statistics.py +25 -17
  120. gcore/resources/fastedge/templates.py +59 -39
  121. gcore/resources/iam/api_tokens.py +43 -27
  122. gcore/resources/iam/iam.py +5 -5
  123. gcore/resources/iam/users.py +97 -65
  124. gcore/resources/security/bgp_announces.py +27 -19
  125. gcore/resources/security/events.py +23 -19
  126. gcore/resources/security/profile_templates.py +9 -5
  127. gcore/resources/security/profiles.py +69 -45
  128. gcore/resources/storage/buckets/buckets.py +37 -25
  129. gcore/resources/storage/buckets/cors.py +19 -11
  130. gcore/resources/storage/buckets/lifecycle.py +19 -11
  131. gcore/resources/storage/buckets/policy.py +25 -13
  132. gcore/resources/storage/credentials.py +19 -15
  133. gcore/resources/storage/locations.py +13 -9
  134. gcore/resources/storage/statistics.py +39 -31
  135. gcore/resources/storage/storage.py +105 -69
  136. gcore/resources/streaming/ai_tasks.py +307 -197
  137. gcore/resources/streaming/broadcasts.py +63 -35
  138. gcore/resources/streaming/directories.py +65 -39
  139. gcore/resources/streaming/players.py +47 -31
  140. gcore/resources/streaming/playlists.py +189 -123
  141. gcore/resources/streaming/quality_sets.py +69 -39
  142. gcore/resources/streaming/restreams.py +47 -27
  143. gcore/resources/streaming/statistics.py +613 -407
  144. gcore/resources/streaming/streams/overlays.py +107 -67
  145. gcore/resources/streaming/streams/streams.py +403 -263
  146. gcore/resources/streaming/videos/subtitles.py +131 -75
  147. gcore/resources/streaming/videos/videos.py +429 -279
  148. gcore/resources/waap/advanced_rules.py +9 -5
  149. gcore/resources/waap/custom_page_sets.py +99 -75
  150. gcore/resources/waap/domains/advanced_rules.py +157 -99
  151. gcore/resources/waap/domains/api_discovery.py +71 -47
  152. gcore/resources/waap/domains/api_path_groups.py +9 -5
  153. gcore/resources/waap/domains/api_paths.py +79 -83
  154. gcore/resources/waap/domains/custom_rules.py +89 -59
  155. gcore/resources/waap/domains/domains.py +59 -41
  156. gcore/resources/waap/domains/firewall_rules.py +83 -55
  157. gcore/resources/waap/domains/insight_silences.py +59 -39
  158. gcore/resources/waap/domains/insights.py +39 -27
  159. gcore/resources/waap/domains/settings.py +21 -13
  160. gcore/resources/waap/domains/statistics.py +99 -75
  161. gcore/resources/waap/insights.py +23 -21
  162. gcore/resources/waap/ip_info/ip_info.py +65 -33
  163. gcore/resources/waap/ip_info/metrics.py +11 -7
  164. gcore/resources/waap/organizations.py +17 -13
  165. gcore/resources/waap/statistics.py +9 -5
  166. gcore/resources/waap/tags.py +17 -17
  167. gcore/resources/waap/waap.py +5 -5
  168. gcore/types/cdn/__init__.py +80 -0
  169. gcore/types/cdn/audit_log_list_params.py +73 -0
  170. gcore/types/cdn/ca_certificate.py +53 -0
  171. gcore/types/cdn/ca_certificate_list.py +10 -0
  172. gcore/types/cdn/cdn_account.py +86 -0
  173. gcore/types/cdn/cdn_account_limits.py +27 -0
  174. gcore/types/cdn/cdn_audit_log_entry.py +66 -0
  175. gcore/types/cdn/cdn_available_features.py +46 -0
  176. gcore/types/cdn/cdn_list_purge_statuses_params.py +67 -0
  177. gcore/types/cdn/cdn_log_entry.py +70 -0
  178. gcore/types/cdn/cdn_metrics.py +22 -0
  179. gcore/types/cdn/cdn_metrics_groups.py +13 -0
  180. gcore/types/cdn/cdn_metrics_values.py +19 -0
  181. gcore/types/cdn/cdn_resource.py +1977 -0
  182. gcore/types/cdn/cdn_resource_list.py +10 -0
  183. gcore/types/cdn/cdn_update_account_params.py +15 -0
  184. gcore/types/cdn/certificate_create_params.py +51 -0
  185. gcore/types/cdn/certificate_get_status_params.py +14 -0
  186. gcore/types/cdn/certificate_list_params.py +29 -0
  187. gcore/types/cdn/certificate_replace_params.py +39 -0
  188. gcore/types/cdn/log_download_params.py +279 -0
  189. gcore/types/cdn/log_list_params.py +273 -0
  190. gcore/types/cdn/logs/__init__.py +7 -0
  191. gcore/types/cdn/logs/log_settings.py +172 -0
  192. gcore/types/cdn/logs/setting_create_params.py +200 -0
  193. gcore/types/cdn/logs/setting_update_params.py +200 -0
  194. gcore/types/cdn/logs_aggregated_stats.py +23 -0
  195. gcore/types/cdn/logs_uploader/__init__.py +23 -0
  196. gcore/types/cdn/logs_uploader/config_create_params.py +32 -0
  197. gcore/types/cdn/logs_uploader/config_list_params.py +16 -0
  198. gcore/types/cdn/logs_uploader/config_replace_params.py +32 -0
  199. gcore/types/cdn/logs_uploader/config_update_params.py +32 -0
  200. gcore/types/cdn/logs_uploader/logs_uploader_config.py +51 -0
  201. gcore/types/cdn/logs_uploader/logs_uploader_config_list.py +10 -0
  202. gcore/types/cdn/logs_uploader/logs_uploader_policy.py +73 -0
  203. gcore/types/cdn/logs_uploader/logs_uploader_policy_list.py +10 -0
  204. gcore/types/cdn/logs_uploader/logs_uploader_target.py +236 -0
  205. gcore/types/cdn/logs_uploader/logs_uploader_target_list.py +10 -0
  206. gcore/types/cdn/logs_uploader/policy_create_params.py +61 -0
  207. gcore/types/cdn/logs_uploader/policy_list_fields_response.py +8 -0
  208. gcore/types/cdn/logs_uploader/policy_list_params.py +16 -0
  209. gcore/types/cdn/logs_uploader/policy_replace_params.py +61 -0
  210. gcore/types/cdn/logs_uploader/policy_update_params.py +61 -0
  211. gcore/types/cdn/logs_uploader/target_create_params.py +249 -0
  212. gcore/types/cdn/logs_uploader/target_list_params.py +16 -0
  213. gcore/types/cdn/logs_uploader/target_replace_params.py +249 -0
  214. gcore/types/cdn/logs_uploader/target_update_params.py +249 -0
  215. gcore/types/cdn/logs_uploader_validation.py +23 -0
  216. gcore/types/cdn/metric_list_params.py +168 -0
  217. gcore/types/cdn/network_capacity.py +22 -0
  218. gcore/types/cdn/origin_group_create_params.py +184 -0
  219. gcore/types/cdn/origin_group_list_params.py +24 -0
  220. gcore/types/cdn/origin_group_replace_params.py +190 -0
  221. gcore/types/cdn/origin_group_update_params.py +190 -0
  222. gcore/types/cdn/origin_groups.py +212 -0
  223. gcore/types/cdn/origin_groups_list.py +10 -0
  224. gcore/types/cdn/public_ip_list.py +15 -0
  225. gcore/types/cdn/public_network_list.py +15 -0
  226. gcore/types/cdn/purge_status.py +55 -0
  227. gcore/types/cdn/resource_aggregated_stats.py +80 -0
  228. gcore/types/cdn/resource_create_params.py +1825 -0
  229. gcore/types/cdn/resource_list_params.py +107 -0
  230. gcore/types/cdn/resource_prefetch_params.py +17 -0
  231. gcore/types/cdn/resource_purge_params.py +71 -0
  232. gcore/types/cdn/resource_replace_params.py +1803 -0
  233. gcore/types/cdn/resource_update_params.py +1794 -0
  234. gcore/types/cdn/resource_usage_stats.py +111 -0
  235. gcore/types/cdn/resources/__init__.py +11 -0
  236. gcore/types/cdn/resources/cdn_resource_rule.py +1695 -0
  237. gcore/types/cdn/resources/origin_shielding.py +15 -0
  238. gcore/types/cdn/resources/rule_create_params.py +1652 -0
  239. gcore/types/cdn/resources/rule_list_response.py +10 -0
  240. gcore/types/cdn/resources/rule_replace_params.py +1654 -0
  241. gcore/types/cdn/resources/rule_update_params.py +1654 -0
  242. gcore/types/cdn/resources/shield_replace_params.py +16 -0
  243. gcore/types/cdn/rule_template.py +1666 -0
  244. gcore/types/cdn/rule_template_create_params.py +1636 -0
  245. gcore/types/cdn/rule_template_list.py +10 -0
  246. gcore/types/cdn/rule_template_replace_params.py +1636 -0
  247. gcore/types/cdn/rule_template_update_params.py +1636 -0
  248. gcore/types/cdn/shield_aggregated_stats.py +23 -0
  249. gcore/types/cdn/shield_list_response.py +25 -0
  250. gcore/types/cdn/ssl_detail.py +62 -0
  251. gcore/types/cdn/ssl_detail_list.py +10 -0
  252. gcore/types/cdn/ssl_request_status.py +135 -0
  253. gcore/types/cdn/statistic_get_logs_usage_aggregated_params.py +42 -0
  254. gcore/types/cdn/statistic_get_logs_usage_series_params.py +35 -0
  255. gcore/types/cdn/statistic_get_resource_usage_aggregated_params.py +151 -0
  256. gcore/types/cdn/statistic_get_resource_usage_series_params.py +131 -0
  257. gcore/types/cdn/statistic_get_shield_usage_aggregated_params.py +42 -0
  258. gcore/types/cdn/statistic_get_shield_usage_series_params.py +25 -0
  259. gcore/types/cdn/trusted_ca_certificate_create_params.py +23 -0
  260. gcore/types/cdn/trusted_ca_certificate_list_params.py +29 -0
  261. gcore/types/cdn/trusted_ca_certificate_replace_params.py +15 -0
  262. gcore/types/cdn/usage_series_stats.py +31 -0
  263. gcore/types/cloud/__init__.py +1 -0
  264. gcore/types/cloud/file_share.py +4 -0
  265. gcore/types/cloud/file_share_create_params.py +20 -0
  266. gcore/types/cloud/file_share_update_params.py +40 -3
  267. gcore/types/cloud/floating_ip_update_params.py +3 -1
  268. gcore/types/cloud/gpu_baremetal_cluster_action_params.py +46 -0
  269. gcore/types/cloud/inference/inference_deployment.py +3 -1
  270. gcore/types/cloud/instance_create_params.py +3 -1
  271. gcore/types/cloud/k8s/cluster_create_params.py +46 -4
  272. gcore/types/cloud/k8s/cluster_update_params.py +60 -6
  273. gcore/types/cloud/k8s/clusters/pool_update_params.py +1 -1
  274. gcore/types/cloud/k8s/k8s_cluster.py +40 -3
  275. gcore/types/cloud/load_balancer_update_params.py +3 -1
  276. gcore/types/cloud/network_update_params.py +3 -1
  277. gcore/types/cloud/networks/subnet_update_params.py +3 -1
  278. gcore/types/cloud/registries/user_create_multiple_params.py +5 -3
  279. gcore/types/cloud/registries/user_create_params.py +5 -3
  280. gcore/types/cloud/registry_create_params.py +5 -3
  281. gcore/types/cloud/security_group_update_params.py +3 -1
  282. gcore/types/cloud/ssh_key_created.py +6 -3
  283. gcore/types/cloud/volume_update_params.py +3 -1
  284. gcore/types/dns/zone_get_statistics_params.py +12 -9
  285. gcore/types/dns/zone_get_statistics_response.py +3 -1
  286. gcore/types/dns/zone_import_params.py +21 -15
  287. gcore/types/dns/zones/dns_output_rrset.py +7 -3
  288. gcore/types/iam/account_overview.py +7 -2
  289. gcore/types/iam/user.py +7 -2
  290. gcore/types/iam/user_detailed.py +7 -2
  291. gcore/types/iam/user_invite_params.py +4 -1
  292. gcore/types/iam/user_update.py +7 -2
  293. gcore/types/iam/user_update_params.py +7 -2
  294. gcore/types/streaming/ai_contentmoderation_hardnudity.py +6 -4
  295. gcore/types/streaming/ai_contentmoderation_nsfw.py +6 -4
  296. gcore/types/streaming/ai_contentmoderation_softnudity.py +6 -4
  297. gcore/types/streaming/ai_contentmoderation_sport.py +6 -4
  298. gcore/types/streaming/ai_task.py +20 -11
  299. gcore/types/streaming/ai_task_create_params.py +20 -11
  300. gcore/types/streaming/ai_task_get_response.py +5 -4
  301. gcore/types/streaming/ai_task_list_params.py +11 -5
  302. gcore/types/streaming/clip.py +33 -22
  303. gcore/types/streaming/create_video_param.py +75 -43
  304. gcore/types/streaming/playlist.py +7 -5
  305. gcore/types/streaming/playlist_create_params.py +7 -5
  306. gcore/types/streaming/playlist_update_params.py +7 -5
  307. gcore/types/streaming/playlist_video.py +75 -43
  308. gcore/types/streaming/statistic_get_unique_viewers_cdn_params.py +7 -4
  309. gcore/types/streaming/stream.py +207 -136
  310. gcore/types/streaming/stream_create_clip_params.py +33 -22
  311. gcore/types/streaming/stream_create_params.py +41 -24
  312. gcore/types/streaming/stream_update_params.py +41 -24
  313. gcore/types/streaming/video.py +138 -76
  314. gcore/types/streaming/video_list_params.py +4 -2
  315. gcore/types/streaming/video_update_params.py +75 -43
  316. gcore/types/waap/domain_update_params.py +2 -2
  317. gcore/types/waap/domains/advanced_rule_create_params.py +26 -18
  318. gcore/types/waap/domains/advanced_rule_list_params.py +10 -7
  319. gcore/types/waap/domains/advanced_rule_update_params.py +22 -17
  320. gcore/types/waap/domains/api_path_create_params.py +0 -3
  321. gcore/types/waap/domains/api_path_update_params.py +1 -3
  322. gcore/types/waap/domains/custom_rule_create_params.py +36 -35
  323. gcore/types/waap/domains/custom_rule_update_params.py +31 -33
  324. gcore/types/waap/domains/firewall_rule_create_params.py +6 -6
  325. gcore/types/waap/domains/firewall_rule_update_params.py +5 -5
  326. gcore/types/waap/domains/waap_advanced_rule.py +17 -9
  327. gcore/types/waap/domains/waap_custom_rule.py +5 -2
  328. gcore/types/waap/domains/waap_firewall_rule.py +1 -1
  329. gcore/types/waap/domains/waap_insight.py +1 -1
  330. gcore/types/waap/insight_list_types_params.py +1 -1
  331. {gcore-0.13.0.dist-info → gcore-0.14.0.dist-info}/METADATA +1 -1
  332. {gcore-0.13.0.dist-info → gcore-0.14.0.dist-info}/RECORD +334 -214
  333. {gcore-0.13.0.dist-info → gcore-0.14.0.dist-info}/WHEEL +0 -0
  334. {gcore-0.13.0.dist-info → gcore-0.14.0.dist-info}/licenses/LICENSE +0 -0
@@ -7,7 +7,7 @@ from typing_extensions import Literal
7
7
 
8
8
  import httpx
9
9
 
10
- from ...._types import NOT_GIVEN, Body, Query, Headers, NoneType, NotGiven
10
+ from ...._types import Body, Omit, Query, Headers, NoneType, NotGiven, omit, not_given
11
11
  from ...._utils import maybe_transform, async_maybe_transform
12
12
  from .subtitles import (
13
13
  SubtitlesResource,
@@ -70,19 +70,21 @@ class VideosResource(SyncAPIResource):
70
70
  def create(
71
71
  self,
72
72
  *,
73
- video: CreateVideoParam | NotGiven = NOT_GIVEN,
73
+ video: CreateVideoParam | Omit = omit,
74
74
  # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
75
75
  # The extra values given here take precedence over values defined on the client or passed to this method.
76
76
  extra_headers: Headers | None = None,
77
77
  extra_query: Query | None = None,
78
78
  extra_body: Body | None = None,
79
- timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
79
+ timeout: float | httpx.Timeout | None | NotGiven = not_given,
80
80
  ) -> VideoCreateResponse:
81
81
  """
82
82
  Use this method to create a new video entity.
83
83
 
84
- **Methods of creating** To upload the original video file to the server, there
85
- are several possible scenarios:
84
+ **Methods of creating**
85
+
86
+ To upload the original video file to the server, there are several possible
87
+ scenarios:
86
88
 
87
89
  - **Copy from another server** – If your video is accessable via "http://",
88
90
  "https://", or "sftp://" public link, then you can use this method to copy a
@@ -91,20 +93,26 @@ class VideosResource(SyncAPIResource):
91
93
  execution file will be uploaded and will be sent to transcoding automatically,
92
94
  you don't have to do anything else. Use extra field `origin_http_headers` if
93
95
  authorization is required on the external server.
96
+
94
97
  - **Direct upload from a local device** – If you need to upload video directly
95
98
  from your local device or from a mobile app, then use this method. Keep
96
99
  `origin_url` empty and use TUS protocol ([tus.io](https://tus.io)) to upload
97
100
  file. More details are here
98
101
  ["Get TUS' upload"](/docs/api-reference/streaming/videos/get-tus-parameters-for-direct-upload)
99
- After getting the video, it is processed through the queue. There are 2
100
- priority criteria: global and local. Global is determined automatically by the
101
- system as converters are ready to get next video, so your videos rarely queue
102
- longer than usual (when you don't have a dedicated region). Local priority
103
- works at the level of your account and you have full control over it, look at
104
- "priority" attribute.
105
102
 
106
- **AI processing** When uploading a video, it is possible to automatically create
107
- subtitles based on AI. Read more:
103
+ After getting the video, it is processed through the queue. There are 2 priority
104
+ criteria: global and local. Global is determined automatically by the system as
105
+ converters are ready to get next video, so your videos rarely queue longer than
106
+ usual (when you don't have a dedicated region). Local priority works at the
107
+ level of your account and you have full control over it, look at "priority"
108
+ attribute.
109
+
110
+ **AI processing**
111
+
112
+ When uploading a video, it is possible to automatically create subtitles based
113
+ on AI.
114
+
115
+ Read more:
108
116
 
109
117
  - What is
110
118
  ["AI Speech Recognition"](/docs/api-reference/streaming/ai/create-ai-asr-task).
@@ -119,21 +127,26 @@ class VideosResource(SyncAPIResource):
119
127
  subtitle will be generated for each specified language.
120
128
  - How to
121
129
  ["add AI-generated subtitles to an exist video"](/docs/api-reference/streaming/subtitles/add-subtitle).
122
- The created AI-task(s) will be automatically executed, and result will also be
123
- automatically attached to this video as subtitle(s). Please note that
124
- transcription is done automatically for all videos uploaded to our video
125
- hosting. If necessary, you can disable automatic creation of subtitles. If AI
126
- is disabled in your account, no AI functionality is called.
127
-
128
- **Advanced Features** For details on the requirements for incoming original
129
- files, and output video parameters after transcoding, refer to the Knowledge
130
- Base documentation. By default video will be transcoded according to the
131
- original resolution, and a quality ladder suitable for your original video will
132
- be applied. There is no automatic upscaling; the maximum quality is taken from
133
- the original video. If you want to upload specific files not explicitly listed
134
- in requirements or wish to modify the standard quality ladder (i.e. decrease
135
- quality or add new non-standard qualities), then such customization is possible.
136
- Please reach out to us for assistance.
130
+
131
+ The created AI-task(s) will be automatically executed, and result will also be
132
+ automatically attached to this video as subtitle(s).
133
+
134
+ Please note that transcription is done automatically for all videos uploaded to
135
+ our video hosting. If necessary, you can disable automatic creation of
136
+ subtitles. If AI is disabled in your account, no AI functionality is called.
137
+
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.
137
150
 
138
151
  Additionally, check the Knowledge Base for any supplementary information you may
139
152
  need.
@@ -148,7 +161,7 @@ class VideosResource(SyncAPIResource):
148
161
  timeout: Override the client-level default timeout for this request, in seconds
149
162
  """
150
163
  return self._post(
151
- "/streaming/videos",
164
+ "/streaming/videos" if self._client._base_url_overridden else "https://api.gcore.com//streaming/videos",
152
165
  body=maybe_transform({"video": video}, video_create_params.VideoCreateParams),
153
166
  options=make_request_options(
154
167
  extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
@@ -161,52 +174,56 @@ class VideosResource(SyncAPIResource):
161
174
  video_id: int,
162
175
  *,
163
176
  name: str,
164
- auto_transcribe_audio_language: Literal["disable", "auto", "<language_code>"] | NotGiven = NOT_GIVEN,
165
- auto_translate_subtitles_language: Literal["disable", "default", "<language_codes,>"] | NotGiven = NOT_GIVEN,
166
- client_user_id: int | NotGiven = NOT_GIVEN,
167
- clip_duration_seconds: int | NotGiven = NOT_GIVEN,
168
- clip_start_seconds: int | NotGiven = NOT_GIVEN,
169
- custom_iframe_url: str | NotGiven = NOT_GIVEN,
170
- description: str | NotGiven = NOT_GIVEN,
171
- directory_id: int | NotGiven = NOT_GIVEN,
172
- origin_http_headers: str | NotGiven = NOT_GIVEN,
173
- origin_url: str | NotGiven = NOT_GIVEN,
174
- poster: str | NotGiven = NOT_GIVEN,
175
- priority: int | NotGiven = NOT_GIVEN,
176
- projection: str | NotGiven = NOT_GIVEN,
177
- quality_set_id: int | NotGiven = NOT_GIVEN,
178
- remote_poster_url: str | NotGiven = NOT_GIVEN,
179
- remove_poster: bool | NotGiven = NOT_GIVEN,
180
- screenshot_id: int | NotGiven = NOT_GIVEN,
181
- share_url: str | NotGiven = NOT_GIVEN,
182
- source_bitrate_limit: bool | NotGiven = NOT_GIVEN,
177
+ auto_transcribe_audio_language: Literal["disable", "auto", "<language_code>"] | Omit = omit,
178
+ auto_translate_subtitles_language: Literal["disable", "default", "<language_codes,>"] | Omit = omit,
179
+ client_user_id: int | Omit = omit,
180
+ clip_duration_seconds: int | Omit = omit,
181
+ clip_start_seconds: int | Omit = omit,
182
+ custom_iframe_url: str | Omit = omit,
183
+ description: str | Omit = omit,
184
+ directory_id: int | Omit = omit,
185
+ origin_http_headers: str | Omit = omit,
186
+ origin_url: str | Omit = omit,
187
+ poster: str | Omit = omit,
188
+ priority: int | Omit = omit,
189
+ projection: str | Omit = omit,
190
+ quality_set_id: int | Omit = omit,
191
+ remote_poster_url: str | Omit = omit,
192
+ remove_poster: bool | Omit = omit,
193
+ screenshot_id: int | Omit = omit,
194
+ share_url: str | Omit = omit,
195
+ source_bitrate_limit: bool | Omit = omit,
183
196
  # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
184
197
  # The extra values given here take precedence over values defined on the client or passed to this method.
185
198
  extra_headers: Headers | None = None,
186
199
  extra_query: Query | None = None,
187
200
  extra_body: Body | None = None,
188
- timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
201
+ timeout: float | httpx.Timeout | None | NotGiven = not_given,
189
202
  ) -> Video:
190
- """Changes parameters of the video to new values.
203
+ """
204
+ Changes parameters of the video to new values.
191
205
 
192
- It's allowed to update only those
193
- public parameters that are described in POST method to create a new “video”
194
- entity. So it's not possible to change calculated parameters like "id",
195
- "duration", "`hls_url`", etc. Examples of changing:
206
+ It's allowed to update only those public parameters that are described in POST
207
+ method to create a new “video” entity. So it's not possible to change calculated
208
+ parameters like "id", "duration", "`hls_url`", etc.
209
+
210
+ Examples of changing:
196
211
 
197
212
  - Name: `{ "name": "new name of the video" }`
198
- - Move the video to a new directory: ` { "directory_id": 200 }` Please note that
199
- some parameters are used on initial step (before transcoding) only, so after
200
- transcoding there is no use in changing their values. For example,
201
- "`origin_url`" parameter is used for downloading an original file from a
202
- source and never used after transcoding; or "priority" parameter is used to
203
- set priority of processing and never used after transcoding.
213
+ - Move the video to a new directory: ` { "directory_id": 200 }`
214
+
215
+ Please note that some parameters are used on initial step (before transcoding)
216
+ only, so after transcoding there is no use in changing their values. For
217
+ example, "`origin_url`" parameter is used for downloading an original file from
218
+ a source and never used after transcoding; or "priority" parameter is used to
219
+ set priority of processing and never used after transcoding.
204
220
 
205
221
  Args:
206
222
  name: Video name
207
223
 
208
- auto_transcribe_audio_language:
209
- Automatic creation of subtitles by transcribing the audio track. Values:
224
+ auto_transcribe_audio_language: Automatic creation of subtitles by transcribing the audio track.
225
+
226
+ Values:
210
227
 
211
228
  - disable – Do not transcribe.
212
229
  - auto – Automatically detects the activation of the option based on the
@@ -216,7 +233,9 @@ class VideosResource(SyncAPIResource):
216
233
  language spoken in the audio track, or when auto language detection fails.
217
234
  Language is set by 3-letter language code according to ISO-639-2
218
235
  (bibliographic code). List of languages is available in `audio_language`
219
- attribute of API POST /streaming/ai/transcribe . Example:
236
+ attribute of API POST /streaming/ai/transcribe .
237
+
238
+ Example:
220
239
 
221
240
  ```
222
241
  auto_transcribe_audio_language: "auto"
@@ -232,15 +251,23 @@ class VideosResource(SyncAPIResource):
232
251
 
233
252
  auto_translate_subtitles_language: Automatic translation of auto-transcribed subtitles to the specified
234
253
  language(s). Can be used both together with `auto_transcribe_audio_language`
235
- option only. Use it when you want to make automatic subtitles in languages other
236
- than the original language in audio. Values:
254
+ option only.
255
+
256
+ Use it when you want to make automatic subtitles in languages other than the
257
+ original language in audio.
258
+
259
+ Values:
237
260
 
238
261
  - disable – Do not translate.
239
262
  - default – There are 3 default languages: eng,fre,ger
240
263
  - \\ – Explicit language to translate to, or list of languages separated by a
241
264
  comma. Look at list of available languages in description of AI ASR task
242
- creation. If several languages are specified for translation, a separate
243
- subtitle will be generated for each language. Example:
265
+ creation.
266
+
267
+ If several languages are specified for translation, a separate subtitle will be
268
+ generated for each language.
269
+
270
+ Example:
244
271
 
245
272
  ```
246
273
  auto_translate_subtitles_language: default
@@ -260,8 +287,10 @@ class VideosResource(SyncAPIResource):
260
287
  length if the video, then you can provide timecodes of starting point and
261
288
  duration of a segment to process. Start encoding from is a number in seconds.
262
289
 
263
- custom_iframe_url: Deprecated. Custom URL of IFrame for video player to be used in share panel in
264
- player. Auto generated IFrame URL provided by default
290
+ custom_iframe_url: Deprecated.
291
+
292
+ Custom URL of IFrame for video player to be used in share panel in player. Auto
293
+ generated IFrame URL provided by default
265
294
 
266
295
  description: Video details; not visible to the end-users
267
296
 
@@ -269,8 +298,11 @@ class VideosResource(SyncAPIResource):
269
298
 
270
299
  origin_http_headers: Authorization HTTP request header. Will be used as credentials to authenticate a
271
300
  request to download a file (specified in "`origin_url`" parameter) on an
272
- external server. Syntax:
273
- `Authorization: <auth-scheme> <authorization-parameters>` Examples:
301
+ external server.
302
+
303
+ Syntax: `Authorization: <auth-scheme> <authorization-parameters>`
304
+
305
+ Examples:
274
306
 
275
307
  - "`origin_http_headers`": "Authorization: Basic ..."
276
308
  - "`origin_http_headers`": "Authorization: Bearer ..."
@@ -292,14 +324,20 @@ class VideosResource(SyncAPIResource):
292
324
  transcoding.
293
325
 
294
326
  poster: Poster is your own static image which can be displayed before the video starts.
327
+
295
328
  After uploading the video, the system will automatically create several
296
329
  screenshots (they will be stored in "screenshots" attribute) from which you can
297
330
  select an default screenshot. This "poster" field is for uploading your own
298
331
  image. Also use attribute "`screenshot_id`" to select poster as a default
299
- screnshot. Attribute accepts single image as base64-encoded string
332
+ screnshot.
333
+
334
+ Attribute accepts single image as base64-encoded string
300
335
  [(RFC 2397 – The "data" URL scheme)](https://www.rfc-editor.org/rfc/rfc2397). In
301
- format: `data:[<mediatype>];base64,<data>` MIME-types are image/jpeg,
302
- image/webp, and image/png and file sizes up to 1Mb. Examples:
336
+ format: `data:[<mediatype>];base64,<data>`
337
+
338
+ MIME-types are image/jpeg, image/webp, and image/png and file sizes up to 1Mb.
339
+
340
+ Examples:
303
341
 
304
342
  - `data:image/jpeg;base64,/9j/4AA...qf/2Q==`
305
343
  - `data:image/png;base64,iVBORw0KGg...ggg==`
@@ -307,12 +345,14 @@ class VideosResource(SyncAPIResource):
307
345
 
308
346
  priority: Priority allows you to adjust the urgency of processing some videos before
309
347
  others in your account, if your algorithm requires it. For example, when there
310
- are very urgent video and some regular ones that can wait in the queue. Value
311
- range, integer [-10..10]. -10 is the lowest down-priority, 10 is the highest
312
- up-priority. Default priority is 0.
348
+ are very urgent video and some regular ones that can wait in the queue.
349
+
350
+ Value range, integer [-10..10]. -10 is the lowest down-priority, 10 is the
351
+ highest up-priority. Default priority is 0.
352
+
353
+ projection: Deprecated.
313
354
 
314
- projection:
315
- Deprecated. Regulates the video format:
355
+ Regulates the video format:
316
356
 
317
357
  - **regular** — plays the video as usual
318
358
  - **vr360** — plays the video in 360 degree mode
@@ -325,21 +365,29 @@ class VideosResource(SyncAPIResource):
325
365
  your conditions. Look at GET /`quality_sets` method
326
366
 
327
367
  remote_poster_url: Poster URL to download from external resource, instead of uploading via "poster"
328
- attribute. It has the same restrictions as "poster" attribute.
368
+ attribute.
369
+
370
+ It has the same restrictions as "poster" attribute.
329
371
 
330
372
  remove_poster: Set it to true to remove poster
331
373
 
332
- screenshot_id: Default screenshot index. Specify an ID from the "screenshots" array, so that
333
- the URL of the required screenshot appears in the "screenshot" attribute as the
334
- default screenshot. By default 5 static screenshots will be taken from different
335
- places in the video after transcoding. If the video is short, there may be fewer
336
- screenshots. Counting from 0. A value of -1 sets the default screenshot to the
337
- URL of your own image from the "poster" attribute. Look at "screenshot"
338
- attribute in GET /videos/{`video_id`} for details.
374
+ screenshot_id: Default screenshot index.
375
+
376
+ Specify an ID from the "screenshots" array, so that the URL of the required
377
+ screenshot appears in the "screenshot" attribute as the default screenshot. By
378
+ default 5 static screenshots will be taken from different places in the video
379
+ after transcoding. If the video is short, there may be fewer screenshots.
380
+
381
+ Counting from 0. A value of -1 sets the default screenshot to the URL of your
382
+ own image from the "poster" attribute.
383
+
384
+ Look at "screenshot" attribute in GET /videos/{`video_id`} for details.
385
+
386
+ share_url: Deprecated.
339
387
 
340
- share_url: Deprecated. Custom URL or iframe displayed in the link field when a user clicks
341
- on a sharing button in player. If empty, the link field and social network
342
- sharing is disabled
388
+ Custom URL or iframe displayed in the link field when a user clicks on a sharing
389
+ button in player. If empty, the link field and social network sharing is
390
+ disabled
343
391
 
344
392
  source_bitrate_limit: The option allows you to set the video transcoding rule so that the output
345
393
  bitrate in ABR ladder is not exceeding the bitrate of the original video.
@@ -349,18 +397,21 @@ class VideosResource(SyncAPIResource):
349
397
  By default `source_bitrate_limit: true` this option allows you to have the
350
398
  output bitrate not more than in the original video, thus to transcode video
351
399
  faster and to deliver it to end-viewers faster as well. At the same time, the
352
- quality will be similar to the original. If for some reason you need more
353
- byte-space in the output quality when encoding, you can set this option to
354
- `source_bitrate_limit: false`. Then, when transcoding, the quality ceiling will
355
- be raised from the bitrate of the original video to the maximum possible limit
356
- specified in our the Product Documentation. For example, this may be needed
357
- when:
400
+ quality will be similar to the original.
401
+
402
+ If for some reason you need more byte-space in the output quality when encoding,
403
+ you can set this option to `source_bitrate_limit: false`. Then, when
404
+ transcoding, the quality ceiling will be raised from the bitrate of the original
405
+ video to the maximum possible limit specified in our the Product Documentation.
406
+ For example, this may be needed when:
358
407
 
359
408
  - to improve the visual quality parameters using PSNR, SSIM, VMAF metrics,
360
409
  - to improve the picture quality on dynamic scenes,
361
- - etc. The option is applied only at the video creation stage and cannot be
362
- changed later. If you want to re-transcode the video using new value, then you
363
- need to create and upload a new video only.
410
+ - etc.
411
+
412
+ The option is applied only at the video creation stage and cannot be changed
413
+ later. If you want to re-transcode the video using new value, then you need to
414
+ create and upload a new video only.
364
415
 
365
416
  extra_headers: Send extra headers
366
417
 
@@ -371,7 +422,9 @@ class VideosResource(SyncAPIResource):
371
422
  timeout: Override the client-level default timeout for this request, in seconds
372
423
  """
373
424
  return self._patch(
374
- f"/streaming/videos/{video_id}",
425
+ f"/streaming/videos/{video_id}"
426
+ if self._client._base_url_overridden
427
+ else f"https://api.gcore.com//streaming/videos/{video_id}",
375
428
  body=maybe_transform(
376
429
  {
377
430
  "name": name,
@@ -406,20 +459,20 @@ class VideosResource(SyncAPIResource):
406
459
  def list(
407
460
  self,
408
461
  *,
409
- id: str | NotGiven = NOT_GIVEN,
410
- client_user_id: int | NotGiven = NOT_GIVEN,
411
- fields: str | NotGiven = NOT_GIVEN,
412
- page: int | NotGiven = NOT_GIVEN,
413
- per_page: int | NotGiven = NOT_GIVEN,
414
- search: str | NotGiven = NOT_GIVEN,
415
- status: str | NotGiven = NOT_GIVEN,
416
- stream_id: int | NotGiven = NOT_GIVEN,
462
+ id: str | Omit = omit,
463
+ client_user_id: int | Omit = omit,
464
+ fields: str | Omit = omit,
465
+ page: int | Omit = omit,
466
+ per_page: int | Omit = omit,
467
+ search: str | Omit = omit,
468
+ status: str | Omit = omit,
469
+ stream_id: int | Omit = omit,
417
470
  # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
418
471
  # The extra values given here take precedence over values defined on the client or passed to this method.
419
472
  extra_headers: Headers | None = None,
420
473
  extra_query: Query | None = None,
421
474
  extra_body: Body | None = None,
422
- timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
475
+ timeout: float | httpx.Timeout | None | NotGiven = not_given,
423
476
  ) -> SyncPageStreaming[Video]:
424
477
  """
425
478
  Returns a set of videos by the given criteria.
@@ -443,8 +496,10 @@ class VideosResource(SyncAPIResource):
443
496
  search: Aggregated search condition. If set, the video list is filtered by one combined
444
497
  SQL criterion:
445
498
 
446
- - id={s} OR slug={s} OR name like {s} i.e. "/videos?search=1000" returns list of
447
- videos where id=1000 or slug=1000 or name contains "1000".
499
+ - id={s} OR slug={s} OR name like {s}
500
+
501
+ i.e. "/videos?search=1000" returns list of videos where id=1000 or slug=1000 or
502
+ name contains "1000".
448
503
 
449
504
  status:
450
505
  Use it to get videos filtered by their status. Possible values:
@@ -467,7 +522,7 @@ class VideosResource(SyncAPIResource):
467
522
  timeout: Override the client-level default timeout for this request, in seconds
468
523
  """
469
524
  return self._get_api_list(
470
- "/streaming/videos",
525
+ "/streaming/videos" if self._client._base_url_overridden else "https://api.gcore.com//streaming/videos",
471
526
  page=SyncPageStreaming[Video],
472
527
  options=make_request_options(
473
528
  extra_headers=extra_headers,
@@ -500,15 +555,17 @@ class VideosResource(SyncAPIResource):
500
555
  extra_headers: Headers | None = None,
501
556
  extra_query: Query | None = None,
502
557
  extra_body: Body | None = None,
503
- timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
558
+ timeout: float | httpx.Timeout | None | NotGiven = not_given,
504
559
  ) -> None:
505
560
  """
506
561
  Operation to delete video entity.
507
562
 
508
563
  When you delete a video, all transcoded qualities and all associated files such
509
564
  as subtitles and screenshots, as well as other data, are deleted from cloud
510
- storage. The video is deleted permanently and irreversibly. Therefore, it is
511
- impossible to restore files after this.
565
+ storage.
566
+
567
+ The video is deleted permanently and irreversibly. Therefore, it is impossible
568
+ to restore files after this.
512
569
 
513
570
  For detailed information and information on calculating your maximum monthly
514
571
  storage usage, please refer to the Product Documentation.
@@ -524,7 +581,9 @@ class VideosResource(SyncAPIResource):
524
581
  """
525
582
  extra_headers = {"Accept": "*/*", **(extra_headers or {})}
526
583
  return self._delete(
527
- f"/streaming/videos/{video_id}",
584
+ f"/streaming/videos/{video_id}"
585
+ if self._client._base_url_overridden
586
+ else f"https://api.gcore.com//streaming/videos/{video_id}",
528
587
  options=make_request_options(
529
588
  extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
530
589
  ),
@@ -534,14 +593,14 @@ class VideosResource(SyncAPIResource):
534
593
  def create_multiple(
535
594
  self,
536
595
  *,
537
- fields: str | NotGiven = NOT_GIVEN,
538
- videos: Iterable[video_create_multiple_params.Video] | NotGiven = NOT_GIVEN,
596
+ fields: str | Omit = omit,
597
+ videos: Iterable[video_create_multiple_params.Video] | Omit = omit,
539
598
  # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
540
599
  # The extra values given here take precedence over values defined on the client or passed to this method.
541
600
  extra_headers: Headers | None = None,
542
601
  extra_query: Query | None = None,
543
602
  extra_body: Body | None = None,
544
- timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
603
+ timeout: float | httpx.Timeout | None | NotGiven = not_given,
545
604
  ) -> VideoCreateMultipleResponse:
546
605
  """Mass upload of your videos.
547
606
 
@@ -553,6 +612,7 @@ class VideosResource(SyncAPIResource):
553
612
 
554
613
  All videos in the request will be processed in queue in order of priority. Use
555
614
  "priority" attribute and look at general description in POST /videos method.
615
+
556
616
  Limits:
557
617
 
558
618
  - Batch max size = 500 videos.
@@ -575,7 +635,9 @@ class VideosResource(SyncAPIResource):
575
635
  timeout: Override the client-level default timeout for this request, in seconds
576
636
  """
577
637
  return self._post(
578
- "/streaming/videos/batch",
638
+ "/streaming/videos/batch"
639
+ if self._client._base_url_overridden
640
+ else "https://api.gcore.com//streaming/videos/batch",
579
641
  body=maybe_transform({"videos": videos}, video_create_multiple_params.VideoCreateMultipleParams),
580
642
  options=make_request_options(
581
643
  extra_headers=extra_headers,
@@ -596,13 +658,15 @@ class VideosResource(SyncAPIResource):
596
658
  extra_headers: Headers | None = None,
597
659
  extra_query: Query | None = None,
598
660
  extra_body: Body | None = None,
599
- timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
661
+ timeout: float | httpx.Timeout | None | NotGiven = not_given,
600
662
  ) -> Video:
601
- """Information about a video entity.
663
+ """
664
+ Information about a video entity.
602
665
 
603
- Contains all the data about the video:
604
- meta-data, data for streaming and renditions, static media data, data about
605
- original video. You can use different methods to play video:
666
+ Contains all the data about the video: meta-data, data for streaming and
667
+ renditions, static media data, data about original video.
668
+
669
+ You can use different methods to play video:
606
670
 
607
671
  - `iframe_url` – a URL to a built-in HTML video player with automatically
608
672
  configured video playback.
@@ -613,7 +677,8 @@ class VideosResource(SyncAPIResource):
613
677
  - `dash_url` – a URL to MPEG-DASH .mpd manifest, which can be played in most
614
678
  modern video players. Preferable for Android and Windows devices.
615
679
  - `converted_videos`/`mp4_url` – a URL to MP4 file of specific rendition.
616
- ![Video player](https://demo-files.gvideo.io/apidocs/coffee-run-player.jpg)
680
+
681
+ ![Video player](https://demo-files.gvideo.io/apidocs/coffee-run-player.jpg)
617
682
 
618
683
  Args:
619
684
  extra_headers: Send extra headers
@@ -625,7 +690,9 @@ class VideosResource(SyncAPIResource):
625
690
  timeout: Override the client-level default timeout for this request, in seconds
626
691
  """
627
692
  return self._get(
628
- f"/streaming/videos/{video_id}",
693
+ f"/streaming/videos/{video_id}"
694
+ if self._client._base_url_overridden
695
+ else f"https://api.gcore.com//streaming/videos/{video_id}",
629
696
  options=make_request_options(
630
697
  extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
631
698
  ),
@@ -641,23 +708,27 @@ class VideosResource(SyncAPIResource):
641
708
  extra_headers: Headers | None = None,
642
709
  extra_query: Query | None = None,
643
710
  extra_body: Body | None = None,
644
- timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
711
+ timeout: float | httpx.Timeout | None | NotGiven = not_given,
645
712
  ) -> DirectUploadParameters:
646
713
  """
647
714
  Use this method to get TUS' session parameters: hostname of the server to
648
- upload, secure token. The general sequence of actions for a direct upload of a
649
- video is as follows:
715
+ upload, secure token.
716
+
717
+ The general sequence of actions for a direct upload of a video is as follows:
650
718
 
651
719
  - Create video entity via POST method
652
720
  ["Create video"](/docs/api-reference/streaming/videos/create-video)
653
721
  - Get TUS' session parameters (you are here now)
654
722
  - Upload file via TUS client, choose your implementation on
655
- [tus.io](https://tus.io/implementations) Final endpoint for uploading is
656
- constructed using the following template: "https://{hostname}/upload/". Also
657
- you have to provide token, `client_id`, `video_id` as metadata too. A short
658
- javascript example is shown below, based on tus-js-client. Variable "data"
659
- below is the result of this API request. Please, note that we support 2.x
660
- version only of tus-js-client.
723
+ [tus.io](https://tus.io/implementations)
724
+
725
+ Final endpoint for uploading is constructed using the following template:
726
+ "https://{hostname}/upload/". Also you have to provide token, `client_id`,
727
+ `video_id` as metadata too.
728
+
729
+ A short javascript example is shown below, based on tus-js-client. Variable
730
+ "data" below is the result of this API request. Please, note that we support 2.x
731
+ version only of tus-js-client.
661
732
 
662
733
  ```
663
734
  uploads[data.video.id] = new tus.Upload(file, {
@@ -685,7 +756,9 @@ class VideosResource(SyncAPIResource):
685
756
  timeout: Override the client-level default timeout for this request, in seconds
686
757
  """
687
758
  return self._get(
688
- f"/streaming/videos/{video_id}/upload",
759
+ f"/streaming/videos/{video_id}/upload"
760
+ if self._client._base_url_overridden
761
+ else f"https://api.gcore.com//streaming/videos/{video_id}/upload",
689
762
  options=make_request_options(
690
763
  extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
691
764
  ),
@@ -695,13 +768,13 @@ class VideosResource(SyncAPIResource):
695
768
  def list_names(
696
769
  self,
697
770
  *,
698
- ids: Iterable[int] | NotGiven = NOT_GIVEN,
771
+ ids: Iterable[int] | Omit = omit,
699
772
  # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
700
773
  # The extra values given here take precedence over values defined on the client or passed to this method.
701
774
  extra_headers: Headers | None = None,
702
775
  extra_query: Query | None = None,
703
776
  extra_body: Body | None = None,
704
- timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
777
+ timeout: float | httpx.Timeout | None | NotGiven = not_given,
705
778
  ) -> None:
706
779
  """
707
780
  Returns names for specified video IDs
@@ -719,7 +792,9 @@ class VideosResource(SyncAPIResource):
719
792
  """
720
793
  extra_headers = {"Accept": "*/*", **(extra_headers or {})}
721
794
  return self._get(
722
- "/streaming/videos/names",
795
+ "/streaming/videos/names"
796
+ if self._client._base_url_overridden
797
+ else "https://api.gcore.com//streaming/videos/names",
723
798
  options=make_request_options(
724
799
  extra_headers=extra_headers,
725
800
  extra_query=extra_query,
@@ -758,19 +833,21 @@ class AsyncVideosResource(AsyncAPIResource):
758
833
  async def create(
759
834
  self,
760
835
  *,
761
- video: CreateVideoParam | NotGiven = NOT_GIVEN,
836
+ video: CreateVideoParam | Omit = omit,
762
837
  # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
763
838
  # The extra values given here take precedence over values defined on the client or passed to this method.
764
839
  extra_headers: Headers | None = None,
765
840
  extra_query: Query | None = None,
766
841
  extra_body: Body | None = None,
767
- timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
842
+ timeout: float | httpx.Timeout | None | NotGiven = not_given,
768
843
  ) -> VideoCreateResponse:
769
844
  """
770
845
  Use this method to create a new video entity.
771
846
 
772
- **Methods of creating** To upload the original video file to the server, there
773
- are several possible scenarios:
847
+ **Methods of creating**
848
+
849
+ To upload the original video file to the server, there are several possible
850
+ scenarios:
774
851
 
775
852
  - **Copy from another server** – If your video is accessable via "http://",
776
853
  "https://", or "sftp://" public link, then you can use this method to copy a
@@ -779,20 +856,26 @@ class AsyncVideosResource(AsyncAPIResource):
779
856
  execution file will be uploaded and will be sent to transcoding automatically,
780
857
  you don't have to do anything else. Use extra field `origin_http_headers` if
781
858
  authorization is required on the external server.
859
+
782
860
  - **Direct upload from a local device** – If you need to upload video directly
783
861
  from your local device or from a mobile app, then use this method. Keep
784
862
  `origin_url` empty and use TUS protocol ([tus.io](https://tus.io)) to upload
785
863
  file. More details are here
786
864
  ["Get TUS' upload"](/docs/api-reference/streaming/videos/get-tus-parameters-for-direct-upload)
787
- After getting the video, it is processed through the queue. There are 2
788
- priority criteria: global and local. Global is determined automatically by the
789
- system as converters are ready to get next video, so your videos rarely queue
790
- longer than usual (when you don't have a dedicated region). Local priority
791
- works at the level of your account and you have full control over it, look at
792
- "priority" attribute.
793
865
 
794
- **AI processing** When uploading a video, it is possible to automatically create
795
- subtitles based on AI. Read more:
866
+ After getting the video, it is processed through the queue. There are 2 priority
867
+ criteria: global and local. Global is determined automatically by the system as
868
+ converters are ready to get next video, so your videos rarely queue longer than
869
+ usual (when you don't have a dedicated region). Local priority works at the
870
+ level of your account and you have full control over it, look at "priority"
871
+ attribute.
872
+
873
+ **AI processing**
874
+
875
+ When uploading a video, it is possible to automatically create subtitles based
876
+ on AI.
877
+
878
+ Read more:
796
879
 
797
880
  - What is
798
881
  ["AI Speech Recognition"](/docs/api-reference/streaming/ai/create-ai-asr-task).
@@ -807,21 +890,26 @@ class AsyncVideosResource(AsyncAPIResource):
807
890
  subtitle will be generated for each specified language.
808
891
  - How to
809
892
  ["add AI-generated subtitles to an exist video"](/docs/api-reference/streaming/subtitles/add-subtitle).
810
- The created AI-task(s) will be automatically executed, and result will also be
811
- automatically attached to this video as subtitle(s). Please note that
812
- transcription is done automatically for all videos uploaded to our video
813
- hosting. If necessary, you can disable automatic creation of subtitles. If AI
814
- is disabled in your account, no AI functionality is called.
815
-
816
- **Advanced Features** For details on the requirements for incoming original
817
- files, and output video parameters after transcoding, refer to the Knowledge
818
- Base documentation. By default video will be transcoded according to the
819
- original resolution, and a quality ladder suitable for your original video will
820
- be applied. There is no automatic upscaling; the maximum quality is taken from
821
- the original video. If you want to upload specific files not explicitly listed
822
- in requirements or wish to modify the standard quality ladder (i.e. decrease
823
- quality or add new non-standard qualities), then such customization is possible.
824
- Please reach out to us for assistance.
893
+
894
+ The created AI-task(s) will be automatically executed, and result will also be
895
+ automatically attached to this video as subtitle(s).
896
+
897
+ Please note that transcription is done automatically for all videos uploaded to
898
+ our video hosting. If necessary, you can disable automatic creation of
899
+ subtitles. If AI is disabled in your account, no AI functionality is called.
900
+
901
+ **Advanced Features**
902
+
903
+ For details on the requirements for incoming original files, and output video
904
+ parameters after transcoding, refer to the Knowledge Base documentation. By
905
+ default video will be transcoded according to the original resolution, and a
906
+ quality ladder suitable for your original video will be applied. There is no
907
+ automatic upscaling; the maximum quality is taken from the original video.
908
+
909
+ If you want to upload specific files not explicitly listed in requirements or
910
+ wish to modify the standard quality ladder (i.e. decrease quality or add new
911
+ non-standard qualities), then such customization is possible. Please reach out
912
+ to us for assistance.
825
913
 
826
914
  Additionally, check the Knowledge Base for any supplementary information you may
827
915
  need.
@@ -836,7 +924,7 @@ class AsyncVideosResource(AsyncAPIResource):
836
924
  timeout: Override the client-level default timeout for this request, in seconds
837
925
  """
838
926
  return await self._post(
839
- "/streaming/videos",
927
+ "/streaming/videos" if self._client._base_url_overridden else "https://api.gcore.com//streaming/videos",
840
928
  body=await async_maybe_transform({"video": video}, video_create_params.VideoCreateParams),
841
929
  options=make_request_options(
842
930
  extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
@@ -849,52 +937,56 @@ class AsyncVideosResource(AsyncAPIResource):
849
937
  video_id: int,
850
938
  *,
851
939
  name: str,
852
- auto_transcribe_audio_language: Literal["disable", "auto", "<language_code>"] | NotGiven = NOT_GIVEN,
853
- auto_translate_subtitles_language: Literal["disable", "default", "<language_codes,>"] | NotGiven = NOT_GIVEN,
854
- client_user_id: int | NotGiven = NOT_GIVEN,
855
- clip_duration_seconds: int | NotGiven = NOT_GIVEN,
856
- clip_start_seconds: int | NotGiven = NOT_GIVEN,
857
- custom_iframe_url: str | NotGiven = NOT_GIVEN,
858
- description: str | NotGiven = NOT_GIVEN,
859
- directory_id: int | NotGiven = NOT_GIVEN,
860
- origin_http_headers: str | NotGiven = NOT_GIVEN,
861
- origin_url: str | NotGiven = NOT_GIVEN,
862
- poster: str | NotGiven = NOT_GIVEN,
863
- priority: int | NotGiven = NOT_GIVEN,
864
- projection: str | NotGiven = NOT_GIVEN,
865
- quality_set_id: int | NotGiven = NOT_GIVEN,
866
- remote_poster_url: str | NotGiven = NOT_GIVEN,
867
- remove_poster: bool | NotGiven = NOT_GIVEN,
868
- screenshot_id: int | NotGiven = NOT_GIVEN,
869
- share_url: str | NotGiven = NOT_GIVEN,
870
- source_bitrate_limit: bool | NotGiven = NOT_GIVEN,
940
+ auto_transcribe_audio_language: Literal["disable", "auto", "<language_code>"] | Omit = omit,
941
+ auto_translate_subtitles_language: Literal["disable", "default", "<language_codes,>"] | Omit = omit,
942
+ client_user_id: int | Omit = omit,
943
+ clip_duration_seconds: int | Omit = omit,
944
+ clip_start_seconds: int | Omit = omit,
945
+ custom_iframe_url: str | Omit = omit,
946
+ description: str | Omit = omit,
947
+ directory_id: int | Omit = omit,
948
+ origin_http_headers: str | Omit = omit,
949
+ origin_url: str | Omit = omit,
950
+ poster: str | Omit = omit,
951
+ priority: int | Omit = omit,
952
+ projection: str | Omit = omit,
953
+ quality_set_id: int | Omit = omit,
954
+ remote_poster_url: str | Omit = omit,
955
+ remove_poster: bool | Omit = omit,
956
+ screenshot_id: int | Omit = omit,
957
+ share_url: str | Omit = omit,
958
+ source_bitrate_limit: bool | Omit = omit,
871
959
  # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
872
960
  # The extra values given here take precedence over values defined on the client or passed to this method.
873
961
  extra_headers: Headers | None = None,
874
962
  extra_query: Query | None = None,
875
963
  extra_body: Body | None = None,
876
- timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
964
+ timeout: float | httpx.Timeout | None | NotGiven = not_given,
877
965
  ) -> Video:
878
- """Changes parameters of the video to new values.
966
+ """
967
+ Changes parameters of the video to new values.
879
968
 
880
- It's allowed to update only those
881
- public parameters that are described in POST method to create a new “video”
882
- entity. So it's not possible to change calculated parameters like "id",
883
- "duration", "`hls_url`", etc. Examples of changing:
969
+ It's allowed to update only those public parameters that are described in POST
970
+ method to create a new “video” entity. So it's not possible to change calculated
971
+ parameters like "id", "duration", "`hls_url`", etc.
972
+
973
+ Examples of changing:
884
974
 
885
975
  - Name: `{ "name": "new name of the video" }`
886
- - Move the video to a new directory: ` { "directory_id": 200 }` Please note that
887
- some parameters are used on initial step (before transcoding) only, so after
888
- transcoding there is no use in changing their values. For example,
889
- "`origin_url`" parameter is used for downloading an original file from a
890
- source and never used after transcoding; or "priority" parameter is used to
891
- set priority of processing and never used after transcoding.
976
+ - Move the video to a new directory: ` { "directory_id": 200 }`
977
+
978
+ Please note that some parameters are used on initial step (before transcoding)
979
+ only, so after transcoding there is no use in changing their values. For
980
+ example, "`origin_url`" parameter is used for downloading an original file from
981
+ a source and never used after transcoding; or "priority" parameter is used to
982
+ set priority of processing and never used after transcoding.
892
983
 
893
984
  Args:
894
985
  name: Video name
895
986
 
896
- auto_transcribe_audio_language:
897
- Automatic creation of subtitles by transcribing the audio track. Values:
987
+ auto_transcribe_audio_language: Automatic creation of subtitles by transcribing the audio track.
988
+
989
+ Values:
898
990
 
899
991
  - disable – Do not transcribe.
900
992
  - auto – Automatically detects the activation of the option based on the
@@ -904,7 +996,9 @@ class AsyncVideosResource(AsyncAPIResource):
904
996
  language spoken in the audio track, or when auto language detection fails.
905
997
  Language is set by 3-letter language code according to ISO-639-2
906
998
  (bibliographic code). List of languages is available in `audio_language`
907
- attribute of API POST /streaming/ai/transcribe . Example:
999
+ attribute of API POST /streaming/ai/transcribe .
1000
+
1001
+ Example:
908
1002
 
909
1003
  ```
910
1004
  auto_transcribe_audio_language: "auto"
@@ -920,15 +1014,23 @@ class AsyncVideosResource(AsyncAPIResource):
920
1014
 
921
1015
  auto_translate_subtitles_language: Automatic translation of auto-transcribed subtitles to the specified
922
1016
  language(s). Can be used both together with `auto_transcribe_audio_language`
923
- option only. Use it when you want to make automatic subtitles in languages other
924
- than the original language in audio. Values:
1017
+ option only.
1018
+
1019
+ Use it when you want to make automatic subtitles in languages other than the
1020
+ original language in audio.
1021
+
1022
+ Values:
925
1023
 
926
1024
  - disable – Do not translate.
927
1025
  - default – There are 3 default languages: eng,fre,ger
928
1026
  - \\ – Explicit language to translate to, or list of languages separated by a
929
1027
  comma. Look at list of available languages in description of AI ASR task
930
- creation. If several languages are specified for translation, a separate
931
- subtitle will be generated for each language. Example:
1028
+ creation.
1029
+
1030
+ If several languages are specified for translation, a separate subtitle will be
1031
+ generated for each language.
1032
+
1033
+ Example:
932
1034
 
933
1035
  ```
934
1036
  auto_translate_subtitles_language: default
@@ -948,8 +1050,10 @@ class AsyncVideosResource(AsyncAPIResource):
948
1050
  length if the video, then you can provide timecodes of starting point and
949
1051
  duration of a segment to process. Start encoding from is a number in seconds.
950
1052
 
951
- custom_iframe_url: Deprecated. Custom URL of IFrame for video player to be used in share panel in
952
- player. Auto generated IFrame URL provided by default
1053
+ custom_iframe_url: Deprecated.
1054
+
1055
+ Custom URL of IFrame for video player to be used in share panel in player. Auto
1056
+ generated IFrame URL provided by default
953
1057
 
954
1058
  description: Video details; not visible to the end-users
955
1059
 
@@ -957,8 +1061,11 @@ class AsyncVideosResource(AsyncAPIResource):
957
1061
 
958
1062
  origin_http_headers: Authorization HTTP request header. Will be used as credentials to authenticate a
959
1063
  request to download a file (specified in "`origin_url`" parameter) on an
960
- external server. Syntax:
961
- `Authorization: <auth-scheme> <authorization-parameters>` Examples:
1064
+ external server.
1065
+
1066
+ Syntax: `Authorization: <auth-scheme> <authorization-parameters>`
1067
+
1068
+ Examples:
962
1069
 
963
1070
  - "`origin_http_headers`": "Authorization: Basic ..."
964
1071
  - "`origin_http_headers`": "Authorization: Bearer ..."
@@ -980,14 +1087,20 @@ class AsyncVideosResource(AsyncAPIResource):
980
1087
  transcoding.
981
1088
 
982
1089
  poster: Poster is your own static image which can be displayed before the video starts.
1090
+
983
1091
  After uploading the video, the system will automatically create several
984
1092
  screenshots (they will be stored in "screenshots" attribute) from which you can
985
1093
  select an default screenshot. This "poster" field is for uploading your own
986
1094
  image. Also use attribute "`screenshot_id`" to select poster as a default
987
- screnshot. Attribute accepts single image as base64-encoded string
1095
+ screnshot.
1096
+
1097
+ Attribute accepts single image as base64-encoded string
988
1098
  [(RFC 2397 – The "data" URL scheme)](https://www.rfc-editor.org/rfc/rfc2397). In
989
- format: `data:[<mediatype>];base64,<data>` MIME-types are image/jpeg,
990
- image/webp, and image/png and file sizes up to 1Mb. Examples:
1099
+ format: `data:[<mediatype>];base64,<data>`
1100
+
1101
+ MIME-types are image/jpeg, image/webp, and image/png and file sizes up to 1Mb.
1102
+
1103
+ Examples:
991
1104
 
992
1105
  - `data:image/jpeg;base64,/9j/4AA...qf/2Q==`
993
1106
  - `data:image/png;base64,iVBORw0KGg...ggg==`
@@ -995,12 +1108,14 @@ class AsyncVideosResource(AsyncAPIResource):
995
1108
 
996
1109
  priority: Priority allows you to adjust the urgency of processing some videos before
997
1110
  others in your account, if your algorithm requires it. For example, when there
998
- are very urgent video and some regular ones that can wait in the queue. Value
999
- range, integer [-10..10]. -10 is the lowest down-priority, 10 is the highest
1000
- up-priority. Default priority is 0.
1111
+ are very urgent video and some regular ones that can wait in the queue.
1112
+
1113
+ Value range, integer [-10..10]. -10 is the lowest down-priority, 10 is the
1114
+ highest up-priority. Default priority is 0.
1115
+
1116
+ projection: Deprecated.
1001
1117
 
1002
- projection:
1003
- Deprecated. Regulates the video format:
1118
+ Regulates the video format:
1004
1119
 
1005
1120
  - **regular** — plays the video as usual
1006
1121
  - **vr360** — plays the video in 360 degree mode
@@ -1013,21 +1128,29 @@ class AsyncVideosResource(AsyncAPIResource):
1013
1128
  your conditions. Look at GET /`quality_sets` method
1014
1129
 
1015
1130
  remote_poster_url: Poster URL to download from external resource, instead of uploading via "poster"
1016
- attribute. It has the same restrictions as "poster" attribute.
1131
+ attribute.
1132
+
1133
+ It has the same restrictions as "poster" attribute.
1017
1134
 
1018
1135
  remove_poster: Set it to true to remove poster
1019
1136
 
1020
- screenshot_id: Default screenshot index. Specify an ID from the "screenshots" array, so that
1021
- the URL of the required screenshot appears in the "screenshot" attribute as the
1022
- default screenshot. By default 5 static screenshots will be taken from different
1023
- places in the video after transcoding. If the video is short, there may be fewer
1024
- screenshots. Counting from 0. A value of -1 sets the default screenshot to the
1025
- URL of your own image from the "poster" attribute. Look at "screenshot"
1026
- attribute in GET /videos/{`video_id`} for details.
1137
+ screenshot_id: Default screenshot index.
1138
+
1139
+ Specify an ID from the "screenshots" array, so that the URL of the required
1140
+ screenshot appears in the "screenshot" attribute as the default screenshot. By
1141
+ default 5 static screenshots will be taken from different places in the video
1142
+ after transcoding. If the video is short, there may be fewer screenshots.
1143
+
1144
+ Counting from 0. A value of -1 sets the default screenshot to the URL of your
1145
+ own image from the "poster" attribute.
1146
+
1147
+ Look at "screenshot" attribute in GET /videos/{`video_id`} for details.
1148
+
1149
+ share_url: Deprecated.
1027
1150
 
1028
- share_url: Deprecated. Custom URL or iframe displayed in the link field when a user clicks
1029
- on a sharing button in player. If empty, the link field and social network
1030
- sharing is disabled
1151
+ Custom URL or iframe displayed in the link field when a user clicks on a sharing
1152
+ button in player. If empty, the link field and social network sharing is
1153
+ disabled
1031
1154
 
1032
1155
  source_bitrate_limit: The option allows you to set the video transcoding rule so that the output
1033
1156
  bitrate in ABR ladder is not exceeding the bitrate of the original video.
@@ -1037,18 +1160,21 @@ class AsyncVideosResource(AsyncAPIResource):
1037
1160
  By default `source_bitrate_limit: true` this option allows you to have the
1038
1161
  output bitrate not more than in the original video, thus to transcode video
1039
1162
  faster and to deliver it to end-viewers faster as well. At the same time, the
1040
- quality will be similar to the original. If for some reason you need more
1041
- byte-space in the output quality when encoding, you can set this option to
1042
- `source_bitrate_limit: false`. Then, when transcoding, the quality ceiling will
1043
- be raised from the bitrate of the original video to the maximum possible limit
1044
- specified in our the Product Documentation. For example, this may be needed
1045
- when:
1163
+ quality will be similar to the original.
1164
+
1165
+ If for some reason you need more byte-space in the output quality when encoding,
1166
+ you can set this option to `source_bitrate_limit: false`. Then, when
1167
+ transcoding, the quality ceiling will be raised from the bitrate of the original
1168
+ video to the maximum possible limit specified in our the Product Documentation.
1169
+ For example, this may be needed when:
1046
1170
 
1047
1171
  - to improve the visual quality parameters using PSNR, SSIM, VMAF metrics,
1048
1172
  - to improve the picture quality on dynamic scenes,
1049
- - etc. The option is applied only at the video creation stage and cannot be
1050
- changed later. If you want to re-transcode the video using new value, then you
1051
- need to create and upload a new video only.
1173
+ - etc.
1174
+
1175
+ The option is applied only at the video creation stage and cannot be changed
1176
+ later. If you want to re-transcode the video using new value, then you need to
1177
+ create and upload a new video only.
1052
1178
 
1053
1179
  extra_headers: Send extra headers
1054
1180
 
@@ -1059,7 +1185,9 @@ class AsyncVideosResource(AsyncAPIResource):
1059
1185
  timeout: Override the client-level default timeout for this request, in seconds
1060
1186
  """
1061
1187
  return await self._patch(
1062
- f"/streaming/videos/{video_id}",
1188
+ f"/streaming/videos/{video_id}"
1189
+ if self._client._base_url_overridden
1190
+ else f"https://api.gcore.com//streaming/videos/{video_id}",
1063
1191
  body=await async_maybe_transform(
1064
1192
  {
1065
1193
  "name": name,
@@ -1094,20 +1222,20 @@ class AsyncVideosResource(AsyncAPIResource):
1094
1222
  def list(
1095
1223
  self,
1096
1224
  *,
1097
- id: str | NotGiven = NOT_GIVEN,
1098
- client_user_id: int | NotGiven = NOT_GIVEN,
1099
- fields: str | NotGiven = NOT_GIVEN,
1100
- page: int | NotGiven = NOT_GIVEN,
1101
- per_page: int | NotGiven = NOT_GIVEN,
1102
- search: str | NotGiven = NOT_GIVEN,
1103
- status: str | NotGiven = NOT_GIVEN,
1104
- stream_id: int | NotGiven = NOT_GIVEN,
1225
+ id: str | Omit = omit,
1226
+ client_user_id: int | Omit = omit,
1227
+ fields: str | Omit = omit,
1228
+ page: int | Omit = omit,
1229
+ per_page: int | Omit = omit,
1230
+ search: str | Omit = omit,
1231
+ status: str | Omit = omit,
1232
+ stream_id: int | Omit = omit,
1105
1233
  # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
1106
1234
  # The extra values given here take precedence over values defined on the client or passed to this method.
1107
1235
  extra_headers: Headers | None = None,
1108
1236
  extra_query: Query | None = None,
1109
1237
  extra_body: Body | None = None,
1110
- timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
1238
+ timeout: float | httpx.Timeout | None | NotGiven = not_given,
1111
1239
  ) -> AsyncPaginator[Video, AsyncPageStreaming[Video]]:
1112
1240
  """
1113
1241
  Returns a set of videos by the given criteria.
@@ -1131,8 +1259,10 @@ class AsyncVideosResource(AsyncAPIResource):
1131
1259
  search: Aggregated search condition. If set, the video list is filtered by one combined
1132
1260
  SQL criterion:
1133
1261
 
1134
- - id={s} OR slug={s} OR name like {s} i.e. "/videos?search=1000" returns list of
1135
- videos where id=1000 or slug=1000 or name contains "1000".
1262
+ - id={s} OR slug={s} OR name like {s}
1263
+
1264
+ i.e. "/videos?search=1000" returns list of videos where id=1000 or slug=1000 or
1265
+ name contains "1000".
1136
1266
 
1137
1267
  status:
1138
1268
  Use it to get videos filtered by their status. Possible values:
@@ -1155,7 +1285,7 @@ class AsyncVideosResource(AsyncAPIResource):
1155
1285
  timeout: Override the client-level default timeout for this request, in seconds
1156
1286
  """
1157
1287
  return self._get_api_list(
1158
- "/streaming/videos",
1288
+ "/streaming/videos" if self._client._base_url_overridden else "https://api.gcore.com//streaming/videos",
1159
1289
  page=AsyncPageStreaming[Video],
1160
1290
  options=make_request_options(
1161
1291
  extra_headers=extra_headers,
@@ -1188,15 +1318,17 @@ class AsyncVideosResource(AsyncAPIResource):
1188
1318
  extra_headers: Headers | None = None,
1189
1319
  extra_query: Query | None = None,
1190
1320
  extra_body: Body | None = None,
1191
- timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
1321
+ timeout: float | httpx.Timeout | None | NotGiven = not_given,
1192
1322
  ) -> None:
1193
1323
  """
1194
1324
  Operation to delete video entity.
1195
1325
 
1196
1326
  When you delete a video, all transcoded qualities and all associated files such
1197
1327
  as subtitles and screenshots, as well as other data, are deleted from cloud
1198
- storage. The video is deleted permanently and irreversibly. Therefore, it is
1199
- impossible to restore files after this.
1328
+ storage.
1329
+
1330
+ The video is deleted permanently and irreversibly. Therefore, it is impossible
1331
+ to restore files after this.
1200
1332
 
1201
1333
  For detailed information and information on calculating your maximum monthly
1202
1334
  storage usage, please refer to the Product Documentation.
@@ -1212,7 +1344,9 @@ class AsyncVideosResource(AsyncAPIResource):
1212
1344
  """
1213
1345
  extra_headers = {"Accept": "*/*", **(extra_headers or {})}
1214
1346
  return await self._delete(
1215
- f"/streaming/videos/{video_id}",
1347
+ f"/streaming/videos/{video_id}"
1348
+ if self._client._base_url_overridden
1349
+ else f"https://api.gcore.com//streaming/videos/{video_id}",
1216
1350
  options=make_request_options(
1217
1351
  extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
1218
1352
  ),
@@ -1222,14 +1356,14 @@ class AsyncVideosResource(AsyncAPIResource):
1222
1356
  async def create_multiple(
1223
1357
  self,
1224
1358
  *,
1225
- fields: str | NotGiven = NOT_GIVEN,
1226
- videos: Iterable[video_create_multiple_params.Video] | NotGiven = NOT_GIVEN,
1359
+ fields: str | Omit = omit,
1360
+ videos: Iterable[video_create_multiple_params.Video] | Omit = omit,
1227
1361
  # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
1228
1362
  # The extra values given here take precedence over values defined on the client or passed to this method.
1229
1363
  extra_headers: Headers | None = None,
1230
1364
  extra_query: Query | None = None,
1231
1365
  extra_body: Body | None = None,
1232
- timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
1366
+ timeout: float | httpx.Timeout | None | NotGiven = not_given,
1233
1367
  ) -> VideoCreateMultipleResponse:
1234
1368
  """Mass upload of your videos.
1235
1369
 
@@ -1241,6 +1375,7 @@ class AsyncVideosResource(AsyncAPIResource):
1241
1375
 
1242
1376
  All videos in the request will be processed in queue in order of priority. Use
1243
1377
  "priority" attribute and look at general description in POST /videos method.
1378
+
1244
1379
  Limits:
1245
1380
 
1246
1381
  - Batch max size = 500 videos.
@@ -1263,7 +1398,9 @@ class AsyncVideosResource(AsyncAPIResource):
1263
1398
  timeout: Override the client-level default timeout for this request, in seconds
1264
1399
  """
1265
1400
  return await self._post(
1266
- "/streaming/videos/batch",
1401
+ "/streaming/videos/batch"
1402
+ if self._client._base_url_overridden
1403
+ else "https://api.gcore.com//streaming/videos/batch",
1267
1404
  body=await async_maybe_transform(
1268
1405
  {"videos": videos}, video_create_multiple_params.VideoCreateMultipleParams
1269
1406
  ),
@@ -1288,13 +1425,15 @@ class AsyncVideosResource(AsyncAPIResource):
1288
1425
  extra_headers: Headers | None = None,
1289
1426
  extra_query: Query | None = None,
1290
1427
  extra_body: Body | None = None,
1291
- timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
1428
+ timeout: float | httpx.Timeout | None | NotGiven = not_given,
1292
1429
  ) -> Video:
1293
- """Information about a video entity.
1430
+ """
1431
+ Information about a video entity.
1294
1432
 
1295
- Contains all the data about the video:
1296
- meta-data, data for streaming and renditions, static media data, data about
1297
- original video. You can use different methods to play video:
1433
+ Contains all the data about the video: meta-data, data for streaming and
1434
+ renditions, static media data, data about original video.
1435
+
1436
+ You can use different methods to play video:
1298
1437
 
1299
1438
  - `iframe_url` – a URL to a built-in HTML video player with automatically
1300
1439
  configured video playback.
@@ -1305,7 +1444,8 @@ class AsyncVideosResource(AsyncAPIResource):
1305
1444
  - `dash_url` – a URL to MPEG-DASH .mpd manifest, which can be played in most
1306
1445
  modern video players. Preferable for Android and Windows devices.
1307
1446
  - `converted_videos`/`mp4_url` – a URL to MP4 file of specific rendition.
1308
- ![Video player](https://demo-files.gvideo.io/apidocs/coffee-run-player.jpg)
1447
+
1448
+ ![Video player](https://demo-files.gvideo.io/apidocs/coffee-run-player.jpg)
1309
1449
 
1310
1450
  Args:
1311
1451
  extra_headers: Send extra headers
@@ -1317,7 +1457,9 @@ class AsyncVideosResource(AsyncAPIResource):
1317
1457
  timeout: Override the client-level default timeout for this request, in seconds
1318
1458
  """
1319
1459
  return await self._get(
1320
- f"/streaming/videos/{video_id}",
1460
+ f"/streaming/videos/{video_id}"
1461
+ if self._client._base_url_overridden
1462
+ else f"https://api.gcore.com//streaming/videos/{video_id}",
1321
1463
  options=make_request_options(
1322
1464
  extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
1323
1465
  ),
@@ -1333,23 +1475,27 @@ class AsyncVideosResource(AsyncAPIResource):
1333
1475
  extra_headers: Headers | None = None,
1334
1476
  extra_query: Query | None = None,
1335
1477
  extra_body: Body | None = None,
1336
- timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
1478
+ timeout: float | httpx.Timeout | None | NotGiven = not_given,
1337
1479
  ) -> DirectUploadParameters:
1338
1480
  """
1339
1481
  Use this method to get TUS' session parameters: hostname of the server to
1340
- upload, secure token. The general sequence of actions for a direct upload of a
1341
- video is as follows:
1482
+ upload, secure token.
1483
+
1484
+ The general sequence of actions for a direct upload of a video is as follows:
1342
1485
 
1343
1486
  - Create video entity via POST method
1344
1487
  ["Create video"](/docs/api-reference/streaming/videos/create-video)
1345
1488
  - Get TUS' session parameters (you are here now)
1346
1489
  - Upload file via TUS client, choose your implementation on
1347
- [tus.io](https://tus.io/implementations) Final endpoint for uploading is
1348
- constructed using the following template: "https://{hostname}/upload/". Also
1349
- you have to provide token, `client_id`, `video_id` as metadata too. A short
1350
- javascript example is shown below, based on tus-js-client. Variable "data"
1351
- below is the result of this API request. Please, note that we support 2.x
1352
- version only of tus-js-client.
1490
+ [tus.io](https://tus.io/implementations)
1491
+
1492
+ Final endpoint for uploading is constructed using the following template:
1493
+ "https://{hostname}/upload/". Also you have to provide token, `client_id`,
1494
+ `video_id` as metadata too.
1495
+
1496
+ A short javascript example is shown below, based on tus-js-client. Variable
1497
+ "data" below is the result of this API request. Please, note that we support 2.x
1498
+ version only of tus-js-client.
1353
1499
 
1354
1500
  ```
1355
1501
  uploads[data.video.id] = new tus.Upload(file, {
@@ -1377,7 +1523,9 @@ class AsyncVideosResource(AsyncAPIResource):
1377
1523
  timeout: Override the client-level default timeout for this request, in seconds
1378
1524
  """
1379
1525
  return await self._get(
1380
- f"/streaming/videos/{video_id}/upload",
1526
+ f"/streaming/videos/{video_id}/upload"
1527
+ if self._client._base_url_overridden
1528
+ else f"https://api.gcore.com//streaming/videos/{video_id}/upload",
1381
1529
  options=make_request_options(
1382
1530
  extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
1383
1531
  ),
@@ -1387,13 +1535,13 @@ class AsyncVideosResource(AsyncAPIResource):
1387
1535
  async def list_names(
1388
1536
  self,
1389
1537
  *,
1390
- ids: Iterable[int] | NotGiven = NOT_GIVEN,
1538
+ ids: Iterable[int] | Omit = omit,
1391
1539
  # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
1392
1540
  # The extra values given here take precedence over values defined on the client or passed to this method.
1393
1541
  extra_headers: Headers | None = None,
1394
1542
  extra_query: Query | None = None,
1395
1543
  extra_body: Body | None = None,
1396
- timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
1544
+ timeout: float | httpx.Timeout | None | NotGiven = not_given,
1397
1545
  ) -> None:
1398
1546
  """
1399
1547
  Returns names for specified video IDs
@@ -1411,7 +1559,9 @@ class AsyncVideosResource(AsyncAPIResource):
1411
1559
  """
1412
1560
  extra_headers = {"Accept": "*/*", **(extra_headers or {})}
1413
1561
  return await self._get(
1414
- "/streaming/videos/names",
1562
+ "/streaming/videos/names"
1563
+ if self._client._base_url_overridden
1564
+ else "https://api.gcore.com//streaming/videos/names",
1415
1565
  options=make_request_options(
1416
1566
  extra_headers=extra_headers,
1417
1567
  extra_query=extra_query,