Class: StabilityAI::Images

Inherits:
Object
  • Object
show all
Defined in:
lib/stabilityai/images.rb

Instance Method Summary collapse

Constructor Details

#initialize(access_token: nil, organization_id: nil) ⇒ Images

Returns a new instance of Images.



3
4
5
6
# File 'lib/stabilityai/images.rb', line 3

def initialize(access_token: nil, organization_id: nil)
  StabilityAI.configuration.access_token = access_token if access_token
  StabilityAI.configuration.organization_id = organization_id if organization_id
end

Instance Method Details

#image_to_image(parameters: {}) ⇒ Object

def edit(parameters: {})

OpenAI::Client.multipart_post(path: "/images/edits", parameters: open_files(parameters))

end



12
13
14
# File 'lib/stabilityai/images.rb', line 12

def image_to_image(parameters: {})
  StabilityAI::Client.multipart_post(path: "/image-to-image", parameters: open_files(parameters))
end

#upscale(parameters: {}) ⇒ Object



16
17
18
# File 'lib/stabilityai/images.rb', line 16

def upscale(parameters: {})
  StabilityAI::Client.multipart_post(path: "/image-to-image/upscale", parameters: open_files(parameters))
end