Class: RunApi::Qwen2::Client
- Inherits:
-
Core::Client
- Object
- Core::Client
- RunApi::Qwen2::Client
- Defined in:
- lib/runapi/qwen_2/client.rb
Overview
Qwen 2 image generation, remixing, and editing API client.
Three operations: pure text-to-image generation, remix (prompt-guided variation of a source image with configurable strength), and edit (targeted modifications to a source image).
Instance Attribute Summary collapse
-
#edit_image ⇒ Resources::EditImage
readonly
Apply targeted edits to a source image using natural-language prompts.
-
#remix_image ⇒ Resources::RemixImage
readonly
Create prompt-guided variations with adjustable strength (0 = faithful, 1 = creative).
-
#text_to_image ⇒ Resources::TextToImage
readonly
Generate images from text prompts.
Instance Method Summary collapse
-
#initialize(api_key: nil, **options) ⇒ Client
constructor
A new instance of Client.
Constructor Details
#initialize(api_key: nil, **options) ⇒ Client
Returns a new instance of Client.
26 27 28 29 30 31 |
# File 'lib/runapi/qwen_2/client.rb', line 26 def initialize(api_key: nil, **) super @text_to_image = Resources::TextToImage.new(http) @remix_image = Resources::RemixImage.new(http) @edit_image = Resources::EditImage.new(http) end |
Instance Attribute Details
#edit_image ⇒ Resources::EditImage (readonly)
Returns Apply targeted edits to a source image using natural-language prompts.
24 25 26 |
# File 'lib/runapi/qwen_2/client.rb', line 24 def edit_image @edit_image end |
#remix_image ⇒ Resources::RemixImage (readonly)
Returns Create prompt-guided variations with adjustable strength (0 = faithful, 1 = creative).
22 23 24 |
# File 'lib/runapi/qwen_2/client.rb', line 22 def remix_image @remix_image end |
#text_to_image ⇒ Resources::TextToImage (readonly)
Returns Generate images from text prompts.
20 21 22 |
# File 'lib/runapi/qwen_2/client.rb', line 20 def text_to_image @text_to_image end |