runapi-gemini-omni 0.3.5 → 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:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: ab5cbb8ef2a16e8456e1144bcfb0e5fa8b0046d270b503de11d8986d588e5937
|
|
4
|
+
data.tar.gz: 6e7fa7299744b50849e91931fa421ffd3d0c71e6f0e755be26cd2ba9df9bdfb6
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
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/
|
|
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-
|
|
29
|
-
prompt: "A paper airplane
|
|
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: "
|
|
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
|
|
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
|
|
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
|
-
#
|
|
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
|
-
|
|
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
|
|
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
|
-
#
|
|
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 }
|