Skip to main content

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 NameDescriptionProvider
dall-e-2Generates diverse artistic and photorealistic images.OpenAI
dall-e-3An advanced version offering improved image quality and variety.OpenAI
Dreamshape v7Specialized in generating high-fidelity images.Leonardo
Dreamshape v6Prioritizes creative and imaginative outputs.Leonardo
Dreamshape v5Offers a balance between artistic and realistic visuals.Leonardo
Dreamshape v3.2Known for its unique stylized image creations.Leonardo
Leonardo SignatureTailored for signature art style generation.Leonardo
Leonardo CreativeFocused on high creativity and abstract outputs.Leonardo
Leonardo SelectOffers a selection of curated art styles.Leonardo
Leonardo DiffusionDiffuses artistic flairs into generated images.Leonardo
Vintage Style PhotographyCreates images with a classic, vintage aesthetic.Leonardo
RPG v5Tailored for creating assets suitable for RPG games.Leonardo
Anime Pastel DreamGenerates anime-style images with a pastel color palette.Leonardo
Battle AxesSpecializes in the creation of detailed battle axe images.Leonardo
Isometric Scifi BuildingsDesigns detailed isometric sci-fi structures.Leonardo
Christmas StickersFor generating themed stickers for the holiday season.Leonardo
Cute CharactersGenerates adorable and cartoonish character images.Leonardo
Cute Animal CharactersSpecialized in creating cute and expressive animal images.Leonardo
Deliberate 1.1Focused on producing intentional and specific image styles.Leonardo
RPG 4.0Optimized for role-playing game artwork creation.Leonardo
Absolute Reality v1.6Generates highly realistic images for various uses.Leonardo
SDXL0.9Stands for 'Super Definition eXtra Large' - high-resolution image generation.Leonardo
3D Animation StyleSpecializes in images that resemble 3D animation frames.Leonardo
Spirit CreaturesGenerates ethereal and mystical creature designs.Leonardo
Character PortraitsTailored for creating detailed character portraits.Leonardo
Pixel ArtProduces images in the retro pixel art style.Leonardo
Isometric FantasyFor generating isometric images with a fantasy theme.Leonardo
Isometric Asteroid TilesCreates isometric tiles that depict asteroid surfaces.Leonardo
Crystal DepositsSpecialized in illustrating various forms of crystal formations.Leonardo
Crystal Deposits AlternateAlternative styles for crystal deposit illustrations.Leonardo
AmuletsFocused on generating intricate amulet designs.Leonardo
SheildsOptimized for crafting detailed images of protective shields.Leonardo
Chest ArmorGenerates detailed chest armor artwork suitable for character design.Leonardo
Magic PotionsSpecializes in depicting various magical potion concoctions.Leonardo
Magic ItemsTailored 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.