tensors-ruby 0.1.0

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.
Files changed (60) hide show
  1. checksums.yaml +7 -0
  2. data/Gemfile +9 -0
  3. data/README.md +154 -0
  4. data/lib/tensors-ruby/api/auth_api.rb +387 -0
  5. data/lib/tensors-ruby/api/civit_ai_api.rb +85 -0
  6. data/lib/tensors-ruby/api/comfy_uiapi_api.rb +582 -0
  7. data/lib/tensors-ruby/api/database_api.rb +655 -0
  8. data/lib/tensors-ruby/api/default_api.rb +77 -0
  9. data/lib/tensors-ruby/api/download_api.rb +210 -0
  10. data/lib/tensors-ruby/api/gallery_api.rb +416 -0
  11. data/lib/tensors-ruby/api/search_api.rb +129 -0
  12. data/lib/tensors-ruby/api_client.rb +441 -0
  13. data/lib/tensors-ruby/api_error.rb +58 -0
  14. data/lib/tensors-ruby/api_model_base.rb +88 -0
  15. data/lib/tensors-ruby/configuration.rb +399 -0
  16. data/lib/tensors-ruby/models/cache_request.rb +165 -0
  17. data/lib/tensors-ruby/models/download_request.rb +179 -0
  18. data/lib/tensors-ruby/models/generate_request.rb +444 -0
  19. data/lib/tensors-ruby/models/generate_response.rb +213 -0
  20. data/lib/tensors-ruby/models/http_validation_error.rb +149 -0
  21. data/lib/tensors-ruby/models/location_inner.rb +103 -0
  22. data/lib/tensors-ruby/models/metadata_update.rb +181 -0
  23. data/lib/tensors-ruby/models/models_response.rb +205 -0
  24. data/lib/tensors-ruby/models/provider.rb +41 -0
  25. data/lib/tensors-ruby/models/queue_status_response.rb +161 -0
  26. data/lib/tensors-ruby/models/scan_request.rb +165 -0
  27. data/lib/tensors-ruby/models/sort_order.rb +41 -0
  28. data/lib/tensors-ruby/models/system_stats_response.rb +161 -0
  29. data/lib/tensors-ruby/models/validation_error.rb +237 -0
  30. data/lib/tensors-ruby/models/workflow_request.rb +168 -0
  31. data/lib/tensors-ruby/models/workflow_response.rb +222 -0
  32. data/lib/tensors-ruby/version.rb +15 -0
  33. data/lib/tensors-ruby.rb +64 -0
  34. data/spec/api/auth_api_spec.rb +109 -0
  35. data/spec/api/civit_ai_api_spec.rb +47 -0
  36. data/spec/api/comfy_uiapi_api_spec.rb +141 -0
  37. data/spec/api/database_api_spec.rb +155 -0
  38. data/spec/api/default_api_spec.rb +45 -0
  39. data/spec/api/download_api_spec.rb +70 -0
  40. data/spec/api/gallery_api_spec.rb +109 -0
  41. data/spec/api/search_api_spec.rb +60 -0
  42. data/spec/models/cache_request_spec.rb +36 -0
  43. data/spec/models/download_request_spec.rb +54 -0
  44. data/spec/models/generate_request_spec.rb +108 -0
  45. data/spec/models/generate_response_spec.rb +54 -0
  46. data/spec/models/http_validation_error_spec.rb +36 -0
  47. data/spec/models/location_inner_spec.rb +21 -0
  48. data/spec/models/metadata_update_spec.rb +54 -0
  49. data/spec/models/models_response_spec.rb +66 -0
  50. data/spec/models/provider_spec.rb +30 -0
  51. data/spec/models/queue_status_response_spec.rb +42 -0
  52. data/spec/models/scan_request_spec.rb +36 -0
  53. data/spec/models/sort_order_spec.rb +30 -0
  54. data/spec/models/system_stats_response_spec.rb +42 -0
  55. data/spec/models/validation_error_spec.rb +60 -0
  56. data/spec/models/workflow_request_spec.rb +36 -0
  57. data/spec/models/workflow_response_spec.rb +60 -0
  58. data/spec/spec_helper.rb +111 -0
  59. data/tensors-ruby.gemspec +41 -0
  60. metadata +194 -0
@@ -0,0 +1,582 @@
1
+ =begin
2
+ #tensors
3
+
4
+ #API for CivitAI model management and image gallery
5
+
6
+ The version of the OpenAPI document: 0.1.18
7
+
8
+ Generated by: https://openapi-generator.tech
9
+ Generator version: 7.21.0
10
+
11
+ =end
12
+
13
+ require 'cgi'
14
+
15
+ module TensorsApi
16
+ class ComfyUIAPIApi
17
+ attr_accessor :api_client
18
+
19
+ def initialize(api_client = ApiClient.default)
20
+ @api_client = api_client
21
+ end
22
+ # Comfyui Clear Queue
23
+ # Clear the ComfyUI queue.
24
+ # @param [Hash] opts the optional parameters
25
+ # @return [Hash<String, Object>]
26
+ def comfyui_clear_queue_api_comfyui_queue_delete(opts = {})
27
+ data, _status_code, _headers = comfyui_clear_queue_api_comfyui_queue_delete_with_http_info(opts)
28
+ data
29
+ end
30
+
31
+ # Comfyui Clear Queue
32
+ # Clear the ComfyUI queue.
33
+ # @param [Hash] opts the optional parameters
34
+ # @return [Array<(Hash<String, Object>, Integer, Hash)>] Hash<String, Object> data, response status code and response headers
35
+ def comfyui_clear_queue_api_comfyui_queue_delete_with_http_info(opts = {})
36
+ if @api_client.config.debugging
37
+ @api_client.config.logger.debug 'Calling API: ComfyUIAPIApi.comfyui_clear_queue_api_comfyui_queue_delete ...'
38
+ end
39
+ # resource path
40
+ local_var_path = '/api/comfyui/queue'
41
+
42
+ # query parameters
43
+ query_params = opts[:query_params] || {}
44
+
45
+ # header parameters
46
+ header_params = opts[:header_params] || {}
47
+ # HTTP header 'Accept' (if needed)
48
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
49
+
50
+ # form parameters
51
+ form_params = opts[:form_params] || {}
52
+
53
+ # http body (model)
54
+ post_body = opts[:debug_body]
55
+
56
+ # return_type
57
+ return_type = opts[:debug_return_type] || 'Hash<String, Object>'
58
+
59
+ # auth_names
60
+ auth_names = opts[:debug_auth_names] || ['APIKeyHeader', 'APIKeyQuery']
61
+
62
+ new_options = opts.merge(
63
+ :operation => :"ComfyUIAPIApi.comfyui_clear_queue_api_comfyui_queue_delete",
64
+ :header_params => header_params,
65
+ :query_params => query_params,
66
+ :form_params => form_params,
67
+ :body => post_body,
68
+ :auth_names => auth_names,
69
+ :return_type => return_type
70
+ )
71
+
72
+ data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
73
+ if @api_client.config.debugging
74
+ @api_client.config.logger.debug "API called: ComfyUIAPIApi#comfyui_clear_queue_api_comfyui_queue_delete\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
75
+ end
76
+ return data, status_code, headers
77
+ end
78
+
79
+ # Comfyui Generate
80
+ # Generate an image using a simple text-to-image workflow. This uses the built-in SDXL/Flux compatible workflow template. For custom workflows, use the /workflow endpoint instead. Sampler and scheduler are auto-selected based on model family if not specified (when using default values). Family detection uses the model filename and database metadata.
81
+ # @param generate_request [GenerateRequest]
82
+ # @param [Hash] opts the optional parameters
83
+ # @return [GenerateResponse]
84
+ def comfyui_generate_api_comfyui_generate_post(generate_request, opts = {})
85
+ data, _status_code, _headers = comfyui_generate_api_comfyui_generate_post_with_http_info(generate_request, opts)
86
+ data
87
+ end
88
+
89
+ # Comfyui Generate
90
+ # Generate an image using a simple text-to-image workflow. This uses the built-in SDXL/Flux compatible workflow template. For custom workflows, use the /workflow endpoint instead. Sampler and scheduler are auto-selected based on model family if not specified (when using default values). Family detection uses the model filename and database metadata.
91
+ # @param generate_request [GenerateRequest]
92
+ # @param [Hash] opts the optional parameters
93
+ # @return [Array<(GenerateResponse, Integer, Hash)>] GenerateResponse data, response status code and response headers
94
+ def comfyui_generate_api_comfyui_generate_post_with_http_info(generate_request, opts = {})
95
+ if @api_client.config.debugging
96
+ @api_client.config.logger.debug 'Calling API: ComfyUIAPIApi.comfyui_generate_api_comfyui_generate_post ...'
97
+ end
98
+ # verify the required parameter 'generate_request' is set
99
+ if @api_client.config.client_side_validation && generate_request.nil?
100
+ fail ArgumentError, "Missing the required parameter 'generate_request' when calling ComfyUIAPIApi.comfyui_generate_api_comfyui_generate_post"
101
+ end
102
+ # resource path
103
+ local_var_path = '/api/comfyui/generate'
104
+
105
+ # query parameters
106
+ query_params = opts[:query_params] || {}
107
+
108
+ # header parameters
109
+ header_params = opts[:header_params] || {}
110
+ # HTTP header 'Accept' (if needed)
111
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
112
+ # HTTP header 'Content-Type'
113
+ content_type = @api_client.select_header_content_type(['application/json'])
114
+ if !content_type.nil?
115
+ header_params['Content-Type'] = content_type
116
+ end
117
+
118
+ # form parameters
119
+ form_params = opts[:form_params] || {}
120
+
121
+ # http body (model)
122
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(generate_request)
123
+
124
+ # return_type
125
+ return_type = opts[:debug_return_type] || 'GenerateResponse'
126
+
127
+ # auth_names
128
+ auth_names = opts[:debug_auth_names] || ['APIKeyHeader', 'APIKeyQuery']
129
+
130
+ new_options = opts.merge(
131
+ :operation => :"ComfyUIAPIApi.comfyui_generate_api_comfyui_generate_post",
132
+ :header_params => header_params,
133
+ :query_params => query_params,
134
+ :form_params => form_params,
135
+ :body => post_body,
136
+ :auth_names => auth_names,
137
+ :return_type => return_type
138
+ )
139
+
140
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
141
+ if @api_client.config.debugging
142
+ @api_client.config.logger.debug "API called: ComfyUIAPIApi#comfyui_generate_api_comfyui_generate_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
143
+ end
144
+ return data, status_code, headers
145
+ end
146
+
147
+ # Comfyui History Detail
148
+ # Get details for a specific history entry.
149
+ # @param prompt_id [String]
150
+ # @param [Hash] opts the optional parameters
151
+ # @return [Hash<String, Object>]
152
+ def comfyui_history_detail_api_comfyui_history_prompt_id_get(prompt_id, opts = {})
153
+ data, _status_code, _headers = comfyui_history_detail_api_comfyui_history_prompt_id_get_with_http_info(prompt_id, opts)
154
+ data
155
+ end
156
+
157
+ # Comfyui History Detail
158
+ # Get details for a specific history entry.
159
+ # @param prompt_id [String]
160
+ # @param [Hash] opts the optional parameters
161
+ # @return [Array<(Hash<String, Object>, Integer, Hash)>] Hash<String, Object> data, response status code and response headers
162
+ def comfyui_history_detail_api_comfyui_history_prompt_id_get_with_http_info(prompt_id, opts = {})
163
+ if @api_client.config.debugging
164
+ @api_client.config.logger.debug 'Calling API: ComfyUIAPIApi.comfyui_history_detail_api_comfyui_history_prompt_id_get ...'
165
+ end
166
+ # verify the required parameter 'prompt_id' is set
167
+ if @api_client.config.client_side_validation && prompt_id.nil?
168
+ fail ArgumentError, "Missing the required parameter 'prompt_id' when calling ComfyUIAPIApi.comfyui_history_detail_api_comfyui_history_prompt_id_get"
169
+ end
170
+ # resource path
171
+ local_var_path = '/api/comfyui/history/{prompt_id}'.sub('{' + 'prompt_id' + '}', CGI.escape(prompt_id.to_s))
172
+
173
+ # query parameters
174
+ query_params = opts[:query_params] || {}
175
+
176
+ # header parameters
177
+ header_params = opts[:header_params] || {}
178
+ # HTTP header 'Accept' (if needed)
179
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
180
+
181
+ # form parameters
182
+ form_params = opts[:form_params] || {}
183
+
184
+ # http body (model)
185
+ post_body = opts[:debug_body]
186
+
187
+ # return_type
188
+ return_type = opts[:debug_return_type] || 'Hash<String, Object>'
189
+
190
+ # auth_names
191
+ auth_names = opts[:debug_auth_names] || ['APIKeyHeader', 'APIKeyQuery']
192
+
193
+ new_options = opts.merge(
194
+ :operation => :"ComfyUIAPIApi.comfyui_history_detail_api_comfyui_history_prompt_id_get",
195
+ :header_params => header_params,
196
+ :query_params => query_params,
197
+ :form_params => form_params,
198
+ :body => post_body,
199
+ :auth_names => auth_names,
200
+ :return_type => return_type
201
+ )
202
+
203
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
204
+ if @api_client.config.debugging
205
+ @api_client.config.logger.debug "API called: ComfyUIAPIApi#comfyui_history_detail_api_comfyui_history_prompt_id_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
206
+ end
207
+ return data, status_code, headers
208
+ end
209
+
210
+ # Comfyui History List
211
+ # List ComfyUI generation history.
212
+ # @param [Hash] opts the optional parameters
213
+ # @option opts [Integer] :limit Max history items (default to 20)
214
+ # @return [Hash<String, Object>]
215
+ def comfyui_history_list_api_comfyui_history_get(opts = {})
216
+ data, _status_code, _headers = comfyui_history_list_api_comfyui_history_get_with_http_info(opts)
217
+ data
218
+ end
219
+
220
+ # Comfyui History List
221
+ # List ComfyUI generation history.
222
+ # @param [Hash] opts the optional parameters
223
+ # @option opts [Integer] :limit Max history items (default to 20)
224
+ # @return [Array<(Hash<String, Object>, Integer, Hash)>] Hash<String, Object> data, response status code and response headers
225
+ def comfyui_history_list_api_comfyui_history_get_with_http_info(opts = {})
226
+ if @api_client.config.debugging
227
+ @api_client.config.logger.debug 'Calling API: ComfyUIAPIApi.comfyui_history_list_api_comfyui_history_get ...'
228
+ end
229
+ if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] > 100
230
+ fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling ComfyUIAPIApi.comfyui_history_list_api_comfyui_history_get, must be smaller than or equal to 100.'
231
+ end
232
+
233
+ # resource path
234
+ local_var_path = '/api/comfyui/history'
235
+
236
+ # query parameters
237
+ query_params = opts[:query_params] || {}
238
+ query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
239
+
240
+ # header parameters
241
+ header_params = opts[:header_params] || {}
242
+ # HTTP header 'Accept' (if needed)
243
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
244
+
245
+ # form parameters
246
+ form_params = opts[:form_params] || {}
247
+
248
+ # http body (model)
249
+ post_body = opts[:debug_body]
250
+
251
+ # return_type
252
+ return_type = opts[:debug_return_type] || 'Hash<String, Object>'
253
+
254
+ # auth_names
255
+ auth_names = opts[:debug_auth_names] || ['APIKeyHeader', 'APIKeyQuery']
256
+
257
+ new_options = opts.merge(
258
+ :operation => :"ComfyUIAPIApi.comfyui_history_list_api_comfyui_history_get",
259
+ :header_params => header_params,
260
+ :query_params => query_params,
261
+ :form_params => form_params,
262
+ :body => post_body,
263
+ :auth_names => auth_names,
264
+ :return_type => return_type
265
+ )
266
+
267
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
268
+ if @api_client.config.debugging
269
+ @api_client.config.logger.debug "API called: ComfyUIAPIApi#comfyui_history_list_api_comfyui_history_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
270
+ end
271
+ return data, status_code, headers
272
+ end
273
+
274
+ # Comfyui Image
275
+ # Fetch a generated image from ComfyUI. Use this to retrieve images by filename after generation.
276
+ # @param filename [String]
277
+ # @param [Hash] opts the optional parameters
278
+ # @option opts [String] :subfolder Subfolder within output directory (default to '')
279
+ # @option opts [String] :folder_type Folder type: output, input, temp (default to 'output')
280
+ # @return [Object]
281
+ def comfyui_image_api_comfyui_image_filename_get(filename, opts = {})
282
+ data, _status_code, _headers = comfyui_image_api_comfyui_image_filename_get_with_http_info(filename, opts)
283
+ data
284
+ end
285
+
286
+ # Comfyui Image
287
+ # Fetch a generated image from ComfyUI. Use this to retrieve images by filename after generation.
288
+ # @param filename [String]
289
+ # @param [Hash] opts the optional parameters
290
+ # @option opts [String] :subfolder Subfolder within output directory (default to '')
291
+ # @option opts [String] :folder_type Folder type: output, input, temp (default to 'output')
292
+ # @return [Array<(Object, Integer, Hash)>] Object data, response status code and response headers
293
+ def comfyui_image_api_comfyui_image_filename_get_with_http_info(filename, opts = {})
294
+ if @api_client.config.debugging
295
+ @api_client.config.logger.debug 'Calling API: ComfyUIAPIApi.comfyui_image_api_comfyui_image_filename_get ...'
296
+ end
297
+ # verify the required parameter 'filename' is set
298
+ if @api_client.config.client_side_validation && filename.nil?
299
+ fail ArgumentError, "Missing the required parameter 'filename' when calling ComfyUIAPIApi.comfyui_image_api_comfyui_image_filename_get"
300
+ end
301
+ # resource path
302
+ local_var_path = '/api/comfyui/image/{filename}'.sub('{' + 'filename' + '}', CGI.escape(filename.to_s))
303
+
304
+ # query parameters
305
+ query_params = opts[:query_params] || {}
306
+ query_params[:'subfolder'] = opts[:'subfolder'] if !opts[:'subfolder'].nil?
307
+ query_params[:'folder_type'] = opts[:'folder_type'] if !opts[:'folder_type'].nil?
308
+
309
+ # header parameters
310
+ header_params = opts[:header_params] || {}
311
+ # HTTP header 'Accept' (if needed)
312
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
313
+
314
+ # form parameters
315
+ form_params = opts[:form_params] || {}
316
+
317
+ # http body (model)
318
+ post_body = opts[:debug_body]
319
+
320
+ # return_type
321
+ return_type = opts[:debug_return_type] || 'Object'
322
+
323
+ # auth_names
324
+ auth_names = opts[:debug_auth_names] || ['APIKeyHeader', 'APIKeyQuery']
325
+
326
+ new_options = opts.merge(
327
+ :operation => :"ComfyUIAPIApi.comfyui_image_api_comfyui_image_filename_get",
328
+ :header_params => header_params,
329
+ :query_params => query_params,
330
+ :form_params => form_params,
331
+ :body => post_body,
332
+ :auth_names => auth_names,
333
+ :return_type => return_type
334
+ )
335
+
336
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
337
+ if @api_client.config.debugging
338
+ @api_client.config.logger.debug "API called: ComfyUIAPIApi#comfyui_image_api_comfyui_image_filename_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
339
+ end
340
+ return data, status_code, headers
341
+ end
342
+
343
+ # Comfyui Models
344
+ # List available models in ComfyUI.
345
+ # @param [Hash] opts the optional parameters
346
+ # @return [ModelsResponse]
347
+ def comfyui_models_api_comfyui_models_get(opts = {})
348
+ data, _status_code, _headers = comfyui_models_api_comfyui_models_get_with_http_info(opts)
349
+ data
350
+ end
351
+
352
+ # Comfyui Models
353
+ # List available models in ComfyUI.
354
+ # @param [Hash] opts the optional parameters
355
+ # @return [Array<(ModelsResponse, Integer, Hash)>] ModelsResponse data, response status code and response headers
356
+ def comfyui_models_api_comfyui_models_get_with_http_info(opts = {})
357
+ if @api_client.config.debugging
358
+ @api_client.config.logger.debug 'Calling API: ComfyUIAPIApi.comfyui_models_api_comfyui_models_get ...'
359
+ end
360
+ # resource path
361
+ local_var_path = '/api/comfyui/models'
362
+
363
+ # query parameters
364
+ query_params = opts[:query_params] || {}
365
+
366
+ # header parameters
367
+ header_params = opts[:header_params] || {}
368
+ # HTTP header 'Accept' (if needed)
369
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
370
+
371
+ # form parameters
372
+ form_params = opts[:form_params] || {}
373
+
374
+ # http body (model)
375
+ post_body = opts[:debug_body]
376
+
377
+ # return_type
378
+ return_type = opts[:debug_return_type] || 'ModelsResponse'
379
+
380
+ # auth_names
381
+ auth_names = opts[:debug_auth_names] || ['APIKeyHeader', 'APIKeyQuery']
382
+
383
+ new_options = opts.merge(
384
+ :operation => :"ComfyUIAPIApi.comfyui_models_api_comfyui_models_get",
385
+ :header_params => header_params,
386
+ :query_params => query_params,
387
+ :form_params => form_params,
388
+ :body => post_body,
389
+ :auth_names => auth_names,
390
+ :return_type => return_type
391
+ )
392
+
393
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
394
+ if @api_client.config.debugging
395
+ @api_client.config.logger.debug "API called: ComfyUIAPIApi#comfyui_models_api_comfyui_models_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
396
+ end
397
+ return data, status_code, headers
398
+ end
399
+
400
+ # Comfyui Queue
401
+ # Get ComfyUI queue status.
402
+ # @param [Hash] opts the optional parameters
403
+ # @return [QueueStatusResponse]
404
+ def comfyui_queue_api_comfyui_queue_get(opts = {})
405
+ data, _status_code, _headers = comfyui_queue_api_comfyui_queue_get_with_http_info(opts)
406
+ data
407
+ end
408
+
409
+ # Comfyui Queue
410
+ # Get ComfyUI queue status.
411
+ # @param [Hash] opts the optional parameters
412
+ # @return [Array<(QueueStatusResponse, Integer, Hash)>] QueueStatusResponse data, response status code and response headers
413
+ def comfyui_queue_api_comfyui_queue_get_with_http_info(opts = {})
414
+ if @api_client.config.debugging
415
+ @api_client.config.logger.debug 'Calling API: ComfyUIAPIApi.comfyui_queue_api_comfyui_queue_get ...'
416
+ end
417
+ # resource path
418
+ local_var_path = '/api/comfyui/queue'
419
+
420
+ # query parameters
421
+ query_params = opts[:query_params] || {}
422
+
423
+ # header parameters
424
+ header_params = opts[:header_params] || {}
425
+ # HTTP header 'Accept' (if needed)
426
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
427
+
428
+ # form parameters
429
+ form_params = opts[:form_params] || {}
430
+
431
+ # http body (model)
432
+ post_body = opts[:debug_body]
433
+
434
+ # return_type
435
+ return_type = opts[:debug_return_type] || 'QueueStatusResponse'
436
+
437
+ # auth_names
438
+ auth_names = opts[:debug_auth_names] || ['APIKeyHeader', 'APIKeyQuery']
439
+
440
+ new_options = opts.merge(
441
+ :operation => :"ComfyUIAPIApi.comfyui_queue_api_comfyui_queue_get",
442
+ :header_params => header_params,
443
+ :query_params => query_params,
444
+ :form_params => form_params,
445
+ :body => post_body,
446
+ :auth_names => auth_names,
447
+ :return_type => return_type
448
+ )
449
+
450
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
451
+ if @api_client.config.debugging
452
+ @api_client.config.logger.debug "API called: ComfyUIAPIApi#comfyui_queue_api_comfyui_queue_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
453
+ end
454
+ return data, status_code, headers
455
+ end
456
+
457
+ # Comfyui Status
458
+ # Get ComfyUI system stats (GPU, RAM, etc.).
459
+ # @param [Hash] opts the optional parameters
460
+ # @return [SystemStatsResponse]
461
+ def comfyui_status_api_comfyui_status_get(opts = {})
462
+ data, _status_code, _headers = comfyui_status_api_comfyui_status_get_with_http_info(opts)
463
+ data
464
+ end
465
+
466
+ # Comfyui Status
467
+ # Get ComfyUI system stats (GPU, RAM, etc.).
468
+ # @param [Hash] opts the optional parameters
469
+ # @return [Array<(SystemStatsResponse, Integer, Hash)>] SystemStatsResponse data, response status code and response headers
470
+ def comfyui_status_api_comfyui_status_get_with_http_info(opts = {})
471
+ if @api_client.config.debugging
472
+ @api_client.config.logger.debug 'Calling API: ComfyUIAPIApi.comfyui_status_api_comfyui_status_get ...'
473
+ end
474
+ # resource path
475
+ local_var_path = '/api/comfyui/status'
476
+
477
+ # query parameters
478
+ query_params = opts[:query_params] || {}
479
+
480
+ # header parameters
481
+ header_params = opts[:header_params] || {}
482
+ # HTTP header 'Accept' (if needed)
483
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
484
+
485
+ # form parameters
486
+ form_params = opts[:form_params] || {}
487
+
488
+ # http body (model)
489
+ post_body = opts[:debug_body]
490
+
491
+ # return_type
492
+ return_type = opts[:debug_return_type] || 'SystemStatsResponse'
493
+
494
+ # auth_names
495
+ auth_names = opts[:debug_auth_names] || ['APIKeyHeader', 'APIKeyQuery']
496
+
497
+ new_options = opts.merge(
498
+ :operation => :"ComfyUIAPIApi.comfyui_status_api_comfyui_status_get",
499
+ :header_params => header_params,
500
+ :query_params => query_params,
501
+ :form_params => form_params,
502
+ :body => post_body,
503
+ :auth_names => auth_names,
504
+ :return_type => return_type
505
+ )
506
+
507
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
508
+ if @api_client.config.debugging
509
+ @api_client.config.logger.debug "API called: ComfyUIAPIApi#comfyui_status_api_comfyui_status_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
510
+ end
511
+ return data, status_code, headers
512
+ end
513
+
514
+ # Comfyui Workflow
515
+ # Queue an arbitrary ComfyUI workflow for execution. The workflow should be in ComfyUI API format (exported via \"Save (API Format)\"). This endpoint queues the workflow and returns immediately with the prompt_id. Use /history/{prompt_id} to check the result.
516
+ # @param workflow_request [WorkflowRequest]
517
+ # @param [Hash] opts the optional parameters
518
+ # @return [WorkflowResponse]
519
+ def comfyui_workflow_api_comfyui_workflow_post(workflow_request, opts = {})
520
+ data, _status_code, _headers = comfyui_workflow_api_comfyui_workflow_post_with_http_info(workflow_request, opts)
521
+ data
522
+ end
523
+
524
+ # Comfyui Workflow
525
+ # Queue an arbitrary ComfyUI workflow for execution. The workflow should be in ComfyUI API format (exported via \&quot;Save (API Format)\&quot;). This endpoint queues the workflow and returns immediately with the prompt_id. Use /history/{prompt_id} to check the result.
526
+ # @param workflow_request [WorkflowRequest]
527
+ # @param [Hash] opts the optional parameters
528
+ # @return [Array<(WorkflowResponse, Integer, Hash)>] WorkflowResponse data, response status code and response headers
529
+ def comfyui_workflow_api_comfyui_workflow_post_with_http_info(workflow_request, opts = {})
530
+ if @api_client.config.debugging
531
+ @api_client.config.logger.debug 'Calling API: ComfyUIAPIApi.comfyui_workflow_api_comfyui_workflow_post ...'
532
+ end
533
+ # verify the required parameter 'workflow_request' is set
534
+ if @api_client.config.client_side_validation && workflow_request.nil?
535
+ fail ArgumentError, "Missing the required parameter 'workflow_request' when calling ComfyUIAPIApi.comfyui_workflow_api_comfyui_workflow_post"
536
+ end
537
+ # resource path
538
+ local_var_path = '/api/comfyui/workflow'
539
+
540
+ # query parameters
541
+ query_params = opts[:query_params] || {}
542
+
543
+ # header parameters
544
+ header_params = opts[:header_params] || {}
545
+ # HTTP header 'Accept' (if needed)
546
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
547
+ # HTTP header 'Content-Type'
548
+ content_type = @api_client.select_header_content_type(['application/json'])
549
+ if !content_type.nil?
550
+ header_params['Content-Type'] = content_type
551
+ end
552
+
553
+ # form parameters
554
+ form_params = opts[:form_params] || {}
555
+
556
+ # http body (model)
557
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(workflow_request)
558
+
559
+ # return_type
560
+ return_type = opts[:debug_return_type] || 'WorkflowResponse'
561
+
562
+ # auth_names
563
+ auth_names = opts[:debug_auth_names] || ['APIKeyHeader', 'APIKeyQuery']
564
+
565
+ new_options = opts.merge(
566
+ :operation => :"ComfyUIAPIApi.comfyui_workflow_api_comfyui_workflow_post",
567
+ :header_params => header_params,
568
+ :query_params => query_params,
569
+ :form_params => form_params,
570
+ :body => post_body,
571
+ :auth_names => auth_names,
572
+ :return_type => return_type
573
+ )
574
+
575
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
576
+ if @api_client.config.debugging
577
+ @api_client.config.logger.debug "API called: ComfyUIAPIApi#comfyui_workflow_api_comfyui_workflow_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
578
+ end
579
+ return data, status_code, headers
580
+ end
581
+ end
582
+ end