vgen-apimatic-sdk 0.0.1
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.
- checksums.yaml +7 -0
- data/LICENSE +28 -0
- data/README.md +152 -0
- data/bin/console +15 -0
- data/lib/videogen/api_helper.rb +10 -0
- data/lib/videogen/apis/account_api.rb +31 -0
- data/lib/videogen/apis/assistant_api.rb +191 -0
- data/lib/videogen/apis/base_api.rb +67 -0
- data/lib/videogen/apis/entities_api.rb +230 -0
- data/lib/videogen/apis/files_api.rb +263 -0
- data/lib/videogen/apis/projects_api.rb +355 -0
- data/lib/videogen/apis/resources_api.rb +81 -0
- data/lib/videogen/apis/text_api.rb +39 -0
- data/lib/videogen/apis/tools_api.rb +494 -0
- data/lib/videogen/apis/webhooks_api.rb +94 -0
- data/lib/videogen/apis/workflows_api.rb +217 -0
- data/lib/videogen/client.rb +127 -0
- data/lib/videogen/configuration.rb +166 -0
- data/lib/videogen/exceptions/api_exception.rb +21 -0
- data/lib/videogen/http/api_response.rb +19 -0
- data/lib/videogen/http/auth/oauth_2.rb +53 -0
- data/lib/videogen/http/http_call_back.rb +10 -0
- data/lib/videogen/http/http_method_enum.rb +10 -0
- data/lib/videogen/http/http_request.rb +10 -0
- data/lib/videogen/http/http_response.rb +10 -0
- data/lib/videogen/http/proxy_settings.rb +22 -0
- data/lib/videogen/logging/configuration/api_logging_configuration.rb +186 -0
- data/lib/videogen/logging/sdk_logger.rb +17 -0
- data/lib/videogen/models/act_on_assistant_action_request.rb +77 -0
- data/lib/videogen/models/act_on_assistant_action_request_decision.rb +36 -0
- data/lib/videogen/models/act_on_assistant_action_response.rb +77 -0
- data/lib/videogen/models/add_entity_reference_request.rb +95 -0
- data/lib/videogen/models/api_error.rb +137 -0
- data/lib/videogen/models/aspect_ratio.rb +105 -0
- data/lib/videogen/models/aspect_ratio1.rb +82 -0
- data/lib/videogen/models/aspect_ratio2.rb +82 -0
- data/lib/videogen/models/aspect_ratio4.rb +83 -0
- data/lib/videogen/models/assistant_action.rb +148 -0
- data/lib/videogen/models/assistant_action_detail.rb +108 -0
- data/lib/videogen/models/assistant_action_detail1.rb +117 -0
- data/lib/videogen/models/assistant_action_kind.rb +52 -0
- data/lib/videogen/models/assistant_message.rb +167 -0
- data/lib/videogen/models/assistant_message1.rb +259 -0
- data/lib/videogen/models/assistant_message_attachment.rb +101 -0
- data/lib/videogen/models/assistant_message_status.rb +49 -0
- data/lib/videogen/models/assistant_workflow_suggestion.rb +133 -0
- data/lib/videogen/models/base_model.rb +110 -0
- data/lib/videogen/models/content_policy_config.rb +80 -0
- data/lib/videogen/models/create_entity_request.rb +96 -0
- data/lib/videogen/models/create_entity_request_entity_type.rb +47 -0
- data/lib/videogen/models/create_file_upload_request.rb +125 -0
- data/lib/videogen/models/create_timeline_interchange_request.rb +93 -0
- data/lib/videogen/models/create_timeline_interchange_response.rb +76 -0
- data/lib/videogen/models/create_webhook_endpoint_request.rb +94 -0
- data/lib/videogen/models/end_screen_mode.rb +43 -0
- data/lib/videogen/models/entity.rb +166 -0
- data/lib/videogen/models/entity_actor_config.rb +101 -0
- data/lib/videogen/models/entity_archive_response.rb +82 -0
- data/lib/videogen/models/entity_entity_type.rb +47 -0
- data/lib/videogen/models/entity_reference.rb +93 -0
- data/lib/videogen/models/error_requirement.rb +101 -0
- data/lib/videogen/models/executed_tool.rb +148 -0
- data/lib/videogen/models/export_delivery_destination.rb +110 -0
- data/lib/videogen/models/export_delivery_destination_type.rb +36 -0
- data/lib/videogen/models/export_project_quality.rb +44 -0
- data/lib/videogen/models/export_project_request.rb +124 -0
- data/lib/videogen/models/export_project_response.rb +76 -0
- data/lib/videogen/models/file_analysis_metadata.rb +112 -0
- data/lib/videogen/models/file_analysis_metadata1.rb +112 -0
- data/lib/videogen/models/file_analysis_metadata_analysis_loading_state.rb +48 -0
- data/lib/videogen/models/file_info.rb +386 -0
- data/lib/videogen/models/file_info1.rb +387 -0
- data/lib/videogen/models/file_info_scope.rb +54 -0
- data/lib/videogen/models/file_source.rb +134 -0
- data/lib/videogen/models/file_source_status.rb +46 -0
- data/lib/videogen/models/file_type.rb +57 -0
- data/lib/videogen/models/file_type1.rb +56 -0
- data/lib/videogen/models/file_type2.rb +57 -0
- data/lib/videogen/models/file_upload_response.rb +82 -0
- data/lib/videogen/models/generate_avatar_request.rb +149 -0
- data/lib/videogen/models/generate_image_request.rb +187 -0
- data/lib/videogen/models/generate_motion_graphic_request.rb +193 -0
- data/lib/videogen/models/generate_music_request.rb +111 -0
- data/lib/videogen/models/generate_sound_effect_request.rb +139 -0
- data/lib/videogen/models/generate_text_request.rb +120 -0
- data/lib/videogen/models/generate_text_response.rb +72 -0
- data/lib/videogen/models/generate_video_clip_request.rb +297 -0
- data/lib/videogen/models/get_assistant_response.rb +135 -0
- data/lib/videogen/models/get_files_response.rb +102 -0
- data/lib/videogen/models/image_asset_request.rb +125 -0
- data/lib/videogen/models/job_status.rb +51 -0
- data/lib/videogen/models/language.rb +83 -0
- data/lib/videogen/models/language_list_response.rb +83 -0
- data/lib/videogen/models/list_entities_response.rb +103 -0
- data/lib/videogen/models/list_project_exports_response.rb +104 -0
- data/lib/videogen/models/list_projects_response.rb +105 -0
- data/lib/videogen/models/list_remix_actions_response.rb +103 -0
- data/lib/videogen/models/me_response.rb +114 -0
- data/lib/videogen/models/model_quality.rb +51 -0
- data/lib/videogen/models/model_quality1.rb +47 -0
- data/lib/videogen/models/model_quality10.rb +46 -0
- data/lib/videogen/models/model_quality11.rb +46 -0
- data/lib/videogen/models/model_quality12.rb +45 -0
- data/lib/videogen/models/model_quality13.rb +46 -0
- data/lib/videogen/models/model_quality2.rb +46 -0
- data/lib/videogen/models/model_quality3.rb +46 -0
- data/lib/videogen/models/model_quality4.rb +48 -0
- data/lib/videogen/models/model_quality9.rb +47 -0
- data/lib/videogen/models/motion_graphic_sub_tool_mode.rb +44 -0
- data/lib/videogen/models/motion_graphic_sub_tool_mode1.rb +40 -0
- data/lib/videogen/models/motion_graphic_sub_tool_mode2.rb +41 -0
- data/lib/videogen/models/motion_graphic_sub_tool_mode3.rb +40 -0
- data/lib/videogen/models/motion_graphic_sub_tool_mode4.rb +40 -0
- data/lib/videogen/models/motion_graphic_sub_tool_modes.rb +114 -0
- data/lib/videogen/models/motion_graphic_sub_tool_modes1.rb +116 -0
- data/lib/videogen/models/project_export.rb +207 -0
- data/lib/videogen/models/project_response.rb +151 -0
- data/lib/videogen/models/project_response_status.rb +36 -0
- data/lib/videogen/models/prompt_to_video_clip_request.rb +155 -0
- data/lib/videogen/models/pronunciation_replacement.rb +82 -0
- data/lib/videogen/models/remix_action.rb +111 -0
- data/lib/videogen/models/remix_action1.rb +123 -0
- data/lib/videogen/models/remix_action10.rb +115 -0
- data/lib/videogen/models/remix_action11.rb +148 -0
- data/lib/videogen/models/remix_action12.rb +89 -0
- data/lib/videogen/models/remix_action13.rb +105 -0
- data/lib/videogen/models/remix_action14.rb +138 -0
- data/lib/videogen/models/remix_action2.rb +101 -0
- data/lib/videogen/models/remix_action3.rb +85 -0
- data/lib/videogen/models/remix_action4.rb +120 -0
- data/lib/videogen/models/remix_action5.rb +88 -0
- data/lib/videogen/models/remix_action6.rb +106 -0
- data/lib/videogen/models/remix_action7.rb +137 -0
- data/lib/videogen/models/remix_action8.rb +131 -0
- data/lib/videogen/models/remix_action9.rb +120 -0
- data/lib/videogen/models/remix_action_discriminator_mapping_set_logo_position.rb +53 -0
- data/lib/videogen/models/remix_action_run.rb +150 -0
- data/lib/videogen/models/remix_action_type.rb +88 -0
- data/lib/videogen/models/remix_project_request.rb +105 -0
- data/lib/videogen/models/remix_project_response.rb +101 -0
- data/lib/videogen/models/remix_transition_style.rb +58 -0
- data/lib/videogen/models/remove_entity_reference_request.rb +73 -0
- data/lib/videogen/models/scene_description_range.rb +121 -0
- data/lib/videogen/models/script_to_video_request.rb +309 -0
- data/lib/videogen/models/search_files_request.rb +96 -0
- data/lib/videogen/models/search_files_response.rb +82 -0
- data/lib/videogen/models/search_files_result.rb +85 -0
- data/lib/videogen/models/send_assistant_message_request.rb +73 -0
- data/lib/videogen/models/send_assistant_message_response.rb +76 -0
- data/lib/videogen/models/slideshow_to_video_request.rb +276 -0
- data/lib/videogen/models/start_assistant_chat_request.rb +88 -0
- data/lib/videogen/models/start_assistant_chat_response.rb +105 -0
- data/lib/videogen/models/start_tool_execution_response.rb +76 -0
- data/lib/videogen/models/start_workflow_run_response.rb +141 -0
- data/lib/videogen/models/text_to_speech_request.rb +191 -0
- data/lib/videogen/models/timeline_interchange.rb +210 -0
- data/lib/videogen/models/timeline_interchange_format.rb +47 -0
- data/lib/videogen/models/timeline_interchange_media_delivery.rb +39 -0
- data/lib/videogen/models/tool_execution_list_response.rb +104 -0
- data/lib/videogen/models/tool_success_result.rb +152 -0
- data/lib/videogen/models/transcript.rb +97 -0
- data/lib/videogen/models/transcript_word.rb +93 -0
- data/lib/videogen/models/tts_voice.rb +162 -0
- data/lib/videogen/models/tts_voice_display_gender.rb +40 -0
- data/lib/videogen/models/tts_voice_list_response.rb +103 -0
- data/lib/videogen/models/update_entity_request.rb +88 -0
- data/lib/videogen/models/v1_entities_get_parameters_entity_type.rb +44 -0
- data/lib/videogen/models/video_asset_request.rb +125 -0
- data/lib/videogen/models/visual_pacing.rb +41 -0
- data/lib/videogen/models/voiceover_to_video_request.rb +297 -0
- data/lib/videogen/models/watermark_mode.rb +43 -0
- data/lib/videogen/models/webhook_endpoint.rb +137 -0
- data/lib/videogen/models/webhook_endpoint_list_response.rb +103 -0
- data/lib/videogen/models/webhook_event_name.rb +100 -0
- data/lib/videogen/models/workflow_caption_background_style.rb +133 -0
- data/lib/videogen/models/workflow_caption_background_style_type.rb +41 -0
- data/lib/videogen/models/workflow_caption_style.rb +220 -0
- data/lib/videogen/models/workflow_caption_style_font_weight.rb +64 -0
- data/lib/videogen/models/workflow_caption_style_text_justification.rb +40 -0
- data/lib/videogen/models/workflow_caption_style_vertical_alignment.rb +40 -0
- data/lib/videogen/models/workflow_rgb_color.rb +116 -0
- data/lib/videogen/models/workflow_run.rb +150 -0
- data/lib/videogen/models/workflow_run_list_response.rb +103 -0
- data/lib/videogen/models/workflow_type.rb +52 -0
- data/lib/videogen/models/workflow_type1.rb +52 -0
- data/lib/videogen/models/workflow_visual_style.rb +136 -0
- data/lib/videogen/models/workflow_visual_style_type.rb +38 -0
- data/lib/videogen/utilities/date_time_helper.rb +11 -0
- data/lib/videogen/utilities/file_wrapper.rb +28 -0
- data/lib/videogen/utilities/union_type_lookup.rb +188 -0
- data/lib/videogen.rb +213 -0
- metadata +275 -0
|
@@ -0,0 +1,193 @@
|
|
|
1
|
+
# videogen
|
|
2
|
+
#
|
|
3
|
+
# This file was automatically generated by APIMATIC v3.0 (
|
|
4
|
+
# https://www.apimatic.io ).
|
|
5
|
+
|
|
6
|
+
module Videogen
|
|
7
|
+
# GenerateMotionGraphicRequest Model.
|
|
8
|
+
class GenerateMotionGraphicRequest < BaseModel
|
|
9
|
+
SKIP = Object.new
|
|
10
|
+
private_constant :SKIP
|
|
11
|
+
|
|
12
|
+
# Text prompt describing the animated motion graphic to generate. Describe
|
|
13
|
+
# the on-screen elements, any text and how it should animate, and the
|
|
14
|
+
# overall motion in plain language.
|
|
15
|
+
# @return [String]
|
|
16
|
+
attr_accessor :prompt
|
|
17
|
+
|
|
18
|
+
# Optional file ids of uploaded reference media (images, videos, or audio)
|
|
19
|
+
# the motion graphic may display or animate (e.g. `["vg_file_..."]`). Upload
|
|
20
|
+
# files first via `POST /v1/files/upload`, then pass the returned ids here.
|
|
21
|
+
# @return [Array[String]]
|
|
22
|
+
attr_accessor :file_ids
|
|
23
|
+
|
|
24
|
+
# Optional actor, product, or visual-style entity ids (e.g.
|
|
25
|
+
# `["vg_enti_..."]`). The motion graphic uses each entity as
|
|
26
|
+
# identity/reference the same way in-app motion graphic generation does. Can
|
|
27
|
+
# be combined with `fileIds`. Mentions in `prompt` are also collected. A
|
|
28
|
+
# missing id returns not found; an inaccessible id returns a permission
|
|
29
|
+
# error.
|
|
30
|
+
# @return [Array[String]]
|
|
31
|
+
attr_accessor :entity_ids
|
|
32
|
+
|
|
33
|
+
# Desired length of the motion graphic in seconds, a whole number between 1
|
|
34
|
+
# and 300. When omitted, the duration is chosen automatically to fit the
|
|
35
|
+
# prompt (recommended).
|
|
36
|
+
# @return [Integer]
|
|
37
|
+
attr_accessor :duration_seconds
|
|
38
|
+
|
|
39
|
+
# Aspect ratio for the generated motion graphic. Defaults to 16:9 when
|
|
40
|
+
# omitted.
|
|
41
|
+
# @return [AspectRatio4]
|
|
42
|
+
attr_accessor :aspect_ratio
|
|
43
|
+
|
|
44
|
+
# When true, renders the motion graphic with a transparent background as a
|
|
45
|
+
# WebM video suitable for overlaying on other video or images. Set to false
|
|
46
|
+
# for an opaque MP4. Defaults to true.
|
|
47
|
+
# @return [TrueClass | FalseClass]
|
|
48
|
+
attr_accessor :transparent_background
|
|
49
|
+
|
|
50
|
+
# Optional per-capability controls for the media the motion graphic may
|
|
51
|
+
# generate or fetch (generated images, generated video clips, generated
|
|
52
|
+
# voiceover, and stock media search). Each capability is AUTO, ENABLED, or
|
|
53
|
+
# DISABLED. Omit to use AUTO for every capability.
|
|
54
|
+
# @return [MotionGraphicSubToolModes1]
|
|
55
|
+
attr_accessor :sub_tool_modes
|
|
56
|
+
|
|
57
|
+
# Number of output results to generate. Defaults to 1.
|
|
58
|
+
# @return [Integer]
|
|
59
|
+
attr_accessor :num_results
|
|
60
|
+
|
|
61
|
+
# When true, generated files are temporary. Temporary files are guaranteed
|
|
62
|
+
# to be available for 24 hours, after which they may be archived at any
|
|
63
|
+
# time. Temporary files are not analyzed (no description, transcript, or
|
|
64
|
+
# embedding will be generated), so they will not appear in search results.
|
|
65
|
+
# Defaults to false.
|
|
66
|
+
# @return [TrueClass | FalseClass]
|
|
67
|
+
attr_accessor :is_output_temporary
|
|
68
|
+
|
|
69
|
+
# When true, generated files are hidden from the VideoGen Media page by
|
|
70
|
+
# default. They remain accessible through the API. Defaults to false.
|
|
71
|
+
# @return [TrueClass | FalseClass]
|
|
72
|
+
attr_accessor :hide_from_ui
|
|
73
|
+
|
|
74
|
+
# A mapping from model property names to API property names.
|
|
75
|
+
def self.names
|
|
76
|
+
@_hash = {} if @_hash.nil?
|
|
77
|
+
@_hash['prompt'] = 'prompt'
|
|
78
|
+
@_hash['file_ids'] = 'fileIds'
|
|
79
|
+
@_hash['entity_ids'] = 'entityIds'
|
|
80
|
+
@_hash['duration_seconds'] = 'durationSeconds'
|
|
81
|
+
@_hash['aspect_ratio'] = 'aspectRatio'
|
|
82
|
+
@_hash['transparent_background'] = 'transparentBackground'
|
|
83
|
+
@_hash['sub_tool_modes'] = 'subToolModes'
|
|
84
|
+
@_hash['num_results'] = 'numResults'
|
|
85
|
+
@_hash['is_output_temporary'] = 'isOutputTemporary'
|
|
86
|
+
@_hash['hide_from_ui'] = 'hideFromUi'
|
|
87
|
+
@_hash
|
|
88
|
+
end
|
|
89
|
+
|
|
90
|
+
# An array for optional fields
|
|
91
|
+
def self.optionals
|
|
92
|
+
%w[
|
|
93
|
+
file_ids
|
|
94
|
+
entity_ids
|
|
95
|
+
duration_seconds
|
|
96
|
+
aspect_ratio
|
|
97
|
+
transparent_background
|
|
98
|
+
sub_tool_modes
|
|
99
|
+
num_results
|
|
100
|
+
is_output_temporary
|
|
101
|
+
hide_from_ui
|
|
102
|
+
]
|
|
103
|
+
end
|
|
104
|
+
|
|
105
|
+
# An array for nullable fields
|
|
106
|
+
def self.nullables
|
|
107
|
+
%w[
|
|
108
|
+
duration_seconds
|
|
109
|
+
]
|
|
110
|
+
end
|
|
111
|
+
|
|
112
|
+
def initialize(prompt:, file_ids: SKIP, entity_ids: SKIP,
|
|
113
|
+
duration_seconds: SKIP, aspect_ratio: SKIP,
|
|
114
|
+
transparent_background: true, sub_tool_modes: SKIP,
|
|
115
|
+
num_results: 1, is_output_temporary: false,
|
|
116
|
+
hide_from_ui: false, additional_properties: nil)
|
|
117
|
+
# Add additional model properties to the instance
|
|
118
|
+
additional_properties = {} if additional_properties.nil?
|
|
119
|
+
|
|
120
|
+
@prompt = prompt
|
|
121
|
+
@file_ids = file_ids unless file_ids == SKIP
|
|
122
|
+
@entity_ids = entity_ids unless entity_ids == SKIP
|
|
123
|
+
@duration_seconds = duration_seconds unless duration_seconds == SKIP
|
|
124
|
+
@aspect_ratio = aspect_ratio unless aspect_ratio == SKIP
|
|
125
|
+
@transparent_background = transparent_background unless transparent_background == SKIP
|
|
126
|
+
@sub_tool_modes = sub_tool_modes unless sub_tool_modes == SKIP
|
|
127
|
+
@num_results = num_results unless num_results == SKIP
|
|
128
|
+
@is_output_temporary = is_output_temporary unless is_output_temporary == SKIP
|
|
129
|
+
@hide_from_ui = hide_from_ui unless hide_from_ui == SKIP
|
|
130
|
+
@additional_properties = additional_properties
|
|
131
|
+
end
|
|
132
|
+
|
|
133
|
+
# Creates an instance of the object from a hash.
|
|
134
|
+
def self.from_hash(hash)
|
|
135
|
+
return nil unless hash
|
|
136
|
+
|
|
137
|
+
# Extract variables from the hash.
|
|
138
|
+
prompt = hash.key?('prompt') ? hash['prompt'] : nil
|
|
139
|
+
file_ids = hash.key?('fileIds') ? hash['fileIds'] : SKIP
|
|
140
|
+
entity_ids = hash.key?('entityIds') ? hash['entityIds'] : SKIP
|
|
141
|
+
duration_seconds =
|
|
142
|
+
hash.key?('durationSeconds') ? hash['durationSeconds'] : SKIP
|
|
143
|
+
aspect_ratio = AspectRatio4.from_hash(hash['aspectRatio']) if hash['aspectRatio']
|
|
144
|
+
transparent_background = hash['transparentBackground'] ||= true
|
|
145
|
+
sub_tool_modes = MotionGraphicSubToolModes1.from_hash(hash['subToolModes']) if
|
|
146
|
+
hash['subToolModes']
|
|
147
|
+
num_results = hash['numResults'] ||= 1
|
|
148
|
+
is_output_temporary = hash['isOutputTemporary'] ||= false
|
|
149
|
+
hide_from_ui = hash['hideFromUi'] ||= false
|
|
150
|
+
|
|
151
|
+
# Create a new hash for additional properties, removing known properties.
|
|
152
|
+
new_hash = hash.reject { |k, _| names.value?(k) }
|
|
153
|
+
|
|
154
|
+
additional_properties = APIHelper.get_additional_properties(
|
|
155
|
+
new_hash, proc { |value| value }
|
|
156
|
+
)
|
|
157
|
+
|
|
158
|
+
# Create object from extracted values.
|
|
159
|
+
GenerateMotionGraphicRequest.new(prompt: prompt,
|
|
160
|
+
file_ids: file_ids,
|
|
161
|
+
entity_ids: entity_ids,
|
|
162
|
+
duration_seconds: duration_seconds,
|
|
163
|
+
aspect_ratio: aspect_ratio,
|
|
164
|
+
transparent_background: transparent_background,
|
|
165
|
+
sub_tool_modes: sub_tool_modes,
|
|
166
|
+
num_results: num_results,
|
|
167
|
+
is_output_temporary: is_output_temporary,
|
|
168
|
+
hide_from_ui: hide_from_ui,
|
|
169
|
+
additional_properties: additional_properties)
|
|
170
|
+
end
|
|
171
|
+
|
|
172
|
+
# Provides a human-readable string representation of the object.
|
|
173
|
+
def to_s
|
|
174
|
+
class_name = self.class.name.split('::').last
|
|
175
|
+
"<#{class_name} prompt: #{@prompt}, file_ids: #{@file_ids}, entity_ids: #{@entity_ids},"\
|
|
176
|
+
" duration_seconds: #{@duration_seconds}, aspect_ratio: #{@aspect_ratio},"\
|
|
177
|
+
" transparent_background: #{@transparent_background}, sub_tool_modes: #{@sub_tool_modes},"\
|
|
178
|
+
" num_results: #{@num_results}, is_output_temporary: #{@is_output_temporary}, hide_from_ui:"\
|
|
179
|
+
" #{@hide_from_ui}, additional_properties: #{@additional_properties}>"
|
|
180
|
+
end
|
|
181
|
+
|
|
182
|
+
# Provides a debugging-friendly string with detailed object information.
|
|
183
|
+
def inspect
|
|
184
|
+
class_name = self.class.name.split('::').last
|
|
185
|
+
"<#{class_name} prompt: #{@prompt.inspect}, file_ids: #{@file_ids.inspect}, entity_ids:"\
|
|
186
|
+
" #{@entity_ids.inspect}, duration_seconds: #{@duration_seconds.inspect}, aspect_ratio:"\
|
|
187
|
+
" #{@aspect_ratio.inspect}, transparent_background: #{@transparent_background.inspect},"\
|
|
188
|
+
" sub_tool_modes: #{@sub_tool_modes.inspect}, num_results: #{@num_results.inspect},"\
|
|
189
|
+
" is_output_temporary: #{@is_output_temporary.inspect}, hide_from_ui:"\
|
|
190
|
+
" #{@hide_from_ui.inspect}, additional_properties: #{@additional_properties}>"
|
|
191
|
+
end
|
|
192
|
+
end
|
|
193
|
+
end
|
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
# videogen
|
|
2
|
+
#
|
|
3
|
+
# This file was automatically generated by APIMATIC v3.0 (
|
|
4
|
+
# https://www.apimatic.io ).
|
|
5
|
+
|
|
6
|
+
module Videogen
|
|
7
|
+
# GenerateMusicRequest Model.
|
|
8
|
+
class GenerateMusicRequest < BaseModel
|
|
9
|
+
SKIP = Object.new
|
|
10
|
+
private_constant :SKIP
|
|
11
|
+
|
|
12
|
+
# A text description of the music to generate. Include genre, mood,
|
|
13
|
+
# instrumentation, and tempo for best results.
|
|
14
|
+
# @return [String]
|
|
15
|
+
attr_accessor :prompt
|
|
16
|
+
|
|
17
|
+
# Number of output results to generate. Defaults to 1.
|
|
18
|
+
# @return [Integer]
|
|
19
|
+
attr_accessor :num_results
|
|
20
|
+
|
|
21
|
+
# When true, generated files are temporary. Temporary files are guaranteed
|
|
22
|
+
# to be available for 24 hours, after which they may be archived at any
|
|
23
|
+
# time. Temporary files are not analyzed (no description, transcript, or
|
|
24
|
+
# embedding will be generated), so they will not appear in search results.
|
|
25
|
+
# Defaults to false.
|
|
26
|
+
# @return [TrueClass | FalseClass]
|
|
27
|
+
attr_accessor :is_output_temporary
|
|
28
|
+
|
|
29
|
+
# When true, generated files are hidden from the VideoGen Media page by
|
|
30
|
+
# default. They remain accessible through the API. Defaults to false.
|
|
31
|
+
# @return [TrueClass | FalseClass]
|
|
32
|
+
attr_accessor :hide_from_ui
|
|
33
|
+
|
|
34
|
+
# A mapping from model property names to API property names.
|
|
35
|
+
def self.names
|
|
36
|
+
@_hash = {} if @_hash.nil?
|
|
37
|
+
@_hash['prompt'] = 'prompt'
|
|
38
|
+
@_hash['num_results'] = 'numResults'
|
|
39
|
+
@_hash['is_output_temporary'] = 'isOutputTemporary'
|
|
40
|
+
@_hash['hide_from_ui'] = 'hideFromUi'
|
|
41
|
+
@_hash
|
|
42
|
+
end
|
|
43
|
+
|
|
44
|
+
# An array for optional fields
|
|
45
|
+
def self.optionals
|
|
46
|
+
%w[
|
|
47
|
+
num_results
|
|
48
|
+
is_output_temporary
|
|
49
|
+
hide_from_ui
|
|
50
|
+
]
|
|
51
|
+
end
|
|
52
|
+
|
|
53
|
+
# An array for nullable fields
|
|
54
|
+
def self.nullables
|
|
55
|
+
[]
|
|
56
|
+
end
|
|
57
|
+
|
|
58
|
+
def initialize(prompt:, num_results: 1, is_output_temporary: false,
|
|
59
|
+
hide_from_ui: false, additional_properties: nil)
|
|
60
|
+
# Add additional model properties to the instance
|
|
61
|
+
additional_properties = {} if additional_properties.nil?
|
|
62
|
+
|
|
63
|
+
@prompt = prompt
|
|
64
|
+
@num_results = num_results unless num_results == SKIP
|
|
65
|
+
@is_output_temporary = is_output_temporary unless is_output_temporary == SKIP
|
|
66
|
+
@hide_from_ui = hide_from_ui unless hide_from_ui == SKIP
|
|
67
|
+
@additional_properties = additional_properties
|
|
68
|
+
end
|
|
69
|
+
|
|
70
|
+
# Creates an instance of the object from a hash.
|
|
71
|
+
def self.from_hash(hash)
|
|
72
|
+
return nil unless hash
|
|
73
|
+
|
|
74
|
+
# Extract variables from the hash.
|
|
75
|
+
prompt = hash.key?('prompt') ? hash['prompt'] : nil
|
|
76
|
+
num_results = hash['numResults'] ||= 1
|
|
77
|
+
is_output_temporary = hash['isOutputTemporary'] ||= false
|
|
78
|
+
hide_from_ui = hash['hideFromUi'] ||= false
|
|
79
|
+
|
|
80
|
+
# Create a new hash for additional properties, removing known properties.
|
|
81
|
+
new_hash = hash.reject { |k, _| names.value?(k) }
|
|
82
|
+
|
|
83
|
+
additional_properties = APIHelper.get_additional_properties(
|
|
84
|
+
new_hash, proc { |value| value }
|
|
85
|
+
)
|
|
86
|
+
|
|
87
|
+
# Create object from extracted values.
|
|
88
|
+
GenerateMusicRequest.new(prompt: prompt,
|
|
89
|
+
num_results: num_results,
|
|
90
|
+
is_output_temporary: is_output_temporary,
|
|
91
|
+
hide_from_ui: hide_from_ui,
|
|
92
|
+
additional_properties: additional_properties)
|
|
93
|
+
end
|
|
94
|
+
|
|
95
|
+
# Provides a human-readable string representation of the object.
|
|
96
|
+
def to_s
|
|
97
|
+
class_name = self.class.name.split('::').last
|
|
98
|
+
"<#{class_name} prompt: #{@prompt}, num_results: #{@num_results}, is_output_temporary:"\
|
|
99
|
+
" #{@is_output_temporary}, hide_from_ui: #{@hide_from_ui}, additional_properties:"\
|
|
100
|
+
" #{@additional_properties}>"
|
|
101
|
+
end
|
|
102
|
+
|
|
103
|
+
# Provides a debugging-friendly string with detailed object information.
|
|
104
|
+
def inspect
|
|
105
|
+
class_name = self.class.name.split('::').last
|
|
106
|
+
"<#{class_name} prompt: #{@prompt.inspect}, num_results: #{@num_results.inspect},"\
|
|
107
|
+
" is_output_temporary: #{@is_output_temporary.inspect}, hide_from_ui:"\
|
|
108
|
+
" #{@hide_from_ui.inspect}, additional_properties: #{@additional_properties}>"
|
|
109
|
+
end
|
|
110
|
+
end
|
|
111
|
+
end
|
|
@@ -0,0 +1,139 @@
|
|
|
1
|
+
# videogen
|
|
2
|
+
#
|
|
3
|
+
# This file was automatically generated by APIMATIC v3.0 (
|
|
4
|
+
# https://www.apimatic.io ).
|
|
5
|
+
|
|
6
|
+
module Videogen
|
|
7
|
+
# GenerateSoundEffectRequest Model.
|
|
8
|
+
class GenerateSoundEffectRequest < BaseModel
|
|
9
|
+
SKIP = Object.new
|
|
10
|
+
private_constant :SKIP
|
|
11
|
+
|
|
12
|
+
# A text description of the sound effect to generate.
|
|
13
|
+
# @return [String]
|
|
14
|
+
attr_accessor :prompt
|
|
15
|
+
|
|
16
|
+
# Desired length of the sound effect in seconds, between 1 and 30. Defaults
|
|
17
|
+
# to about 10 seconds when omitted.
|
|
18
|
+
# @return [Float]
|
|
19
|
+
attr_accessor :duration_seconds
|
|
20
|
+
|
|
21
|
+
# How closely the generated sound effect follows the prompt, between 0 (more
|
|
22
|
+
# creative, more variation) and 1 (more literal, less variation). Defaults
|
|
23
|
+
# to a balanced value when omitted.
|
|
24
|
+
# @return [Float]
|
|
25
|
+
attr_accessor :prompt_influence
|
|
26
|
+
|
|
27
|
+
# Number of output results to generate. Defaults to 1.
|
|
28
|
+
# @return [Integer]
|
|
29
|
+
attr_accessor :num_results
|
|
30
|
+
|
|
31
|
+
# When true, generated files are temporary. Temporary files are guaranteed
|
|
32
|
+
# to be available for 24 hours, after which they may be archived at any
|
|
33
|
+
# time. Temporary files are not analyzed (no description, transcript, or
|
|
34
|
+
# embedding will be generated), so they will not appear in search results.
|
|
35
|
+
# Defaults to false.
|
|
36
|
+
# @return [TrueClass | FalseClass]
|
|
37
|
+
attr_accessor :is_output_temporary
|
|
38
|
+
|
|
39
|
+
# When true, generated files are hidden from the VideoGen Media page by
|
|
40
|
+
# default. They remain accessible through the API. Defaults to false.
|
|
41
|
+
# @return [TrueClass | FalseClass]
|
|
42
|
+
attr_accessor :hide_from_ui
|
|
43
|
+
|
|
44
|
+
# A mapping from model property names to API property names.
|
|
45
|
+
def self.names
|
|
46
|
+
@_hash = {} if @_hash.nil?
|
|
47
|
+
@_hash['prompt'] = 'prompt'
|
|
48
|
+
@_hash['duration_seconds'] = 'durationSeconds'
|
|
49
|
+
@_hash['prompt_influence'] = 'promptInfluence'
|
|
50
|
+
@_hash['num_results'] = 'numResults'
|
|
51
|
+
@_hash['is_output_temporary'] = 'isOutputTemporary'
|
|
52
|
+
@_hash['hide_from_ui'] = 'hideFromUi'
|
|
53
|
+
@_hash
|
|
54
|
+
end
|
|
55
|
+
|
|
56
|
+
# An array for optional fields
|
|
57
|
+
def self.optionals
|
|
58
|
+
%w[
|
|
59
|
+
duration_seconds
|
|
60
|
+
prompt_influence
|
|
61
|
+
num_results
|
|
62
|
+
is_output_temporary
|
|
63
|
+
hide_from_ui
|
|
64
|
+
]
|
|
65
|
+
end
|
|
66
|
+
|
|
67
|
+
# An array for nullable fields
|
|
68
|
+
def self.nullables
|
|
69
|
+
%w[
|
|
70
|
+
duration_seconds
|
|
71
|
+
prompt_influence
|
|
72
|
+
]
|
|
73
|
+
end
|
|
74
|
+
|
|
75
|
+
def initialize(prompt:, duration_seconds: SKIP, prompt_influence: SKIP,
|
|
76
|
+
num_results: 1, is_output_temporary: false,
|
|
77
|
+
hide_from_ui: false, additional_properties: nil)
|
|
78
|
+
# Add additional model properties to the instance
|
|
79
|
+
additional_properties = {} if additional_properties.nil?
|
|
80
|
+
|
|
81
|
+
@prompt = prompt
|
|
82
|
+
@duration_seconds = duration_seconds unless duration_seconds == SKIP
|
|
83
|
+
@prompt_influence = prompt_influence unless prompt_influence == SKIP
|
|
84
|
+
@num_results = num_results unless num_results == SKIP
|
|
85
|
+
@is_output_temporary = is_output_temporary unless is_output_temporary == SKIP
|
|
86
|
+
@hide_from_ui = hide_from_ui unless hide_from_ui == SKIP
|
|
87
|
+
@additional_properties = additional_properties
|
|
88
|
+
end
|
|
89
|
+
|
|
90
|
+
# Creates an instance of the object from a hash.
|
|
91
|
+
def self.from_hash(hash)
|
|
92
|
+
return nil unless hash
|
|
93
|
+
|
|
94
|
+
# Extract variables from the hash.
|
|
95
|
+
prompt = hash.key?('prompt') ? hash['prompt'] : nil
|
|
96
|
+
duration_seconds =
|
|
97
|
+
hash.key?('durationSeconds') ? hash['durationSeconds'] : SKIP
|
|
98
|
+
prompt_influence =
|
|
99
|
+
hash.key?('promptInfluence') ? hash['promptInfluence'] : SKIP
|
|
100
|
+
num_results = hash['numResults'] ||= 1
|
|
101
|
+
is_output_temporary = hash['isOutputTemporary'] ||= false
|
|
102
|
+
hide_from_ui = hash['hideFromUi'] ||= false
|
|
103
|
+
|
|
104
|
+
# Create a new hash for additional properties, removing known properties.
|
|
105
|
+
new_hash = hash.reject { |k, _| names.value?(k) }
|
|
106
|
+
|
|
107
|
+
additional_properties = APIHelper.get_additional_properties(
|
|
108
|
+
new_hash, proc { |value| value }
|
|
109
|
+
)
|
|
110
|
+
|
|
111
|
+
# Create object from extracted values.
|
|
112
|
+
GenerateSoundEffectRequest.new(prompt: prompt,
|
|
113
|
+
duration_seconds: duration_seconds,
|
|
114
|
+
prompt_influence: prompt_influence,
|
|
115
|
+
num_results: num_results,
|
|
116
|
+
is_output_temporary: is_output_temporary,
|
|
117
|
+
hide_from_ui: hide_from_ui,
|
|
118
|
+
additional_properties: additional_properties)
|
|
119
|
+
end
|
|
120
|
+
|
|
121
|
+
# Provides a human-readable string representation of the object.
|
|
122
|
+
def to_s
|
|
123
|
+
class_name = self.class.name.split('::').last
|
|
124
|
+
"<#{class_name} prompt: #{@prompt}, duration_seconds: #{@duration_seconds},"\
|
|
125
|
+
" prompt_influence: #{@prompt_influence}, num_results: #{@num_results}, is_output_temporary:"\
|
|
126
|
+
" #{@is_output_temporary}, hide_from_ui: #{@hide_from_ui}, additional_properties:"\
|
|
127
|
+
" #{@additional_properties}>"
|
|
128
|
+
end
|
|
129
|
+
|
|
130
|
+
# Provides a debugging-friendly string with detailed object information.
|
|
131
|
+
def inspect
|
|
132
|
+
class_name = self.class.name.split('::').last
|
|
133
|
+
"<#{class_name} prompt: #{@prompt.inspect}, duration_seconds: #{@duration_seconds.inspect},"\
|
|
134
|
+
" prompt_influence: #{@prompt_influence.inspect}, num_results: #{@num_results.inspect},"\
|
|
135
|
+
" is_output_temporary: #{@is_output_temporary.inspect}, hide_from_ui:"\
|
|
136
|
+
" #{@hide_from_ui.inspect}, additional_properties: #{@additional_properties}>"
|
|
137
|
+
end
|
|
138
|
+
end
|
|
139
|
+
end
|
|
@@ -0,0 +1,120 @@
|
|
|
1
|
+
# videogen
|
|
2
|
+
#
|
|
3
|
+
# This file was automatically generated by APIMATIC v3.0 (
|
|
4
|
+
# https://www.apimatic.io ).
|
|
5
|
+
|
|
6
|
+
module Videogen
|
|
7
|
+
# GenerateTextRequest Model.
|
|
8
|
+
class GenerateTextRequest < BaseModel
|
|
9
|
+
SKIP = Object.new
|
|
10
|
+
private_constant :SKIP
|
|
11
|
+
|
|
12
|
+
# The instruction or content to generate text from.
|
|
13
|
+
# @return [String]
|
|
14
|
+
attr_accessor :prompt
|
|
15
|
+
|
|
16
|
+
# Optional system instructions that steer the model's role, tone, and
|
|
17
|
+
# constraints.
|
|
18
|
+
# @return [String]
|
|
19
|
+
attr_accessor :system
|
|
20
|
+
|
|
21
|
+
# Text generation quality tier. Optional; when omitted, your account's
|
|
22
|
+
# Default AI quality for text is used (change it at
|
|
23
|
+
# https://app.videogen.io/settings/account).
|
|
24
|
+
# @return [ModelQuality13]
|
|
25
|
+
attr_accessor :quality
|
|
26
|
+
|
|
27
|
+
# Sampling temperature. Higher values produce more varied output. Defaults
|
|
28
|
+
# to the model's default.
|
|
29
|
+
# @return [Float]
|
|
30
|
+
attr_accessor :temperature
|
|
31
|
+
|
|
32
|
+
# Maximum number of tokens to generate. Defaults to 512.
|
|
33
|
+
# @return [Integer]
|
|
34
|
+
attr_accessor :max_output_tokens
|
|
35
|
+
|
|
36
|
+
# A mapping from model property names to API property names.
|
|
37
|
+
def self.names
|
|
38
|
+
@_hash = {} if @_hash.nil?
|
|
39
|
+
@_hash['prompt'] = 'prompt'
|
|
40
|
+
@_hash['system'] = 'system'
|
|
41
|
+
@_hash['quality'] = 'quality'
|
|
42
|
+
@_hash['temperature'] = 'temperature'
|
|
43
|
+
@_hash['max_output_tokens'] = 'maxOutputTokens'
|
|
44
|
+
@_hash
|
|
45
|
+
end
|
|
46
|
+
|
|
47
|
+
# An array for optional fields
|
|
48
|
+
def self.optionals
|
|
49
|
+
%w[
|
|
50
|
+
system
|
|
51
|
+
quality
|
|
52
|
+
temperature
|
|
53
|
+
max_output_tokens
|
|
54
|
+
]
|
|
55
|
+
end
|
|
56
|
+
|
|
57
|
+
# An array for nullable fields
|
|
58
|
+
def self.nullables
|
|
59
|
+
%w[
|
|
60
|
+
system
|
|
61
|
+
]
|
|
62
|
+
end
|
|
63
|
+
|
|
64
|
+
def initialize(prompt:, system: SKIP, quality: SKIP, temperature: SKIP,
|
|
65
|
+
max_output_tokens: 512, additional_properties: nil)
|
|
66
|
+
# Add additional model properties to the instance
|
|
67
|
+
additional_properties = {} if additional_properties.nil?
|
|
68
|
+
|
|
69
|
+
@prompt = prompt
|
|
70
|
+
@system = system unless system == SKIP
|
|
71
|
+
@quality = quality unless quality == SKIP
|
|
72
|
+
@temperature = temperature unless temperature == SKIP
|
|
73
|
+
@max_output_tokens = max_output_tokens unless max_output_tokens == SKIP
|
|
74
|
+
@additional_properties = additional_properties
|
|
75
|
+
end
|
|
76
|
+
|
|
77
|
+
# Creates an instance of the object from a hash.
|
|
78
|
+
def self.from_hash(hash)
|
|
79
|
+
return nil unless hash
|
|
80
|
+
|
|
81
|
+
# Extract variables from the hash.
|
|
82
|
+
prompt = hash.key?('prompt') ? hash['prompt'] : nil
|
|
83
|
+
system = hash.key?('system') ? hash['system'] : SKIP
|
|
84
|
+
quality = hash.key?('quality') ? hash['quality'] : SKIP
|
|
85
|
+
temperature = hash.key?('temperature') ? hash['temperature'] : SKIP
|
|
86
|
+
max_output_tokens = hash['maxOutputTokens'] ||= 512
|
|
87
|
+
|
|
88
|
+
# Create a new hash for additional properties, removing known properties.
|
|
89
|
+
new_hash = hash.reject { |k, _| names.value?(k) }
|
|
90
|
+
|
|
91
|
+
additional_properties = APIHelper.get_additional_properties(
|
|
92
|
+
new_hash, proc { |value| value }
|
|
93
|
+
)
|
|
94
|
+
|
|
95
|
+
# Create object from extracted values.
|
|
96
|
+
GenerateTextRequest.new(prompt: prompt,
|
|
97
|
+
system: system,
|
|
98
|
+
quality: quality,
|
|
99
|
+
temperature: temperature,
|
|
100
|
+
max_output_tokens: max_output_tokens,
|
|
101
|
+
additional_properties: additional_properties)
|
|
102
|
+
end
|
|
103
|
+
|
|
104
|
+
# Provides a human-readable string representation of the object.
|
|
105
|
+
def to_s
|
|
106
|
+
class_name = self.class.name.split('::').last
|
|
107
|
+
"<#{class_name} prompt: #{@prompt}, system: #{@system}, quality: #{@quality}, temperature:"\
|
|
108
|
+
" #{@temperature}, max_output_tokens: #{@max_output_tokens}, additional_properties:"\
|
|
109
|
+
" #{@additional_properties}>"
|
|
110
|
+
end
|
|
111
|
+
|
|
112
|
+
# Provides a debugging-friendly string with detailed object information.
|
|
113
|
+
def inspect
|
|
114
|
+
class_name = self.class.name.split('::').last
|
|
115
|
+
"<#{class_name} prompt: #{@prompt.inspect}, system: #{@system.inspect}, quality:"\
|
|
116
|
+
" #{@quality.inspect}, temperature: #{@temperature.inspect}, max_output_tokens:"\
|
|
117
|
+
" #{@max_output_tokens.inspect}, additional_properties: #{@additional_properties}>"
|
|
118
|
+
end
|
|
119
|
+
end
|
|
120
|
+
end
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
# videogen
|
|
2
|
+
#
|
|
3
|
+
# This file was automatically generated by APIMATIC v3.0 (
|
|
4
|
+
# https://www.apimatic.io ).
|
|
5
|
+
|
|
6
|
+
module Videogen
|
|
7
|
+
# GenerateTextResponse Model.
|
|
8
|
+
class GenerateTextResponse < BaseModel
|
|
9
|
+
SKIP = Object.new
|
|
10
|
+
private_constant :SKIP
|
|
11
|
+
|
|
12
|
+
# The generated text.
|
|
13
|
+
# @return [String]
|
|
14
|
+
attr_accessor :text
|
|
15
|
+
|
|
16
|
+
# A mapping from model property names to API property names.
|
|
17
|
+
def self.names
|
|
18
|
+
@_hash = {} if @_hash.nil?
|
|
19
|
+
@_hash['text'] = 'text'
|
|
20
|
+
@_hash
|
|
21
|
+
end
|
|
22
|
+
|
|
23
|
+
# An array for optional fields
|
|
24
|
+
def self.optionals
|
|
25
|
+
[]
|
|
26
|
+
end
|
|
27
|
+
|
|
28
|
+
# An array for nullable fields
|
|
29
|
+
def self.nullables
|
|
30
|
+
[]
|
|
31
|
+
end
|
|
32
|
+
|
|
33
|
+
def initialize(text:, additional_properties: nil)
|
|
34
|
+
# Add additional model properties to the instance
|
|
35
|
+
additional_properties = {} if additional_properties.nil?
|
|
36
|
+
|
|
37
|
+
@text = text
|
|
38
|
+
@additional_properties = additional_properties
|
|
39
|
+
end
|
|
40
|
+
|
|
41
|
+
# Creates an instance of the object from a hash.
|
|
42
|
+
def self.from_hash(hash)
|
|
43
|
+
return nil unless hash
|
|
44
|
+
|
|
45
|
+
# Extract variables from the hash.
|
|
46
|
+
text = hash.key?('text') ? hash['text'] : nil
|
|
47
|
+
|
|
48
|
+
# Create a new hash for additional properties, removing known properties.
|
|
49
|
+
new_hash = hash.reject { |k, _| names.value?(k) }
|
|
50
|
+
|
|
51
|
+
additional_properties = APIHelper.get_additional_properties(
|
|
52
|
+
new_hash, proc { |value| value }
|
|
53
|
+
)
|
|
54
|
+
|
|
55
|
+
# Create object from extracted values.
|
|
56
|
+
GenerateTextResponse.new(text: text,
|
|
57
|
+
additional_properties: additional_properties)
|
|
58
|
+
end
|
|
59
|
+
|
|
60
|
+
# Provides a human-readable string representation of the object.
|
|
61
|
+
def to_s
|
|
62
|
+
class_name = self.class.name.split('::').last
|
|
63
|
+
"<#{class_name} text: #{@text}, additional_properties: #{@additional_properties}>"
|
|
64
|
+
end
|
|
65
|
+
|
|
66
|
+
# Provides a debugging-friendly string with detailed object information.
|
|
67
|
+
def inspect
|
|
68
|
+
class_name = self.class.name.split('::').last
|
|
69
|
+
"<#{class_name} text: #{@text.inspect}, additional_properties: #{@additional_properties}>"
|
|
70
|
+
end
|
|
71
|
+
end
|
|
72
|
+
end
|