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.
- gcore/_client.py +9 -0
- gcore/_models.py +24 -3
- gcore/_version.py +1 -1
- gcore/pagination.py +101 -63
- gcore/resources/__init__.py +14 -0
- gcore/resources/cloud/__init__.py +28 -0
- gcore/resources/cloud/cloud.py +64 -0
- gcore/resources/cloud/cost_reports.py +811 -0
- gcore/resources/cloud/file_shares/file_shares.py +10 -0
- gcore/resources/cloud/gpu_baremetal_clusters/gpu_baremetal_clusters.py +61 -26
- gcore/resources/cloud/inference/registry_credentials.py +4 -6
- gcore/resources/cloud/usage_reports.py +337 -0
- gcore/resources/iam/users.py +5 -5
- gcore/resources/streaming/__init__.py +159 -0
- gcore/resources/streaming/ai_tasks.py +1288 -0
- gcore/resources/streaming/broadcasts.py +579 -0
- gcore/resources/streaming/directories.py +515 -0
- gcore/resources/streaming/players.py +577 -0
- gcore/resources/streaming/playlists.py +1059 -0
- gcore/resources/streaming/quality_sets.py +331 -0
- gcore/resources/streaming/restreams.py +484 -0
- gcore/resources/streaming/statistics.py +3224 -0
- gcore/resources/streaming/streaming.py +390 -0
- gcore/resources/streaming/streams/__init__.py +33 -0
- gcore/resources/streaming/streams/overlays.py +716 -0
- gcore/resources/streaming/streams/streams.py +1592 -0
- gcore/resources/streaming/videos/__init__.py +33 -0
- gcore/resources/streaming/videos/subtitles.py +623 -0
- gcore/resources/streaming/videos/videos.py +1553 -0
- gcore/resources/waap/ip_info.py +28 -10
- gcore/types/cloud/__init__.py +10 -0
- gcore/types/cloud/cost_report_aggregated.py +865 -0
- gcore/types/cloud/cost_report_aggregated_monthly.py +865 -0
- gcore/types/cloud/cost_report_detailed.py +1343 -0
- gcore/types/cloud/cost_report_get_aggregated_monthly_params.py +394 -0
- gcore/types/cloud/cost_report_get_aggregated_params.py +409 -0
- gcore/types/cloud/cost_report_get_detailed_params.py +435 -0
- gcore/types/cloud/file_share.py +37 -3
- gcore/types/cloud/file_share_create_params.py +16 -0
- gcore/types/cloud/floating_ip.py +0 -9
- gcore/types/cloud/floating_ip_detailed.py +0 -9
- gcore/types/cloud/gpu_baremetal_cluster.py +2 -2
- gcore/types/cloud/gpu_baremetal_cluster_create_params.py +9 -0
- gcore/types/cloud/quota_get_all_response.py +24 -2
- gcore/types/cloud/quota_get_by_region_response.py +24 -2
- gcore/types/cloud/quotas/request_create_params.py +12 -1
- gcore/types/cloud/quotas/request_get_response.py +12 -1
- gcore/types/cloud/quotas/request_list_response.py +12 -1
- gcore/types/cloud/subnet.py +1 -1
- gcore/types/cloud/usage_report.py +1612 -0
- gcore/types/cloud/usage_report_get_params.py +432 -0
- gcore/types/streaming/__init__.py +143 -0
- gcore/types/streaming/ai_contentmoderation_casm.py +39 -0
- gcore/types/streaming/ai_contentmoderation_hardnudity.py +54 -0
- gcore/types/streaming/ai_contentmoderation_nsfw.py +39 -0
- gcore/types/streaming/ai_contentmoderation_softnudity.py +66 -0
- gcore/types/streaming/ai_contentmoderation_sport.py +39 -0
- gcore/types/streaming/ai_contentmoderation_weapon.py +39 -0
- gcore/types/streaming/ai_task.py +205 -0
- gcore/types/streaming/ai_task_cancel_response.py +12 -0
- gcore/types/streaming/ai_task_create_params.py +168 -0
- gcore/types/streaming/ai_task_create_response.py +10 -0
- gcore/types/streaming/ai_task_get_ai_settings_params.py +27 -0
- gcore/types/streaming/ai_task_get_ai_settings_response.py +12 -0
- gcore/types/streaming/ai_task_get_response.py +313 -0
- gcore/types/streaming/ai_task_list_params.py +50 -0
- gcore/types/streaming/broadcast.py +71 -0
- gcore/types/streaming/broadcast_create_params.py +76 -0
- gcore/types/streaming/broadcast_list_params.py +12 -0
- gcore/types/streaming/broadcast_spectators_count.py +12 -0
- gcore/types/streaming/broadcast_update_params.py +76 -0
- gcore/types/streaming/clip.py +78 -0
- gcore/types/streaming/create_video_param.py +214 -0
- gcore/types/streaming/direct_upload_parameters.py +33 -0
- gcore/types/streaming/directories_tree.py +19 -0
- gcore/types/streaming/directory_base.py +31 -0
- gcore/types/streaming/directory_create_params.py +15 -0
- gcore/types/streaming/directory_get_response.py +19 -0
- gcore/types/streaming/directory_item.py +13 -0
- gcore/types/streaming/directory_update_params.py +18 -0
- gcore/types/streaming/directory_video.py +13 -0
- gcore/types/streaming/ffprobes.py +25 -0
- gcore/types/streaming/max_stream_series.py +21 -0
- gcore/types/streaming/meet_series.py +23 -0
- gcore/types/streaming/player.py +114 -0
- gcore/types/streaming/player_create_params.py +18 -0
- gcore/types/streaming/player_list_params.py +12 -0
- gcore/types/streaming/player_param.py +114 -0
- gcore/types/streaming/player_update_params.py +18 -0
- gcore/types/streaming/playlist.py +102 -0
- gcore/types/streaming/playlist_create.py +12 -0
- gcore/types/streaming/playlist_create_params.py +102 -0
- gcore/types/streaming/playlist_list_params.py +12 -0
- gcore/types/streaming/playlist_list_videos_response.py +10 -0
- gcore/types/streaming/playlist_update_params.py +102 -0
- gcore/types/streaming/playlist_video.py +215 -0
- gcore/types/streaming/popular_videos.py +17 -0
- gcore/types/streaming/quality_set_set_default_params.py +23 -0
- gcore/types/streaming/quality_sets.py +57 -0
- gcore/types/streaming/restream.py +37 -0
- gcore/types/streaming/restream_create_params.py +41 -0
- gcore/types/streaming/restream_list_params.py +12 -0
- gcore/types/streaming/restream_update_params.py +41 -0
- gcore/types/streaming/statistic_get_ffprobes_params.py +22 -0
- gcore/types/streaming/statistic_get_live_unique_viewers_params.py +26 -0
- gcore/types/streaming/statistic_get_live_unique_viewers_response.py +25 -0
- gcore/types/streaming/statistic_get_live_watch_time_cdn_params.py +32 -0
- gcore/types/streaming/statistic_get_live_watch_time_total_cdn_params.py +30 -0
- gcore/types/streaming/statistic_get_max_streams_series_params.py +20 -0
- gcore/types/streaming/statistic_get_meet_series_params.py +20 -0
- gcore/types/streaming/statistic_get_popular_videos_params.py +15 -0
- gcore/types/streaming/statistic_get_storage_series_params.py +20 -0
- gcore/types/streaming/statistic_get_stream_series_params.py +20 -0
- gcore/types/streaming/statistic_get_unique_viewers_cdn_params.py +27 -0
- gcore/types/streaming/statistic_get_unique_viewers_params.py +34 -0
- gcore/types/streaming/statistic_get_views_by_browsers_params.py +15 -0
- gcore/types/streaming/statistic_get_views_by_country_params.py +15 -0
- gcore/types/streaming/statistic_get_views_by_hostname_params.py +15 -0
- gcore/types/streaming/statistic_get_views_by_operating_system_params.py +15 -0
- gcore/types/streaming/statistic_get_views_by_referer_params.py +15 -0
- gcore/types/streaming/statistic_get_views_by_region_params.py +15 -0
- gcore/types/streaming/statistic_get_views_heatmap_params.py +21 -0
- gcore/types/streaming/statistic_get_views_params.py +34 -0
- gcore/types/streaming/statistic_get_vod_storage_volume_params.py +17 -0
- gcore/types/streaming/statistic_get_vod_transcoding_duration_params.py +17 -0
- gcore/types/streaming/statistic_get_vod_unique_viewers_cdn_params.py +26 -0
- gcore/types/streaming/statistic_get_vod_watch_time_cdn_params.py +32 -0
- gcore/types/streaming/statistic_get_vod_watch_time_total_cdn_params.py +30 -0
- gcore/types/streaming/statistic_get_vod_watch_time_total_cdn_response.py +22 -0
- gcore/types/streaming/storage_series.py +23 -0
- gcore/types/streaming/stream.py +420 -0
- gcore/types/streaming/stream_create_clip_params.py +48 -0
- gcore/types/streaming/stream_create_params.py +165 -0
- gcore/types/streaming/stream_list_clips_response.py +10 -0
- gcore/types/streaming/stream_list_params.py +18 -0
- gcore/types/streaming/stream_series.py +21 -0
- gcore/types/streaming/stream_start_recording_response.py +76 -0
- gcore/types/streaming/stream_update_params.py +169 -0
- gcore/types/streaming/streams/__init__.py +11 -0
- gcore/types/streaming/streams/overlay.py +43 -0
- gcore/types/streaming/streams/overlay_create_params.py +36 -0
- gcore/types/streaming/streams/overlay_create_response.py +10 -0
- gcore/types/streaming/streams/overlay_list_response.py +10 -0
- gcore/types/streaming/streams/overlay_update_multiple_params.py +39 -0
- gcore/types/streaming/streams/overlay_update_multiple_response.py +10 -0
- gcore/types/streaming/streams/overlay_update_params.py +33 -0
- gcore/types/streaming/subtitle.py +12 -0
- gcore/types/streaming/subtitle_base.py +18 -0
- gcore/types/streaming/subtitle_base_param.py +18 -0
- gcore/types/streaming/unique_viewers.py +35 -0
- gcore/types/streaming/unique_viewers_cdn.py +17 -0
- gcore/types/streaming/video.py +444 -0
- gcore/types/streaming/video_create_multiple_params.py +28 -0
- gcore/types/streaming/video_create_multiple_response.py +10 -0
- gcore/types/streaming/video_create_params.py +13 -0
- gcore/types/streaming/video_create_response.py +10 -0
- gcore/types/streaming/video_list_names_params.py +13 -0
- gcore/types/streaming/video_list_params.py +59 -0
- gcore/types/streaming/video_update_params.py +214 -0
- gcore/types/streaming/videos/__init__.py +7 -0
- gcore/types/streaming/videos/subtitle_create_params.py +17 -0
- gcore/types/streaming/videos/subtitle_list_response.py +10 -0
- gcore/types/streaming/videos/subtitle_update_params.py +20 -0
- gcore/types/streaming/views.py +35 -0
- gcore/types/streaming/views_by_browser.py +17 -0
- gcore/types/streaming/views_by_country.py +19 -0
- gcore/types/streaming/views_by_hostname.py +17 -0
- gcore/types/streaming/views_by_operating_system.py +17 -0
- gcore/types/streaming/views_by_referer.py +17 -0
- gcore/types/streaming/views_by_region.py +19 -0
- gcore/types/streaming/views_heatmap.py +19 -0
- gcore/types/streaming/vod_statistics_series.py +21 -0
- gcore/types/streaming/vod_total_stream_duration_series.py +22 -0
- gcore/types/waap/domains/custom_rule_create_params.py +4 -4
- gcore/types/waap/domains/custom_rule_update_params.py +4 -4
- gcore/types/waap/ip_info_get_blocked_requests_params.py +5 -1
- gcore/types/waap/ip_info_get_counts_params.py +2 -1
- gcore/types/waap/ip_info_get_top_sessions_params.py +5 -1
- gcore/types/waap/ip_info_get_top_urls_params.py +5 -1
- gcore/types/waap/ip_info_get_top_user_agents_params.py +5 -1
- gcore/types/waap/waap_custom_rule.py +4 -4
- {gcore-0.6.0.dist-info → gcore-0.8.0.dist-info}/METADATA +1 -1
- {gcore-0.6.0.dist-info → gcore-0.8.0.dist-info}/RECORD +185 -37
- {gcore-0.6.0.dist-info → gcore-0.8.0.dist-info}/WHEEL +0 -0
- {gcore-0.6.0.dist-info → gcore-0.8.0.dist-info}/licenses/LICENSE +0 -0
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
from typing import Optional
|
|
4
|
+
from typing_extensions import Literal
|
|
5
|
+
|
|
6
|
+
from ..._models import BaseModel
|
|
7
|
+
|
|
8
|
+
__all__ = ["AIContentmoderationNsfw"]
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
class AIContentmoderationNsfw(BaseModel):
|
|
12
|
+
category: Literal["nsfw", "sport", "weapon", "hard_nudity", "soft_nudity", "child_pornography"]
|
|
13
|
+
"""AI content moderation with NSFW detection algorithm"""
|
|
14
|
+
|
|
15
|
+
task_name: Literal["content-moderation"]
|
|
16
|
+
"""Name of the task to be performed"""
|
|
17
|
+
|
|
18
|
+
url: str
|
|
19
|
+
"""URL to the MP4 file to analyse.
|
|
20
|
+
|
|
21
|
+
File must be publicly accessible via HTTP/HTTPS.
|
|
22
|
+
"""
|
|
23
|
+
|
|
24
|
+
client_entity_data: Optional[str] = None
|
|
25
|
+
"""
|
|
26
|
+
Meta parameter, designed to store your own extra information about a video
|
|
27
|
+
entity: video source, video id, etc. It is not used in any way in video
|
|
28
|
+
processing. For example, if an AI-task was created automatically when you
|
|
29
|
+
uploaded a video with the AI auto-processing option (nudity detection, etc),
|
|
30
|
+
then the ID of the associated video for which the task was performed will be
|
|
31
|
+
explicitly indicated here.
|
|
32
|
+
"""
|
|
33
|
+
|
|
34
|
+
client_user_id: Optional[str] = None
|
|
35
|
+
"""Meta parameter, designed to store your own identifier.
|
|
36
|
+
|
|
37
|
+
Can be used by you to tag requests from different end-users. It is not used in
|
|
38
|
+
any way in video processing.
|
|
39
|
+
"""
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
from typing import Optional
|
|
4
|
+
from typing_extensions import Literal
|
|
5
|
+
|
|
6
|
+
from ..._models import BaseModel
|
|
7
|
+
|
|
8
|
+
__all__ = ["AIContentmoderationSoftnudity"]
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
class AIContentmoderationSoftnudity(BaseModel):
|
|
12
|
+
category: Literal["soft_nudity", "sport", "weapon", "nsfw", "hard_nudity", "child_pornography"]
|
|
13
|
+
"""AI content moderation with "`soft_nudity`" algorithm"""
|
|
14
|
+
|
|
15
|
+
task_name: Literal["content-moderation"]
|
|
16
|
+
"""Name of the task to be performed"""
|
|
17
|
+
|
|
18
|
+
url: str
|
|
19
|
+
"""URL to the MP4 file to analyse.
|
|
20
|
+
|
|
21
|
+
File must be publicly accessible via HTTP/HTTPS.
|
|
22
|
+
"""
|
|
23
|
+
|
|
24
|
+
client_entity_data: Optional[str] = None
|
|
25
|
+
"""
|
|
26
|
+
Meta parameter, designed to store your own extra information about a video
|
|
27
|
+
entity: video source, video id, etc. It is not used in any way in video
|
|
28
|
+
processing. For example, if an AI-task was created automatically when you
|
|
29
|
+
uploaded a video with the AI auto-processing option (nudity detection, etc),
|
|
30
|
+
then the ID of the associated video for which the task was performed will be
|
|
31
|
+
explicitly indicated here.
|
|
32
|
+
"""
|
|
33
|
+
|
|
34
|
+
client_user_id: Optional[str] = None
|
|
35
|
+
"""Meta parameter, designed to store your own identifier.
|
|
36
|
+
|
|
37
|
+
Can be used by you to tag requests from different end-users. It is not used in
|
|
38
|
+
any way in video processing.
|
|
39
|
+
"""
|
|
40
|
+
|
|
41
|
+
stop_objects: Optional[
|
|
42
|
+
Literal[
|
|
43
|
+
"ANUS_COVERED",
|
|
44
|
+
"ANUS_EXPOSED",
|
|
45
|
+
"ARMPITS_COVERED",
|
|
46
|
+
"ARMPITS_EXPOSED",
|
|
47
|
+
"BELLY_COVERED",
|
|
48
|
+
"BELLY_EXPOSED",
|
|
49
|
+
"BUTTOCKS_COVERED",
|
|
50
|
+
"BUTTOCKS_EXPOSED",
|
|
51
|
+
"FACE_FEMALE",
|
|
52
|
+
"FACE_MALE",
|
|
53
|
+
"FEET_COVERED",
|
|
54
|
+
"FEET_EXPOSED",
|
|
55
|
+
"FEMALE_BREAST_COVERED",
|
|
56
|
+
"FEMALE_BREAST_EXPOSED",
|
|
57
|
+
"FEMALE_GENITALIA_COVERED",
|
|
58
|
+
"FEMALE_GENITALIA_EXPOSED",
|
|
59
|
+
"MALE_BREAST_EXPOSED",
|
|
60
|
+
"MALE_GENITALIA_EXPOSED",
|
|
61
|
+
]
|
|
62
|
+
] = None
|
|
63
|
+
"""
|
|
64
|
+
Comma separated objects, and probabilities, that will cause the processing to
|
|
65
|
+
stop immediatelly after finding.
|
|
66
|
+
"""
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
from typing import Optional
|
|
4
|
+
from typing_extensions import Literal
|
|
5
|
+
|
|
6
|
+
from ..._models import BaseModel
|
|
7
|
+
|
|
8
|
+
__all__ = ["AIContentmoderationSport"]
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
class AIContentmoderationSport(BaseModel):
|
|
12
|
+
category: Literal["sport", "weapon", "nsfw", "hard_nudity", "soft_nudity", "child_pornography"]
|
|
13
|
+
"""AI content moderation with types of sports activity detection"""
|
|
14
|
+
|
|
15
|
+
task_name: Literal["content-moderation"]
|
|
16
|
+
"""Name of the task to be performed"""
|
|
17
|
+
|
|
18
|
+
url: str
|
|
19
|
+
"""URL to the MP4 file to analyse.
|
|
20
|
+
|
|
21
|
+
File must be publicly accessible via HTTP/HTTPS.
|
|
22
|
+
"""
|
|
23
|
+
|
|
24
|
+
client_entity_data: Optional[str] = None
|
|
25
|
+
"""
|
|
26
|
+
Meta parameter, designed to store your own extra information about a video
|
|
27
|
+
entity: video source, video id, etc. It is not used in any way in video
|
|
28
|
+
processing. For example, if an AI-task was created automatically when you
|
|
29
|
+
uploaded a video with the AI auto-processing option (nudity detection, etc),
|
|
30
|
+
then the ID of the associated video for which the task was performed will be
|
|
31
|
+
explicitly indicated here.
|
|
32
|
+
"""
|
|
33
|
+
|
|
34
|
+
client_user_id: Optional[str] = None
|
|
35
|
+
"""Meta parameter, designed to store your own identifier.
|
|
36
|
+
|
|
37
|
+
Can be used by you to tag requests from different end-users. It is not used in
|
|
38
|
+
any way in video processing.
|
|
39
|
+
"""
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
from typing import Optional
|
|
4
|
+
from typing_extensions import Literal
|
|
5
|
+
|
|
6
|
+
from ..._models import BaseModel
|
|
7
|
+
|
|
8
|
+
__all__ = ["AIContentmoderationWeapon"]
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
class AIContentmoderationWeapon(BaseModel):
|
|
12
|
+
category: Literal["weapon", "sport", "nsfw", "hard_nudity", "soft_nudity", "child_pornography"]
|
|
13
|
+
"""AI content moderation with weapon detection algorithm"""
|
|
14
|
+
|
|
15
|
+
task_name: Literal["content-moderation"]
|
|
16
|
+
"""Name of the task to be performed"""
|
|
17
|
+
|
|
18
|
+
url: str
|
|
19
|
+
"""URL to the MP4 file to analyse.
|
|
20
|
+
|
|
21
|
+
File must be publicly accessible via HTTP/HTTPS.
|
|
22
|
+
"""
|
|
23
|
+
|
|
24
|
+
client_entity_data: Optional[str] = None
|
|
25
|
+
"""
|
|
26
|
+
Meta parameter, designed to store your own extra information about a video
|
|
27
|
+
entity: video source, video id, etc. It is not used in any way in video
|
|
28
|
+
processing. For example, if an AI-task was created automatically when you
|
|
29
|
+
uploaded a video with the AI auto-processing option (nudity detection, etc),
|
|
30
|
+
then the ID of the associated video for which the task was performed will be
|
|
31
|
+
explicitly indicated here.
|
|
32
|
+
"""
|
|
33
|
+
|
|
34
|
+
client_user_id: Optional[str] = None
|
|
35
|
+
"""Meta parameter, designed to store your own identifier.
|
|
36
|
+
|
|
37
|
+
Can be used by you to tag requests from different end-users. It is not used in
|
|
38
|
+
any way in video processing.
|
|
39
|
+
"""
|
|
@@ -0,0 +1,205 @@
|
|
|
1
|
+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
from typing import Union, Optional
|
|
4
|
+
from typing_extensions import Literal, TypeAlias
|
|
5
|
+
|
|
6
|
+
from ..._models import BaseModel
|
|
7
|
+
from .ai_contentmoderation_casm import AIContentmoderationCasm
|
|
8
|
+
from .ai_contentmoderation_nsfw import AIContentmoderationNsfw
|
|
9
|
+
from .ai_contentmoderation_sport import AIContentmoderationSport
|
|
10
|
+
from .ai_contentmoderation_weapon import AIContentmoderationWeapon
|
|
11
|
+
from .ai_contentmoderation_hardnudity import AIContentmoderationHardnudity
|
|
12
|
+
from .ai_contentmoderation_softnudity import AIContentmoderationSoftnudity
|
|
13
|
+
|
|
14
|
+
__all__ = ["AITask", "TaskData", "TaskDataAITranscribe"]
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
class TaskDataAITranscribe(BaseModel):
|
|
18
|
+
task_name: Literal["transcription"]
|
|
19
|
+
"""Name of the task to be performed"""
|
|
20
|
+
|
|
21
|
+
url: str
|
|
22
|
+
"""URL to the MP4 file to analyse.
|
|
23
|
+
|
|
24
|
+
File must be publicly accessible via HTTP/HTTPS.
|
|
25
|
+
"""
|
|
26
|
+
|
|
27
|
+
audio_language: Optional[str] = None
|
|
28
|
+
"""Language in original audio (transcription only).
|
|
29
|
+
|
|
30
|
+
This value is used to determine the language from which to transcribe. If this
|
|
31
|
+
is not set, the system will run auto language identification and the subtitles
|
|
32
|
+
will be in the detected language. The method also works based on AI analysis.
|
|
33
|
+
It's fairly accurate, but if it's wrong, then set the language explicitly.
|
|
34
|
+
Additionally, when this is not set, we also support recognition of alternate
|
|
35
|
+
languages in the video (language code-switching). Language is set by 3-letter
|
|
36
|
+
language code according to ISO-639-2 (bibliographic code). We can process
|
|
37
|
+
languages:
|
|
38
|
+
|
|
39
|
+
- 'afr': Afrikaans
|
|
40
|
+
- 'alb': Albanian
|
|
41
|
+
- 'amh': Amharic
|
|
42
|
+
- 'ara': Arabic
|
|
43
|
+
- 'arm': Armenian
|
|
44
|
+
- 'asm': Assamese
|
|
45
|
+
- 'aze': Azerbaijani
|
|
46
|
+
- 'bak': Bashkir
|
|
47
|
+
- 'baq': Basque
|
|
48
|
+
- 'bel': Belarusian
|
|
49
|
+
- 'ben': Bengali
|
|
50
|
+
- 'bos': Bosnian
|
|
51
|
+
- 'bre': Breton
|
|
52
|
+
- 'bul': Bulgarian
|
|
53
|
+
- 'bur': Myanmar
|
|
54
|
+
- 'cat': Catalan
|
|
55
|
+
- 'chi': Chinese
|
|
56
|
+
- 'cze': Czech
|
|
57
|
+
- 'dan': Danish
|
|
58
|
+
- 'dut': Nynorsk
|
|
59
|
+
- 'eng': English
|
|
60
|
+
- 'est': Estonian
|
|
61
|
+
- 'fao': Faroese
|
|
62
|
+
- 'fin': Finnish
|
|
63
|
+
- 'fre': French
|
|
64
|
+
- 'geo': Georgian
|
|
65
|
+
- 'ger': German
|
|
66
|
+
- 'glg': Galician
|
|
67
|
+
- 'gre': Greek
|
|
68
|
+
- 'guj': Gujarati
|
|
69
|
+
- 'hat': Haitian creole
|
|
70
|
+
- 'hau': Hausa
|
|
71
|
+
- 'haw': Hawaiian
|
|
72
|
+
- 'heb': Hebrew
|
|
73
|
+
- 'hin': Hindi
|
|
74
|
+
- 'hrv': Croatian
|
|
75
|
+
- 'hun': Hungarian
|
|
76
|
+
- 'ice': Icelandic
|
|
77
|
+
- 'ind': Indonesian
|
|
78
|
+
- 'ita': Italian
|
|
79
|
+
- 'jav': Javanese
|
|
80
|
+
- 'jpn': Japanese
|
|
81
|
+
- 'kan': Kannada
|
|
82
|
+
- 'kaz': Kazakh
|
|
83
|
+
- 'khm': Khmer
|
|
84
|
+
- 'kor': Korean
|
|
85
|
+
- 'lao': Lao
|
|
86
|
+
- 'lat': Latin
|
|
87
|
+
- 'lav': Latvian
|
|
88
|
+
- 'lin': Lingala
|
|
89
|
+
- 'lit': Lithuanian
|
|
90
|
+
- 'ltz': Luxembourgish
|
|
91
|
+
- 'mac': Macedonian
|
|
92
|
+
- 'mal': Malayalam
|
|
93
|
+
- 'mao': Maori
|
|
94
|
+
- 'mar': Marathi
|
|
95
|
+
- 'may': Malay
|
|
96
|
+
- 'mlg': Malagasy
|
|
97
|
+
- 'mlt': Maltese
|
|
98
|
+
- 'mon': Mongolian
|
|
99
|
+
- 'nep': Nepali
|
|
100
|
+
- 'dut': Dutch
|
|
101
|
+
- 'nor': Norwegian
|
|
102
|
+
- 'oci': Occitan
|
|
103
|
+
- 'pan': Punjabi
|
|
104
|
+
- 'per': Persian
|
|
105
|
+
- 'pol': Polish
|
|
106
|
+
- 'por': Portuguese
|
|
107
|
+
- 'pus': Pashto
|
|
108
|
+
- 'rum': Romanian
|
|
109
|
+
- 'rus': Russian
|
|
110
|
+
- 'san': Sanskrit
|
|
111
|
+
- 'sin': Sinhala
|
|
112
|
+
- 'slo': Slovak
|
|
113
|
+
- 'slv': Slovenian
|
|
114
|
+
- 'sna': Shona
|
|
115
|
+
- 'snd': Sindhi
|
|
116
|
+
- 'som': Somali
|
|
117
|
+
- 'spa': Spanish
|
|
118
|
+
- 'srp': Serbian
|
|
119
|
+
- 'sun': Sundanese
|
|
120
|
+
- 'swa': Swahili
|
|
121
|
+
- 'swe': Swedish
|
|
122
|
+
- 'tam': Tamil
|
|
123
|
+
- 'tat': Tatar
|
|
124
|
+
- 'tel': Telugu
|
|
125
|
+
- 'tgk': Tajik
|
|
126
|
+
- 'tgl': Tagalog
|
|
127
|
+
- 'tha': Thai
|
|
128
|
+
- 'tib': Tibetan
|
|
129
|
+
- 'tuk': Turkmen
|
|
130
|
+
- 'tur': Turkish
|
|
131
|
+
- 'ukr': Ukrainian
|
|
132
|
+
- 'urd': Urdu
|
|
133
|
+
- 'uzb': Uzbek
|
|
134
|
+
- 'vie': Vietnamese
|
|
135
|
+
- 'wel': Welsh
|
|
136
|
+
- 'yid': Yiddish
|
|
137
|
+
- 'yor': Yoruba
|
|
138
|
+
"""
|
|
139
|
+
|
|
140
|
+
client_entity_data: Optional[str] = None
|
|
141
|
+
"""
|
|
142
|
+
Meta parameter, designed to store your own extra information about a video
|
|
143
|
+
entity: video source, video id, etc. It is not used in any way in video
|
|
144
|
+
processing. For example, if an AI-task was created automatically when you
|
|
145
|
+
uploaded a video with the AI auto-processing option (transcribing,
|
|
146
|
+
translationing), then the ID of the associated video for which the task was
|
|
147
|
+
performed will be explicitly indicated here.
|
|
148
|
+
"""
|
|
149
|
+
|
|
150
|
+
client_user_id: Optional[str] = None
|
|
151
|
+
"""Meta parameter, designed to store your own identifier.
|
|
152
|
+
|
|
153
|
+
Can be used by you to tag requests from different end-users. It is not used in
|
|
154
|
+
any way in video processing.
|
|
155
|
+
"""
|
|
156
|
+
|
|
157
|
+
subtitles_language: Optional[str] = None
|
|
158
|
+
"""
|
|
159
|
+
Indicates which language it is clearly necessary to translate into. If this is
|
|
160
|
+
not set, the original language will be used from attribute "`audio_language`".
|
|
161
|
+
Please note that:
|
|
162
|
+
|
|
163
|
+
- transcription into the original language is a free procedure,
|
|
164
|
+
- and translation from the original language into any other languages is a
|
|
165
|
+
"translation" procedure and is paid. More details in
|
|
166
|
+
[POST /ai/tasks#transcribe](https://api.gcore.com/docs/streaming/docs/api-reference/streaming/ai/create-ai-asr-task).
|
|
167
|
+
Language is set by 3-letter language code according to ISO-639-2
|
|
168
|
+
(bibliographic code).
|
|
169
|
+
"""
|
|
170
|
+
|
|
171
|
+
|
|
172
|
+
TaskData: TypeAlias = Union[
|
|
173
|
+
TaskDataAITranscribe,
|
|
174
|
+
AIContentmoderationNsfw,
|
|
175
|
+
AIContentmoderationHardnudity,
|
|
176
|
+
AIContentmoderationSoftnudity,
|
|
177
|
+
AIContentmoderationCasm,
|
|
178
|
+
AIContentmoderationSport,
|
|
179
|
+
AIContentmoderationWeapon,
|
|
180
|
+
]
|
|
181
|
+
|
|
182
|
+
|
|
183
|
+
class AITask(BaseModel):
|
|
184
|
+
progress: Optional[int] = None
|
|
185
|
+
"""Percentage of task completed.
|
|
186
|
+
|
|
187
|
+
A value greater than 0 means that it has been taken into operation and is being
|
|
188
|
+
processed.
|
|
189
|
+
"""
|
|
190
|
+
|
|
191
|
+
status: Optional[Literal["PENDING", "STARTED", "SUCCESS", "FAILURE", "REVOKED", "RETRY"]] = None
|
|
192
|
+
"""Status of processing the AI task. See GET /ai/results method for description."""
|
|
193
|
+
|
|
194
|
+
task_data: Optional[TaskData] = None
|
|
195
|
+
"""
|
|
196
|
+
The object will correspond to the task type that was specified in the original
|
|
197
|
+
request. There will be one object for transcription, another for searching for
|
|
198
|
+
nudity, and so on.
|
|
199
|
+
"""
|
|
200
|
+
|
|
201
|
+
task_id: Optional[str] = None
|
|
202
|
+
"""ID of the AI task"""
|
|
203
|
+
|
|
204
|
+
task_name: Optional[Literal["content-moderation", "transcription"]] = None
|
|
205
|
+
"""Type of AI task"""
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
from typing import Optional
|
|
4
|
+
|
|
5
|
+
from ..._models import BaseModel
|
|
6
|
+
|
|
7
|
+
__all__ = ["AITaskCancelResponse"]
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
class AITaskCancelResponse(BaseModel):
|
|
11
|
+
result: Optional[str] = None
|
|
12
|
+
"""A textual explicit description of the result of the operation"""
|
|
@@ -0,0 +1,168 @@
|
|
|
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 Literal, Required, TypedDict
|
|
6
|
+
|
|
7
|
+
__all__ = ["AITaskCreateParams"]
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
class AITaskCreateParams(TypedDict, total=False):
|
|
11
|
+
task_name: Required[Literal["transcription", "content-moderation"]]
|
|
12
|
+
"""Name of the task to be performed"""
|
|
13
|
+
|
|
14
|
+
url: Required[str]
|
|
15
|
+
"""URL to the MP4 file to analyse.
|
|
16
|
+
|
|
17
|
+
File must be publicly accessible via HTTP/HTTPS.
|
|
18
|
+
"""
|
|
19
|
+
|
|
20
|
+
audio_language: str
|
|
21
|
+
"""Language in original audio (transcription only).
|
|
22
|
+
|
|
23
|
+
This value is used to determine the language from which to transcribe. If this
|
|
24
|
+
is not set, the system will run auto language identification and the subtitles
|
|
25
|
+
will be in the detected language. The method also works based on AI analysis.
|
|
26
|
+
It's fairly accurate, but if it's wrong, then set the language explicitly.
|
|
27
|
+
Additionally, when this is not set, we also support recognition of alternate
|
|
28
|
+
languages in the video (language code-switching). Language is set by 3-letter
|
|
29
|
+
language code according to ISO-639-2 (bibliographic code). We can process
|
|
30
|
+
languages:
|
|
31
|
+
|
|
32
|
+
- 'afr': Afrikaans
|
|
33
|
+
- 'alb': Albanian
|
|
34
|
+
- 'amh': Amharic
|
|
35
|
+
- 'ara': Arabic
|
|
36
|
+
- 'arm': Armenian
|
|
37
|
+
- 'asm': Assamese
|
|
38
|
+
- 'aze': Azerbaijani
|
|
39
|
+
- 'bak': Bashkir
|
|
40
|
+
- 'baq': Basque
|
|
41
|
+
- 'bel': Belarusian
|
|
42
|
+
- 'ben': Bengali
|
|
43
|
+
- 'bos': Bosnian
|
|
44
|
+
- 'bre': Breton
|
|
45
|
+
- 'bul': Bulgarian
|
|
46
|
+
- 'bur': Myanmar
|
|
47
|
+
- 'cat': Catalan
|
|
48
|
+
- 'chi': Chinese
|
|
49
|
+
- 'cze': Czech
|
|
50
|
+
- 'dan': Danish
|
|
51
|
+
- 'dut': Nynorsk
|
|
52
|
+
- 'eng': English
|
|
53
|
+
- 'est': Estonian
|
|
54
|
+
- 'fao': Faroese
|
|
55
|
+
- 'fin': Finnish
|
|
56
|
+
- 'fre': French
|
|
57
|
+
- 'geo': Georgian
|
|
58
|
+
- 'ger': German
|
|
59
|
+
- 'glg': Galician
|
|
60
|
+
- 'gre': Greek
|
|
61
|
+
- 'guj': Gujarati
|
|
62
|
+
- 'hat': Haitian creole
|
|
63
|
+
- 'hau': Hausa
|
|
64
|
+
- 'haw': Hawaiian
|
|
65
|
+
- 'heb': Hebrew
|
|
66
|
+
- 'hin': Hindi
|
|
67
|
+
- 'hrv': Croatian
|
|
68
|
+
- 'hun': Hungarian
|
|
69
|
+
- 'ice': Icelandic
|
|
70
|
+
- 'ind': Indonesian
|
|
71
|
+
- 'ita': Italian
|
|
72
|
+
- 'jav': Javanese
|
|
73
|
+
- 'jpn': Japanese
|
|
74
|
+
- 'kan': Kannada
|
|
75
|
+
- 'kaz': Kazakh
|
|
76
|
+
- 'khm': Khmer
|
|
77
|
+
- 'kor': Korean
|
|
78
|
+
- 'lao': Lao
|
|
79
|
+
- 'lat': Latin
|
|
80
|
+
- 'lav': Latvian
|
|
81
|
+
- 'lin': Lingala
|
|
82
|
+
- 'lit': Lithuanian
|
|
83
|
+
- 'ltz': Luxembourgish
|
|
84
|
+
- 'mac': Macedonian
|
|
85
|
+
- 'mal': Malayalam
|
|
86
|
+
- 'mao': Maori
|
|
87
|
+
- 'mar': Marathi
|
|
88
|
+
- 'may': Malay
|
|
89
|
+
- 'mlg': Malagasy
|
|
90
|
+
- 'mlt': Maltese
|
|
91
|
+
- 'mon': Mongolian
|
|
92
|
+
- 'nep': Nepali
|
|
93
|
+
- 'dut': Dutch
|
|
94
|
+
- 'nor': Norwegian
|
|
95
|
+
- 'oci': Occitan
|
|
96
|
+
- 'pan': Punjabi
|
|
97
|
+
- 'per': Persian
|
|
98
|
+
- 'pol': Polish
|
|
99
|
+
- 'por': Portuguese
|
|
100
|
+
- 'pus': Pashto
|
|
101
|
+
- 'rum': Romanian
|
|
102
|
+
- 'rus': Russian
|
|
103
|
+
- 'san': Sanskrit
|
|
104
|
+
- 'sin': Sinhala
|
|
105
|
+
- 'slo': Slovak
|
|
106
|
+
- 'slv': Slovenian
|
|
107
|
+
- 'sna': Shona
|
|
108
|
+
- 'snd': Sindhi
|
|
109
|
+
- 'som': Somali
|
|
110
|
+
- 'spa': Spanish
|
|
111
|
+
- 'srp': Serbian
|
|
112
|
+
- 'sun': Sundanese
|
|
113
|
+
- 'swa': Swahili
|
|
114
|
+
- 'swe': Swedish
|
|
115
|
+
- 'tam': Tamil
|
|
116
|
+
- 'tat': Tatar
|
|
117
|
+
- 'tel': Telugu
|
|
118
|
+
- 'tgk': Tajik
|
|
119
|
+
- 'tgl': Tagalog
|
|
120
|
+
- 'tha': Thai
|
|
121
|
+
- 'tib': Tibetan
|
|
122
|
+
- 'tuk': Turkmen
|
|
123
|
+
- 'tur': Turkish
|
|
124
|
+
- 'ukr': Ukrainian
|
|
125
|
+
- 'urd': Urdu
|
|
126
|
+
- 'uzb': Uzbek
|
|
127
|
+
- 'vie': Vietnamese
|
|
128
|
+
- 'wel': Welsh
|
|
129
|
+
- 'yid': Yiddish
|
|
130
|
+
- 'yor': Yoruba
|
|
131
|
+
"""
|
|
132
|
+
|
|
133
|
+
category: Literal["sport", "weapon", "nsfw", "hard_nudity", "soft_nudity", "child_pornography"]
|
|
134
|
+
"""Model for analysis (content-moderation only).
|
|
135
|
+
|
|
136
|
+
Determines what exactly needs to be found in the video.
|
|
137
|
+
"""
|
|
138
|
+
|
|
139
|
+
client_entity_data: str
|
|
140
|
+
"""
|
|
141
|
+
Meta parameter, designed to store your own extra information about a video
|
|
142
|
+
entity: video source, video id, etc. It is not used in any way in video
|
|
143
|
+
processing. For example, if an AI-task was created automatically when you
|
|
144
|
+
uploaded a video with the AI auto-processing option (nudity detection, etc),
|
|
145
|
+
then the ID of the associated video for which the task was performed will be
|
|
146
|
+
explicitly indicated here.
|
|
147
|
+
"""
|
|
148
|
+
|
|
149
|
+
client_user_id: str
|
|
150
|
+
"""Meta parameter, designed to store your own identifier.
|
|
151
|
+
|
|
152
|
+
Can be used by you to tag requests from different end-users. It is not used in
|
|
153
|
+
any way in video processing.
|
|
154
|
+
"""
|
|
155
|
+
|
|
156
|
+
subtitles_language: str
|
|
157
|
+
"""
|
|
158
|
+
Indicates which language it is clearly necessary to translate into. If this is
|
|
159
|
+
not set, the original language will be used from attribute "`audio_language`".
|
|
160
|
+
Please note that:
|
|
161
|
+
|
|
162
|
+
- transcription into the original language is a free procedure,
|
|
163
|
+
- and translation from the original language into any other languages is a
|
|
164
|
+
"translation" procedure and is paid. More details in
|
|
165
|
+
[POST /ai/tasks#transcribe](https://api.gcore.com/docs/streaming/docs/api-reference/streaming/ai/create-ai-asr-task).
|
|
166
|
+
Language is set by 3-letter language code according to ISO-639-2
|
|
167
|
+
(bibliographic code).
|
|
168
|
+
"""
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
from ..._models import BaseModel
|
|
4
|
+
|
|
5
|
+
__all__ = ["AITaskCreateResponse"]
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
class AITaskCreateResponse(BaseModel):
|
|
9
|
+
task_id: str
|
|
10
|
+
"""ID of the created AI task, from which you can get the execution result"""
|
|
@@ -0,0 +1,27 @@
|
|
|
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 Literal, Required, TypedDict
|
|
6
|
+
|
|
7
|
+
__all__ = ["AITaskGetAISettingsParams"]
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
class AITaskGetAISettingsParams(TypedDict, total=False):
|
|
11
|
+
type: Required[Literal["language_support"]]
|
|
12
|
+
"""The parameters section for which parameters are requested"""
|
|
13
|
+
|
|
14
|
+
audio_language: str
|
|
15
|
+
"""The source language from which the audio will be transcribed.
|
|
16
|
+
|
|
17
|
+
Required when `type=language_support`. Value is 3-letter language code according
|
|
18
|
+
to ISO-639-2 (bibliographic code), (e.g., fre for French).
|
|
19
|
+
"""
|
|
20
|
+
|
|
21
|
+
subtitles_language: str
|
|
22
|
+
"""The target language the text will be translated into.
|
|
23
|
+
|
|
24
|
+
If omitted, the API will return whether the `audio_language` is supported for
|
|
25
|
+
transcription only, instead of translation. Value is 3-letter language code
|
|
26
|
+
according to ISO-639-2 (bibliographic code), (e.g., fre for French).
|
|
27
|
+
"""
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
from typing import Optional
|
|
4
|
+
|
|
5
|
+
from ..._models import BaseModel
|
|
6
|
+
|
|
7
|
+
__all__ = ["AITaskGetAISettingsResponse"]
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
class AITaskGetAISettingsResponse(BaseModel):
|
|
11
|
+
supported: Optional[bool] = None
|
|
12
|
+
"""Is the given language pair supported for transcription and translation?"""
|