OpenapiClient - the Ruby gem for the Livepeer AI Runner
An application to run AI pipelines
This SDK is automatically generated by the OpenAPI Generator project:
- API version: 0.1.0
- Package version: 1.0.0
- Generator version: 7.5.0
- Build package: org.openapitools.codegen.languages.RubyClientCodegen
To build the Ruby code into a gem:
gem build openapi_client.gemspec
Then either install the gem locally:
gem install ./openapi_client-1.0.0.gem
(for development, run gem install --dev ./openapi_client-1.0.0.gem
to install the development dependencies)
or publish the gem to a gem hosting service, e.g. RubyGems.
Finally add this to the Gemfile:
gem 'openapi_client', '~> 1.0.0'
If the Ruby gem is hosted at a git repository: https://github.com/GIT_USER_ID/GIT_REPO_ID, then add the following in the Gemfile:
gem 'openapi_client', :git => 'https://github.com/GIT_USER_ID/GIT_REPO_ID.git'
Include the Ruby code directly using -I
as follows:
ruby -Ilib script.rb
Please follow the installation procedure and then run the following code:
# Load the gem
require 'openapi_client'
# Setup authorization
OpenapiClient.configure do |config|
# Configure Bearer authorization: HTTPBearer
config.access_token = 'YOUR_BEARER_TOKEN'
# Configure a proc to get access tokens in lieu of the static access_token configuration
config.access_token_getter = -> { 'YOUR TOKEN GETTER PROC' }
end
api_instance = OpenapiClient::DefaultApi.new
prompt = 'prompt_example' # String |
image = File.new('/path/to/some/file') # File |
model_id = 'model_id_example' # String |
opts = {
strength: 8.14, # Float |
guidance_scale: 8.14, # Float |
image_guidance_scale: 8.14, # Float |
negative_prompt: 'negative_prompt_example', # String |
safety_check: true, # Boolean |
seed: 56, # Integer |
num_images_per_prompt: 56 # Integer |
}
begin
#Image To Image
result = api_instance.image_to_image(prompt, image, model_id, opts)
p result
rescue OpenapiClient::ApiError => e
puts "Exception when calling DefaultApi->image_to_image: #{e}"
end
All URIs are relative to https://dream-gateway.livepeer.cloud
Class | Method | HTTP request | Description |
---|---|---|---|
OpenapiClient::DefaultApi | image_to_image | POST /image-to-image | Image To Image |
OpenapiClient::DefaultApi | image_to_video | POST /image-to-video | Image To Video |
OpenapiClient::DefaultApi | text_to_image | POST /text-to-image | Text To Image |
OpenapiClient::DefaultApi | upscale | POST /upscale | Upscale |
- OpenapiClient::APIError
- OpenapiClient::HTTPError
- OpenapiClient::HTTPValidationError
- OpenapiClient::HealthCheck
- OpenapiClient::ImageResponse
- OpenapiClient::Media
- OpenapiClient::TextToImageParams
- OpenapiClient::ValidationError
- OpenapiClient::ValidationErrorLocInner
- OpenapiClient::VideoResponse
Authentication schemes defined for the API:
- Type: Bearer authentication