runapi-grok-imagine 0.2.11 → 0.2.13
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 +4 -4
- data/README.md +4 -4
- data/lib/runapi/grok_imagine/contract_gen.rb +77 -6
- metadata +3 -3
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 2abaf28bececdb68262f69df17c4f7ce6993e8b9c06cdbcdf0bd2a28d76f1a07
|
|
4
|
+
data.tar.gz: 59af0fe8b7f046d2e7d4ce05ab3ae1f169feb8ffe737775c8e63f4655db6ad38
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: a3bd1dc3ffdd14c1cffcbfb9685f3118fc63734d2e0491d8e9d31ad438e2a04b1b985eaf849931ab25b01e8064915bf822fbca2167fa664f5d5805fbf1fd3cec
|
|
7
|
+
data.tar.gz: c59bab1a8968d004599a6ff0d89106f74647d04c811c7e578af2ac75f61af89a0255c6c212cb80cccbfc4e92a9d41bbfa78fe39e9f5f68956cad5ab912b4e3ca
|
data/README.md
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
The Grok Imagine Ruby SDK is the language-specific package for Grok Imagine on RunAPI. Use this package for image and video generation, image editing, and creative production workflows when your application needs request bodies, task status lookup, and consistent RunAPI errors in Ruby.
|
|
4
4
|
|
|
5
|
-
This README is the Ruby package guide inside the public `grok-imagine-sdk` repository. For the repository overview, start at `../README.md`; for model details, use https://runapi.ai/models/grok-imagine; for API reference, use https://runapi.ai/docs
|
|
5
|
+
This README is the Ruby package guide inside the public `grok-imagine-sdk` repository. For the repository overview, start at `../README.md`; for model details, use https://runapi.ai/models/grok-imagine; for API reference, use https://runapi.ai/docs/api/grok-imagine/text-to-image; for SDK docs, use https://runapi.ai/docs/resources/sdks.
|
|
6
6
|
|
|
7
7
|
## Install
|
|
8
8
|
|
|
@@ -17,7 +17,7 @@ require "runapi/grok_imagine"
|
|
|
17
17
|
|
|
18
18
|
client = RunApi::GrokImagine::Client.new
|
|
19
19
|
task = client.text_to_video.create(
|
|
20
|
-
# Pass the Grok Imagine JSON request body from https://runapi.ai/docs
|
|
20
|
+
# Pass the Grok Imagine JSON request body from https://runapi.ai/docs/api/grok-imagine/text-to-image.
|
|
21
21
|
)
|
|
22
22
|
status = client.text_to_video.get(task.id)
|
|
23
23
|
```
|
|
@@ -33,8 +33,8 @@ Use Ruby keyword arguments and the `RunApi::GrokImagine` error classes when buil
|
|
|
33
33
|
## Links
|
|
34
34
|
|
|
35
35
|
- Model page: https://runapi.ai/models/grok-imagine
|
|
36
|
-
- SDK docs: https://runapi.ai/docs
|
|
37
|
-
- Product docs: https://runapi.ai/docs
|
|
36
|
+
- SDK docs: https://runapi.ai/docs/resources/sdks
|
|
37
|
+
- Product docs: https://runapi.ai/docs/api/grok-imagine/text-to-image
|
|
38
38
|
- Video 1.5 Preview pricing and rate limits: https://runapi.ai/models/grok-imagine/video-1.5-preview
|
|
39
39
|
- Video 1.5 Fast pricing and rate limits: https://runapi.ai/models/grok-imagine/video-1.5-fast
|
|
40
40
|
- Text-to-video pricing and rate limits: https://runapi.ai/models/grok-imagine/text-to-video
|
|
@@ -7,6 +7,9 @@ module RunApi
|
|
|
7
7
|
"models" => ["grok-imagine-edit-image"],
|
|
8
8
|
"fields_by_model" => {
|
|
9
9
|
"grok-imagine-edit-image" => {
|
|
10
|
+
"model" => {
|
|
11
|
+
"required" => true
|
|
12
|
+
},
|
|
10
13
|
"source_image_url" => {
|
|
11
14
|
"required" => true
|
|
12
15
|
}
|
|
@@ -19,9 +22,20 @@ module RunApi
|
|
|
19
22
|
"_" => {
|
|
20
23
|
"extension_duration_seconds" => {
|
|
21
24
|
"enum" => [6, 10],
|
|
25
|
+
"required" => true,
|
|
22
26
|
"type" => "integer"
|
|
23
27
|
},
|
|
28
|
+
"prompt" => {
|
|
29
|
+
"required" => true,
|
|
30
|
+
"max" => 5000,
|
|
31
|
+
"length" => true
|
|
32
|
+
},
|
|
33
|
+
"source_task_id" => {
|
|
34
|
+
"required" => true
|
|
35
|
+
},
|
|
24
36
|
"start_seconds" => {
|
|
37
|
+
"required" => true,
|
|
38
|
+
"min" => 0,
|
|
25
39
|
"type" => "integer"
|
|
26
40
|
}
|
|
27
41
|
}
|
|
@@ -35,16 +49,27 @@ module RunApi
|
|
|
35
49
|
"enum" => ["2:3", "3:2", "1:1", "16:9", "9:16"]
|
|
36
50
|
},
|
|
37
51
|
"duration_seconds" => {
|
|
52
|
+
"min" => 6,
|
|
53
|
+
"max" => 30,
|
|
38
54
|
"type" => "integer"
|
|
39
55
|
},
|
|
40
56
|
"index" => {
|
|
57
|
+
"min" => 0,
|
|
58
|
+
"max" => 5,
|
|
41
59
|
"type" => "integer"
|
|
42
60
|
},
|
|
61
|
+
"model" => {
|
|
62
|
+
"required" => true
|
|
63
|
+
},
|
|
43
64
|
"motion_style" => {
|
|
44
65
|
"enum" => ["fun", "normal", "spicy"]
|
|
45
66
|
},
|
|
46
67
|
"output_resolution" => {
|
|
47
68
|
"enum" => ["480p", "720p"]
|
|
69
|
+
},
|
|
70
|
+
"prompt" => {
|
|
71
|
+
"max" => 5000,
|
|
72
|
+
"length" => true
|
|
48
73
|
}
|
|
49
74
|
},
|
|
50
75
|
"grok-imagine-video-1.5-fast" => {
|
|
@@ -59,9 +84,16 @@ module RunApi
|
|
|
59
84
|
"index" => {
|
|
60
85
|
"type" => "integer"
|
|
61
86
|
},
|
|
87
|
+
"model" => {
|
|
88
|
+
"required" => true
|
|
89
|
+
},
|
|
62
90
|
"output_resolution" => {
|
|
63
91
|
"enum" => ["480p", "720p"]
|
|
64
92
|
},
|
|
93
|
+
"prompt" => {
|
|
94
|
+
"max" => 5000,
|
|
95
|
+
"length" => true
|
|
96
|
+
},
|
|
65
97
|
"source_image_url" => {
|
|
66
98
|
"required" => true
|
|
67
99
|
}
|
|
@@ -78,14 +110,20 @@ module RunApi
|
|
|
78
110
|
"index" => {
|
|
79
111
|
"type" => "integer"
|
|
80
112
|
},
|
|
113
|
+
"model" => {
|
|
114
|
+
"required" => true
|
|
115
|
+
},
|
|
81
116
|
"output_resolution" => {
|
|
82
|
-
"enum" => ["480p", "720p"]
|
|
117
|
+
"enum" => ["480p", "720p", "1080p"]
|
|
83
118
|
},
|
|
84
119
|
"prompt" => {
|
|
85
120
|
"min" => 1,
|
|
86
121
|
"max" => 4096,
|
|
87
122
|
"length" => true
|
|
88
123
|
},
|
|
124
|
+
"reference_image_urls" => {
|
|
125
|
+
"max_items" => 6
|
|
126
|
+
},
|
|
89
127
|
"source_image_url" => {
|
|
90
128
|
"required" => true
|
|
91
129
|
}
|
|
@@ -105,7 +143,7 @@ module RunApi
|
|
|
105
143
|
"when" => {
|
|
106
144
|
"model" => "grok-imagine-video-1.5-preview"
|
|
107
145
|
},
|
|
108
|
-
"forbidden" => ["source_task_id", "index", "
|
|
146
|
+
"forbidden" => ["source_task_id", "index", "motion_style", "enable_safety_checker"]
|
|
109
147
|
}]
|
|
110
148
|
},
|
|
111
149
|
"text-to-image" => {
|
|
@@ -114,6 +152,14 @@ module RunApi
|
|
|
114
152
|
"grok-imagine-text-to-image" => {
|
|
115
153
|
"aspect_ratio" => {
|
|
116
154
|
"enum" => ["2:3", "3:2", "1:1", "16:9", "9:16"]
|
|
155
|
+
},
|
|
156
|
+
"model" => {
|
|
157
|
+
"required" => true
|
|
158
|
+
},
|
|
159
|
+
"prompt" => {
|
|
160
|
+
"required" => true,
|
|
161
|
+
"max" => 5000,
|
|
162
|
+
"length" => true
|
|
117
163
|
}
|
|
118
164
|
}
|
|
119
165
|
}
|
|
@@ -126,13 +172,23 @@ module RunApi
|
|
|
126
172
|
"enum" => ["2:3", "3:2", "1:1", "16:9", "9:16"]
|
|
127
173
|
},
|
|
128
174
|
"duration_seconds" => {
|
|
175
|
+
"min" => 6,
|
|
176
|
+
"max" => 30,
|
|
129
177
|
"type" => "integer"
|
|
130
178
|
},
|
|
179
|
+
"model" => {
|
|
180
|
+
"required" => true
|
|
181
|
+
},
|
|
131
182
|
"motion_style" => {
|
|
132
183
|
"enum" => ["fun", "normal", "spicy"]
|
|
133
184
|
},
|
|
134
185
|
"output_resolution" => {
|
|
135
186
|
"enum" => ["480p", "720p"]
|
|
187
|
+
},
|
|
188
|
+
"prompt" => {
|
|
189
|
+
"required" => true,
|
|
190
|
+
"max" => 5000,
|
|
191
|
+
"length" => true
|
|
136
192
|
}
|
|
137
193
|
},
|
|
138
194
|
"grok-imagine-video-1.5-fast" => {
|
|
@@ -144,11 +200,16 @@ module RunApi
|
|
|
144
200
|
"max" => 30,
|
|
145
201
|
"type" => "integer"
|
|
146
202
|
},
|
|
203
|
+
"model" => {
|
|
204
|
+
"required" => true
|
|
205
|
+
},
|
|
147
206
|
"output_resolution" => {
|
|
148
207
|
"enum" => ["480p", "720p"]
|
|
149
208
|
},
|
|
150
209
|
"prompt" => {
|
|
151
|
-
"required" => true
|
|
210
|
+
"required" => true,
|
|
211
|
+
"max" => 5000,
|
|
212
|
+
"length" => true
|
|
152
213
|
}
|
|
153
214
|
},
|
|
154
215
|
"grok-imagine-video-1.5-preview" => {
|
|
@@ -160,14 +221,20 @@ module RunApi
|
|
|
160
221
|
"max" => 15,
|
|
161
222
|
"type" => "integer"
|
|
162
223
|
},
|
|
224
|
+
"model" => {
|
|
225
|
+
"required" => true
|
|
226
|
+
},
|
|
163
227
|
"output_resolution" => {
|
|
164
|
-
"enum" => ["480p", "720p"]
|
|
228
|
+
"enum" => ["480p", "720p", "1080p"]
|
|
165
229
|
},
|
|
166
230
|
"prompt" => {
|
|
167
231
|
"required" => true,
|
|
168
232
|
"min" => 1,
|
|
169
233
|
"max" => 4096,
|
|
170
234
|
"length" => true
|
|
235
|
+
},
|
|
236
|
+
"reference_image_urls" => {
|
|
237
|
+
"max_items" => 7
|
|
171
238
|
}
|
|
172
239
|
}
|
|
173
240
|
},
|
|
@@ -185,13 +252,17 @@ module RunApi
|
|
|
185
252
|
"when" => {
|
|
186
253
|
"model" => "grok-imagine-video-1.5-preview"
|
|
187
254
|
},
|
|
188
|
-
"forbidden" => ["
|
|
255
|
+
"forbidden" => ["motion_style", "enable_safety_checker"]
|
|
189
256
|
}]
|
|
190
257
|
},
|
|
191
258
|
"upscale-image" => {
|
|
192
259
|
"models" => [],
|
|
193
260
|
"fields_by_model" => {
|
|
194
|
-
"_" => {
|
|
261
|
+
"_" => {
|
|
262
|
+
"source_task_id" => {
|
|
263
|
+
"required" => true
|
|
264
|
+
}
|
|
265
|
+
}
|
|
195
266
|
}
|
|
196
267
|
}
|
|
197
268
|
}.freeze
|
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.13
|
|
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.3.
|
|
18
|
+
version: 0.3.3
|
|
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.3.
|
|
25
|
+
version: 0.3.3
|
|
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,
|