Midjourney Ruby SDK for RunAPI

Use runapi-midjourney for Midjourney image generation, editing, image-to-video, image-to-prompt, prompt shortening, and seed lookup in Ruby applications and workers.

Install

gem install runapi-midjourney

Quick Start

require "runapi/midjourney"

client = RunApi::Midjourney::Client.new
result = client.text_to_image.run(
  model: "midjourney-v8.1",
  prompt: "A cobalt blue ceramic vase on white marble"
)
puts result.images.first.url

Use create, get, and run for text_to_image, edit_image, and image_to_video. Use run directly for image_to_prompt, shorten_prompt, and get_seed. Generated media URLs are temporary and should be stored in durable storage.

Licensed under the Apache License, Version 2.0.