Skip to main content

🖼️ Create Image Generation

Generate images from text prompts using AI models like openai/dall-e-3 or google/imagen-4.
const { Neuroa } = require('neuroa-sdk');

const client = new Neuroa({
  apiKey: process.env.NEUROA_API_KEY
});

// Generate images
client.models.generate.images({
  prompt: "A cat at sunset",
  n: 1,
  model: "openai/dall-e-3",
  size: "1024x1024"
}).then(response => {
  console.log(response.data); // Array of image URLs
  response.data.forEach((image, index) => {
    console.log(`Image ${index + 1}: ${image.url}`);
  });
}).catch(error => {
  console.error("Image generation error:", error);
});

Request Body

{
  "model": "openai/dall-e-3",
  "prompt": "a futuristic city in the clouds",
  "n": 1,
  "size": "1024x1024",
  "quality": "standard"
}
FieldTypeRequiredDescription
modelstring✅ YesModel ID (openai/dall-e-3, google/imagen-4, etc.)
promptstring✅ YesText description of the image
nnumber✅ YesNumber of images to generate (max: 4)
sizestring✅ YesImage resolution (1024x1024, 1024x1792, 1792x1024)
qualitystring✅ YesImage quality (standard, hd)
stylestring⬜ OptionalStyle preset (e.g., vivid, natural)

Example Response

{
  "created": 1689457253,
  "data": [
    {
      "url": "url"
    }
  ]
}

Authentication

Authorization: Bearer YOUR_API_KEY