Aprende a generar imágenes de alta calidad utilizando indicaciones de texto sencillas.
Learn how to generate your first AI image using the NovaAI Image Generation API. This guide walks through creating an image from a text prompt, customizing the output, and understanding the response.
Overview
NovaAI can generate original images from natural language descriptions. Simply provide a prompt, choose a model and image size, and the API returns one or more generated images.
In this guide, you'll create your first image in just a few steps.
Estimated time: 10 minutes
Prerequisites
Before you begin, ensure you have:
Installed the NovaAI SDK
Configured your API key
Completed Authentication
A JavaScript project
Tip: The more descriptive your prompt is, the more accurate the generated image will be.
Tip: The more descriptive your prompt is, the more accurate the generated image will be.
1
Create an Image Request
Create a new file named generate-image.js and initialize the NovaAI client.
1import{NovaAI}from"@novaai/sdk";
2
3constclient=newNovaAI({
4apiKey:process.env.NOVA_API_KEY,
5});
6
7constimage=awaitclient.images.generate({
8model:"nova-image-1",
9prompt:"A futuristic city skyline at sunset with flying vehicles and cinematic lighting.",
10size:"1024x1024"
11});
12
13console.log(image.data[0].url);
After running the script, NovaAI returns a URL pointing to the generated image.
1
Create an Image Request
Create a new file named generate-image.js and initialize the NovaAI client.
1import{NovaAI}from"@novaai/sdk";
2
3constclient=newNovaAI({
4apiKey:process.env.NOVA_API_KEY,
5});
6
7constimage=awaitclient.images.generate({
8model:"nova-image-1",
9prompt:"A futuristic city skyline at sunset with flying vehicles and cinematic lighting.",
10size:"1024x1024"
11});
12
13console.log(image.data[0].url);
After running the script, NovaAI returns a URL pointing to the generated image.
2
Improve Your Prompt
Well-structured prompts typically produce better results.
Generate multiple variations when exploring ideas.
Refine prompts instead of rewriting them completely.
Small prompt adjustments often produce significantly different results. Experiment with descriptive details such as perspective, color palette, mood, and composition.
Small prompt adjustments often produce significantly different results. Experiment with descriptive details such as perspective, color palette, mood, and composition.
Completed
Congratulations!
You've successfully generated your first AI image with NovaAI.