Learn how to create stunning AI-generated images using the Weights API. This guide walks you through the complete process from creating an image generation job to retrieving your final results.You can create images with LoRas or with other images as a reference.
const imageJob = await client.images.create({ prompt: "A serene mountain landscape at sunset with golden clouds", dimensions: "LANDSCAPE", numImages: 1,});console.log(`Image job created with ID: ${imageJob.id}`);console.log(`Status: ${imageJob.status}`);
You can use trained LoRA models for specific styles:
Copy
Ask AI
const customImage = await client.images.create({ prompt: "A portrait of a woman in anime style", loraIds: [loraModel.id], dimensions: "PORTRAIT", numImages: 1,});