runapi-grok-imagine 0.2.9 → 0.2.10
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: af3b5de5478268a1ab943a736e88c6dfeda6863f5f9ec55d597a879cd5f3c5e9
|
|
4
|
+
data.tar.gz: def751a3227b6e4bd803fd9dd5a0ceab53480f23ced9c47e5ab53ad1f7cebdc3
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 9603cd865825dd1a1c7040d501e60b99c94268a6b7d8ee19e87c3bd168d4833e7be93c3e3480c778a90c842434ec98a45cd78ad69f6bf9f39ea38d952b60e057
|
|
7
|
+
data.tar.gz: 4f1be7f7daa025d98a22fd9c744024bb5348e63ee34bdc2dc8b40fb93672e4f6e96b89d8f4d57126272253069886956a4adf23680e1645db9e4f78f183adcbd1
|
|
@@ -62,7 +62,7 @@ module RunApi
|
|
|
62
62
|
"output_resolution" => {
|
|
63
63
|
"enum" => ["480p", "720p"]
|
|
64
64
|
},
|
|
65
|
-
"
|
|
65
|
+
"source_image_url" => {
|
|
66
66
|
"required" => true
|
|
67
67
|
}
|
|
68
68
|
},
|
|
@@ -86,7 +86,7 @@ module RunApi
|
|
|
86
86
|
"max" => 4096,
|
|
87
87
|
"length" => true
|
|
88
88
|
},
|
|
89
|
-
"
|
|
89
|
+
"source_image_url" => {
|
|
90
90
|
"required" => true
|
|
91
91
|
}
|
|
92
92
|
}
|
|
@@ -4,7 +4,7 @@ module RunApi
|
|
|
4
4
|
module GrokImagine
|
|
5
5
|
module Resources
|
|
6
6
|
# Grok-Imagine image-to-video generation resource.
|
|
7
|
-
# Accepts either external
|
|
7
|
+
# Accepts either an external source_image_url or a prior text-to-image source_task_id (+ index).
|
|
8
8
|
class ImageToVideo
|
|
9
9
|
include RunApi::Core::ResourceHelpers
|
|
10
10
|
|
|
@@ -37,17 +37,14 @@ module RunApi
|
|
|
37
37
|
def validate_params!(params)
|
|
38
38
|
validate_contract!(CONTRACT["image-to-video"], params)
|
|
39
39
|
|
|
40
|
-
|
|
40
|
+
source_image_url = param(params, :source_image_url)
|
|
41
41
|
source_task_id = param(params, :source_task_id)
|
|
42
42
|
|
|
43
|
-
if
|
|
44
|
-
raise Core::ValidationError, "Provide either
|
|
43
|
+
if source_image_url && source_task_id
|
|
44
|
+
raise Core::ValidationError, "Provide either source_image_url or source_task_id, not both"
|
|
45
45
|
end
|
|
46
|
-
|
|
47
|
-
raise Core::ValidationError, "One of
|
|
48
|
-
end
|
|
49
|
-
if source_image_urls && source_image_urls.size > 1
|
|
50
|
-
raise Core::ValidationError, "source_image_urls supports at most 1 entry"
|
|
46
|
+
unless source_image_url || source_task_id
|
|
47
|
+
raise Core::ValidationError, "One of source_image_url or source_task_id is required"
|
|
51
48
|
end
|
|
52
49
|
|
|
53
50
|
if source_task_id && (index = param(params, :index))
|
|
@@ -57,7 +54,7 @@ module RunApi
|
|
|
57
54
|
end
|
|
58
55
|
end
|
|
59
56
|
|
|
60
|
-
if param(params, :motion_style).to_s == "spicy" &&
|
|
57
|
+
if param(params, :motion_style).to_s == "spicy" && source_image_url
|
|
61
58
|
raise Core::ValidationError, "spicy motion_style requires a source_task_id source image."
|
|
62
59
|
end
|
|
63
60
|
end
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: runapi-grok-imagine
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.2.
|
|
4
|
+
version: 0.2.10
|
|
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.2.
|
|
18
|
+
version: 0.2.13
|
|
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.2.
|
|
25
|
+
version: 0.2.13
|
|
26
26
|
description: The Grok Imagine Ruby SDK is the language-specific package for Grok Imagine
|
|
27
27
|
on RunAPI. Use this package for image and video generation, image editing, and creative
|
|
28
28
|
production workflows when your application needs request bodies, task status lookup,
|