Class: RunApi::Seedream::Client
- Inherits:
-
Core::Client
- Object
- Core::Client
- RunApi::Seedream::Client
- Defined in:
- lib/runapi/seedream/client.rb
Overview
Seedream image generation and editing API client.
Three model families with different field requirements:
- 4.5: requires aspect_ratio and output_quality
- 5-lite: same required fields as 4.5, faster generation
- V4: uses output_resolution instead; supports seed and batch output_count
Instance Attribute Summary collapse
-
#decompose_layers ⇒ Resources::DecomposeLayers
readonly
Separate an image into editable layers.
-
#edit_image ⇒ Resources::EditImage
readonly
Edit source images with a text prompt.
-
#text_to_image ⇒ Resources::TextToImage
readonly
Text-to-image generation across model versions.
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.
35 36 37 38 39 40 |
# File 'lib/runapi/seedream/client.rb', line 35 def initialize(api_key: nil, **) super @text_to_image = Resources::TextToImage.new(http) @edit_image = Resources::EditImage.new(http) @decompose_layers = Resources::DecomposeLayers.new(http) end |
Instance Attribute Details
#decompose_layers ⇒ Resources::DecomposeLayers (readonly)
Returns Separate an image into editable layers.
33 34 35 |
# File 'lib/runapi/seedream/client.rb', line 33 def decompose_layers @decompose_layers end |
#edit_image ⇒ Resources::EditImage (readonly)
Returns Edit source images with a text prompt.
31 32 33 |
# File 'lib/runapi/seedream/client.rb', line 31 def edit_image @edit_image end |
#text_to_image ⇒ Resources::TextToImage (readonly)
Returns Text-to-image generation across model versions.
29 30 31 |
# File 'lib/runapi/seedream/client.rb', line 29 def text_to_image @text_to_image end |