Skip to content

Image Generation Models

Puneet Bhatt edited this page Dec 19, 2023 · 1 revision

Image Generation Models

The Merlin API provides a unified interface to a diverse set of image generation models, allowing for the creation of images from textual prompts. The models range from general-purpose image generators to specialized models for specific art styles or purposes.

Available Models

Below is a table of the currently supported models along with a short description of each, and the ownership information:

Model Name Description Provider
dall-e-2 Generates diverse artistic and photorealistic images. OpenAI
dall-e-3 An advanced version offering improved image quality and variety. OpenAI
Dreamshape v7 Specialized in generating high-fidelity images. Leonardo
Dreamshape v6 Prioritizes creative and imaginative outputs. Leonardo
Dreamshape v5 Offers a balance between artistic and realistic visuals. Leonardo
Dreamshape v3.2 Known for its unique stylized image creations. Leonardo
Leonardo Signature Tailored for signature art style generation. Leonardo
Leonardo Creative Focused on high creativity and abstract outputs. Leonardo
Leonardo Select Offers a selection of curated art styles. Leonardo
Leonardo Diffusion Diffuses artistic flairs into generated images. Leonardo
Vintage Style Photography Creates images with a classic, vintage aesthetic. Leonardo
RPG v5 Tailored for creating assets suitable for RPG games. Leonardo
Anime Pastel Dream Generates anime-style images with a pastel color palette. Leonardo
Battle Axes Specializes in the creation of detailed battle axe images. Leonardo
Isometric Scifi Buildings Designs detailed isometric sci-fi structures. Leonardo
Christmas Stickers For generating themed stickers for the holiday season. Leonardo
Cute Characters Generates adorable and cartoonish character images. Leonardo
Cute Animal Characters Specialized in creating cute and expressive animal images. Leonardo
Deliberate 1.1 Focused on producing intentional and specific image styles. Leonardo
RPG 4.0 Optimized for role-playing game artwork creation. Leonardo
Absolute Reality v1.6 Generates highly realistic images for various uses. Leonardo
SDXL0.9 Stands for 'Super Definition eXtra Large' - high-resolution image generation. Leonardo
3D Animation Style Specializes in images that resemble 3D animation frames. Leonardo
Spirit Creatures Generates ethereal and mystical creature designs. Leonardo
Character Portraits Tailored for creating detailed character portraits. Leonardo
Pixel Art Produces images in the retro pixel art style. Leonardo
Isometric Fantasy For generating isometric images with a fantasy theme. Leonardo
Isometric Asteroid Tiles Creates isometric tiles that depict asteroid surfaces. Leonardo
Crystal Deposits Specialized in illustrating various forms of crystal formations. Leonardo
Crystal Deposits Alternate Alternative styles for crystal deposit illustrations. Leonardo
Amulets Focused on generating intricate amulet designs. Leonardo
Sheilds Optimized for crafting detailed images of protective shields. Leonardo
Chest Armor Generates detailed chest armor artwork suitable for character design. Leonardo
Magic Potions Specializes in depicting various magical potion concoctions. Leonardo
Magic Items Tailored for generating a wide array of enchanted items. Leonardo

Note: The models 'dall-e-2' and 'dall-e-3' are provided by OpenAI, whereas all other models listed are provided by Leonardo.

Using the Image Generation API

To employ the image generation capabilities of the Merlin API, the following Node.js sample code can be used:

import { Merlin } from "merlin-node";

const merlin = new Merlin({ merlinConfig: { apiKey: "YOUR_API_KEY_HERE" } });

async function generateImage() {
  try {
    const response = await merlin.images.generate({
      prompt: 'This is a picture of a dog',
      model: 'dall-e-2', // Replace with the desired model
      size: '256x256',
      response_format: 'b64_json', // Can also be 'url' to receive an image URL
    });

    console.log(JSON.stringify(response, null, 2));
  } catch (error) {
    console.error('Error generating image:', error);
  }
}

generateImage();

Replace YOUR_API_KEY_HERE with the actual API key provided to you.

When calling merlin.images.generate, make sure to replace dall-e-2 with the model name you wish to use from the table provided. The size parameter can be adjusted to specify the resolution of the generated image, and the response_format parameter determines the format in which the image is returned.

Clone this wiki locally