runapi-gemini-omni 0.3.4 → 0.3.6

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 4786bf947d495bc73ad8c1144cc60c72e52c61900c4f26d8a5bb166d705f58ab
4
- data.tar.gz: bf125ab1d6a6ce10bd9ad8b1d56a4ba5e28e20962fe35582b7eb735502d520cf
3
+ metadata.gz: ab5cbb8ef2a16e8456e1144bcfb0e5fa8b0046d270b503de11d8986d588e5937
4
+ data.tar.gz: 6e7fa7299744b50849e91931fa421ffd3d0c71e6f0e755be26cd2ba9df9bdfb6
5
5
  SHA512:
6
- metadata.gz: b00d7e63cc09e16fa8f139483aab1665b87b81e1ba28d1e399b1e5074741c66ba69feee0b816067c0a881b6320105c98edbf1f337a6d5877095f3f4710315864
7
- data.tar.gz: 221b113e534589cc3f2a9280620a9a86afc52d50093f71cda165a03f9a69995bd683145ffebc4324ba336f16e165f3304d841b6c2032b5b6bad7f17898d994dc
6
+ metadata.gz: 2685b0619dcac122d0b6a6eb987fbb924645b09d180d4810c7fd0fcd5a6aafc9e1487ab7dd93b66c20a12e928d858e320facbba24e5e21c1a67b7b259ad5680a
7
+ data.tar.gz: 1f58bb3b0a5cd62e492cdbb4e652bee93848a79d74223b07fb402a1f6eedb32ce65b04d1d04007968c7fb841d3bc682a67f0902702c5e2249877e6c4292f8eb2
data/README.md CHANGED
@@ -21,17 +21,25 @@ voice = client.create_audio.run(
21
21
 
22
22
  character = client.create_character.run(
23
23
  descriptions: "A silver-haired cyberpunk guide",
24
- reference_image_url: "https://cdn.runapi.ai/public/samples/reference-1.jpg"
24
+ reference_image_url: "https://cdn.runapi.ai/public/samples/portrait.jpg",
25
+ body_reference_image_url: "https://cdn.runapi.ai/public/samples/image.jpg"
25
26
  )
26
27
 
27
28
  video = client.text_to_video.run(
28
- model: "gemini-omni-flash-preview",
29
- prompt: "A paper airplane glides through a sunlit studio.",
29
+ model: "gemini-omni-flash-1-1",
30
+ prompt: "A paper airplane travels from dawn into dusk.",
31
+ duration_seconds: 6,
32
+ first_frame_image_url: "https://cdn.runapi.ai/public/samples/first-frame.jpg",
33
+ last_frame_image_url: "https://cdn.runapi.ai/public/samples/last-frame.jpg",
30
34
  aspect_ratio: "16:9",
31
- output_resolution: "720p"
35
+ output_resolution: "360p"
32
36
  )
33
37
  ```
34
38
 
39
+ `character.images` returns the portrait first and the optional full-body image second. A character created with both references consumes two of the seven reference units in a multimodal video request.
40
+
41
+ For `gemini-omni-flash-1-1`, `first_frame_image_url` cannot be combined with reference images, audio IDs, video clips, or character IDs. `last_frame_image_url` requires `first_frame_image_url`.
42
+
35
43
  RunAPI-generated file URLs are temporary. Download and store generated images, videos, audio, or other files in your own durable storage within 7 days; do not treat returned URLs as long-term assets.
36
44
 
37
45
  ## Links
@@ -39,8 +47,8 @@ RunAPI-generated file URLs are temporary. Download and store generated images, v
39
47
  - Model page: https://runapi.ai/models/gemini-omni
40
48
  - SDK docs: https://runapi.ai/docs/resources/sdks
41
49
  - Product docs: https://runapi.ai/docs/api/gemini-omni/text-to-video
50
+ - Flash 1.1 pricing and rate limits: https://runapi.ai/models/gemini-omni/flash-1-1
42
51
  - Flash Preview pricing and rate limits: https://runapi.ai/models/gemini-omni/flash-preview
43
- - Provider comparison: https://runapi.ai/providers/google
44
52
  - Full catalog: https://runapi.ai/models
45
53
 
46
54
  ## License
@@ -18,7 +18,7 @@ module RunApi
18
18
  class Client < RunApi::Core::Client
19
19
  # @return [Resources::CreateAudio] Registers reusable voice presets (synchronous).
20
20
  attr_reader :create_audio
21
- # @return [Resources::CreateCharacter] Builds reusable characters from reference images (synchronous).
21
+ # @return [Resources::CreateCharacter] Builds reusable characters and follows accepted Tasks to completion.
22
22
  attr_reader :create_character
23
23
  # @return [Resources::TextToVideo] Generates video from prompts with optional characters and voices (async).
24
24
  attr_reader :text_to_video
@@ -46,8 +46,43 @@ module RunApi
46
46
  }
47
47
  },
48
48
  "text-to-video" => {
49
- "models" => ["gemini-omni-flash-preview", "gemini-omni-text-to-video"],
49
+ "models" => ["gemini-omni-flash-1-1", "gemini-omni-flash-preview", "gemini-omni-text-to-video"],
50
50
  "fields_by_model" => {
51
+ "gemini-omni-flash-1-1" => {
52
+ "aspect_ratio" => {
53
+ "enum" => ["16:9", "9:16"]
54
+ },
55
+ "audio_ids" => {
56
+ "max_items" => 3
57
+ },
58
+ "character_ids" => {
59
+ "max_items" => 3
60
+ },
61
+ "duration_seconds" => {
62
+ "enum" => [4, 6, 8, 10],
63
+ "required" => true,
64
+ "type" => "integer"
65
+ },
66
+ "output_resolution" => {
67
+ "enum" => ["360p", "720p", "1080p", "4k"]
68
+ },
69
+ "prompt" => {
70
+ "required" => true,
71
+ "max" => 20000,
72
+ "length" => true
73
+ },
74
+ "reference_image_urls" => {
75
+ "max_items" => 7
76
+ },
77
+ "seed" => {
78
+ "min" => 0,
79
+ "max" => 2147483647,
80
+ "type" => "integer"
81
+ },
82
+ "video_list" => {
83
+ "max_items" => 1
84
+ }
85
+ },
51
86
  "gemini-omni-flash-preview" => {
52
87
  "aspect_ratio" => {
53
88
  "enum" => ["16:9", "9:16"]
@@ -104,10 +139,31 @@ module RunApi
104
139
  }
105
140
  },
106
141
  "rules" => [{
142
+ "when" => {
143
+ "model" => "gemini-omni-flash-1-1",
144
+ "first_frame_image_url" => {
145
+ "present" => true
146
+ }
147
+ },
148
+ "forbidden" => ["reference_image_urls", "audio_ids", "video_list", "character_ids"]
149
+ }, {
150
+ "when" => {
151
+ "model" => "gemini-omni-flash-1-1",
152
+ "last_frame_image_url" => {
153
+ "present" => true
154
+ }
155
+ },
156
+ "required" => ["first_frame_image_url"]
157
+ }, {
107
158
  "when" => {
108
159
  "model" => "gemini-omni-flash-preview"
109
160
  },
110
- "forbidden" => ["reference_image_urls", "audio_ids", "video_list", "character_ids", "duration_seconds", "seed"]
161
+ "forbidden" => ["reference_image_urls", "audio_ids", "video_list", "character_ids", "first_frame_image_url", "last_frame_image_url", "duration_seconds", "seed"]
162
+ }, {
163
+ "when" => {
164
+ "model" => "gemini-omni-text-to-video"
165
+ },
166
+ "forbidden" => ["first_frame_image_url", "last_frame_image_url"]
111
167
  }]
112
168
  }
113
169
  }.freeze
@@ -3,9 +3,9 @@
3
3
  module RunApi
4
4
  module GeminiOmni
5
5
  module Resources
6
- # Builds a reusable character from a reference image and description.
6
+ # Builds a reusable character from a portrait, optional full-body reference, and description.
7
7
  # Attach audio IDs to give the character a specific voice.
8
- # Synchronous -- only +run+ is available (no create/get polling).
8
+ # +run+ returns the terminal character result, following an accepted Task when needed.
9
9
  class CreateCharacter
10
10
  include RunApi::Core::ResourceHelpers
11
11
 
@@ -22,7 +22,7 @@ module RunApi
22
22
  def run(options: nil, **params)
23
23
  params = compact_params(params)
24
24
  validate_params!(params)
25
- request(:post, ENDPOINT, body: params, options: options)
25
+ run_hybrid(ENDPOINT, body: params, options: options, response_class: RESPONSE_CLASS)
26
26
  end
27
27
 
28
28
  private
@@ -30,14 +30,14 @@ module RunApi
30
30
  optional :url, String
31
31
  end
32
32
 
33
- # A created character with its ID, name, and reference images.
33
+ # A created character whose images contain the portrait first and optional full-body image second.
34
34
  class Character < RunApi::Core::BaseModel
35
35
  required :id, String
36
36
  optional :name, String
37
37
  optional :images, [-> { Image }]
38
38
  end
39
39
 
40
- # Result of a synchronous create-character call.
40
+ # Terminal result of a create-character call.
41
41
  class CreateCharacterResponse < RunApi::Core::TaskResponse
42
42
  required :id, String
43
43
  optional :character, -> { Character }
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: runapi-gemini-omni
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.4
4
+ version: 0.3.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - RunAPI
@@ -15,14 +15,14 @@ dependencies:
15
15
  requirements:
16
16
  - - "~>"
17
17
  - !ruby/object:Gem::Version
18
- version: 0.4.0
18
+ version: 0.5.0
19
19
  type: :runtime
20
20
  prerelease: false
21
21
  version_requirements: !ruby/object:Gem::Requirement
22
22
  requirements:
23
23
  - - "~>"
24
24
  - !ruby/object:Gem::Version
25
- version: 0.4.0
25
+ version: 0.5.0
26
26
  description: The Gemini Omni Ruby SDK is the language-specific package for Gemini
27
27
  Omni on RunAPI. Use this package for voice resources, character resources, and multimodal
28
28
  video generation workflows when your application needs request bodies, task status
@@ -68,7 +68,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
68
68
  - !ruby/object:Gem::Version
69
69
  version: '0'
70
70
  requirements: []
71
- rubygems_version: 4.0.10
71
+ rubygems_version: 4.0.17
72
72
  specification_version: 4
73
73
  summary: Gemini Omni Ruby SDK for RunAPI
74
74
  test_files: []