Class: RunApi::Recraft::Client
- Inherits:
-
Core::Client
- Object
- Core::Client
- RunApi::Recraft::Client
- Defined in:
- lib/runapi/recraft/client.rb
Overview
Recraft image post-processing API client.
Provides AI-powered image upscaling and background removal.
Instance Attribute Summary collapse
-
#remove_background ⇒ Resources::RemoveBackground
readonly
Background removal operations.
-
#upscale_image ⇒ Resources::UpscaleImage
readonly
AI-powered image upscaling operations.
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.
27 28 29 30 31 |
# File 'lib/runapi/recraft/client.rb', line 27 def initialize(api_key: nil, **) super @upscale_image = Resources::UpscaleImage.new(http) @remove_background = Resources::RemoveBackground.new(http) end |
Instance Attribute Details
#remove_background ⇒ Resources::RemoveBackground (readonly)
Returns Background removal operations.
25 26 27 |
# File 'lib/runapi/recraft/client.rb', line 25 def remove_background @remove_background end |
#upscale_image ⇒ Resources::UpscaleImage (readonly)
Returns AI-powered image upscaling operations.
23 24 25 |
# File 'lib/runapi/recraft/client.rb', line 23 def upscale_image @upscale_image end |