Class: RunApi::Qwen3::Client

Inherits:
Core::Client
  • Object
show all
Defined in:
lib/runapi/qwen_3/client.rb

Overview

Qwen 3 image generation and editing API client.

Text-to-image generation and targeted modifications to source images.

Examples:

client = RunApi::Qwen3::Client.new(api_key: "your-api-key")
result = client.edit_image.run(
  model: "qwen-3-edit-image",
  prompt: "Replace the background with a neon-lit city skyline",
  source_image_urls: ["https://cdn.runapi.ai/public/samples/input.jpg"]
)

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(api_key: nil, **options) ⇒ Client

Returns a new instance of Client.



22
23
24
25
26
# File 'lib/runapi/qwen_3/client.rb', line 22

def initialize(api_key: nil, **options)
  super
  @text_to_image = Resources::TextToImage.new(http)
  @edit_image = Resources::EditImage.new(http)
end

Instance Attribute Details

#edit_imageResources::EditImage (readonly)

Returns Apply targeted edits to a source image using natural-language prompts.

Returns:



20
21
22
# File 'lib/runapi/qwen_3/client.rb', line 20

def edit_image
  @edit_image
end

#text_to_imageResources::TextToImage (readonly)

Returns Generate images from text prompts.

Returns:



18
19
20
# File 'lib/runapi/qwen_3/client.rb', line 18

def text_to_image
  @text_to_image
end