Overview
Text-to-image generation works by describing what you want in natural language. The AI model interprets your prompt and creates a matching image.Choosing a model
Different models excel at different tasks. Here’s how to choose:| Model | Best for | Considerations |
|---|---|---|
gemini-3-pro-image | General purpose, photorealism | Good balance of quality and speed |
gpt-image-1.5 | Text rendering, complex scenes | Excellent instruction following |
flux.2-max | Artistic styles, creative work | Strong aesthetic quality |
Letting Lumenfall choose
If you don’t specify a provider prefix, Lumenfall automatically routes to the best available provider for that model:Writing effective prompts
The prompt is the most important factor in image quality. Here are techniques that work across models.Be specific and descriptive
Vague prompts produce generic results. Add details about subject, setting, lighting, and style.Structure your prompt
A well-structured prompt typically includes:- Subject - What’s the main focus?
- Setting - Where is it? What’s the environment?
- Style - Photography, illustration, painting?
- Mood - What feeling should it evoke?
- Technical details - Lighting, camera angle, composition
Negative space and composition
Describe what you don’t want to guide the model away from common issues:Image sizes
Size affects composition and cost. Choose based on your use case:| Size | Aspect ratio | Use case |
|---|---|---|
1024x1024 | Square | Social media, avatars, general purpose |
1792x1024 | Landscape | Hero images, banners, desktop wallpapers |
1024x1792 | Portrait | Mobile screens, stories, posters |
Not all models support all sizes. If a size isn’t supported, the request may fail or use the closest available size.
Quality settings
Some models support quality levels that trade generation time and cost for detail:| Quality | Best for |
|---|---|
standard | Most use cases, faster and cheaper |
hd | Fine details, text, complex patterns |
Generating multiple images
Generate variations to choose the best result:Some models only support
n=1. Check the model’s capabilities in the catalog.Cost estimation
Use dry run mode to estimate costs before generating. Add?dryRun=true to any request to get a cost estimate without executing it. See the Cost estimation API reference for details and response format.
Best practices
Iterate on prompts
Iterate on prompts
Start with a basic prompt and refine. Generate a few images, identify what’s missing, and add those details to your prompt.
Match model to task
Match model to task
Use photorealistic models for product shots, artistic models for creative work. The model catalog shows example outputs.
Consider aspect ratio early
Consider aspect ratio early
Design your prompt with the final aspect ratio in mind. A landscape prompt works better with landscape dimensions.
Use dry runs for cost control
Use dry runs for cost control
Estimate costs before bulk generation, especially when testing new prompts or models.