Class: RunApi::FluxKontext::Client

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

Overview

Flux Kontext image generation and editing API client.

Supports pure text-to-image generation and image editing via source_image_url. Pro and max quality tiers available.

Examples:

client = RunApi::FluxKontext::Client.new(api_key: "your-api-key")
result = client.text_to_image.run(
  model: "flux-kontext-pro", prompt: "A futuristic cityscape"
)

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

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

Returns a new instance of Client.



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

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

Instance Attribute Details

#text_to_imageResources::TextToImage (readonly)

Returns Image generation operations.

Returns:



17
18
19
# File 'lib/runapi/flux_kontext/client.rb', line 17

def text_to_image
  @text_to_image
end