Prompt: Paint a picture of the plants I got last month, pixar-animation

Prompt: Create a picture of my dream house, based on my interests

How to Generate Images
- Natural Language
- /image Command
Just describe what you want in your chat message:Khoj automatically detects image generation intent and creates the image.
Prompt Engineering
Craft better prompts for higher quality images:Be Specific
Be Specific
Instead of:Try:Include:
- Subject details
- Setting/environment
- Lighting conditions
- Art style
- Mood/atmosphere
Specify Art Style
Specify Art Style
Reference artistic styles for consistent results:
- Photorealistic: “professional photography”, “DSLR”, “8k”
- Illustration: “digital art”, “concept art”, “artstation”
- Painting: “oil painting”, “watercolor”, “impressionist”
- 3D: “3D render”, “octane render”, “unreal engine”
- Cartoon: “pixar style”, “anime”, “comic book art”
- Vintage: “1970s photography”, “retro poster”, “film grain”
Use Descriptive Language
Use Descriptive Language
Add adjectives for atmosphere:
- Lighting: golden hour, dramatic shadows, soft diffused light
- Mood: peaceful, energetic, mysterious, whimsical
- Colors: vibrant, muted, pastel, monochromatic
- Quality: detailed, intricate, minimalist, abstract
Reference Your Notes
Reference Your Notes
Khoj can use context from your documents:
Iterate and Refine
Iterate and Refine
Follow up to improve results:
- “Create a mountain landscape”
- “Make it more dramatic with storm clouds”
- “Add a small cabin in the foreground”
- “Change the time to sunset”
Use Cases
- Creative Projects
- Professional
- Personal
- Educational
Character Design:Scene Visualization:Mood Boards:
Self-Hosting Setup
Configure image generation for your self-hosted Khoj:Option 1: Replicate (Recommended)
Get API Key
Sign up at replicate.com and get your API token from account settings
Choose a Model
Replicate supports multiple image models. Recommended:
- Flux 1.1 Pro (best quality):
black-forest-labs/flux-1.1-pro - Flux Schnell (fastest):
black-forest-labs/flux-schnell - Stable Diffusion XL (balanced):
stability-ai/sdxl - Ideogram (text in images):
ideogram-ai/ideogram-v2
Create Model Config
Navigate to:
http://localhost:42110/server/admin/database/texttoimagemodelconfig/Click “Add Text to Image Model Config”Configure Settings
- Model name:
black-forest-labs/flux-1.1-pro(or your choice) - Type:
Replicate - Api key: Your Replicate API token
- Ai model api: Select your configured AI model API (or leave blank for default)
Pricing: Replicate charges per image generation. See pricing details.
Option 2: OpenAI DALL-E
Get OpenAI API Key
Generate an API key at platform.openai.com
Configure OpenAI API
Ensure you have an OpenAI API configured in Khoj.See setup guide →
Create Image Model Config
Navigate to:
http://localhost:42110/server/admin/database/texttoimagemodelconfig/Add new configuration:- Model name:
dall-e-3 - Type:
OpenAI - Ai model api: Select your OpenAI API config
DALL-E 3 is simpler to set up if you already use OpenAI for chat, but may be more expensive per image than Replicate.
Model Comparison
| Model | Quality | Speed | Cost | Best For |
|---|---|---|---|---|
| Flux 1.1 Pro | Excellent | Medium | $$$ | Professional work |
| Flux Schnell | Good | Very Fast | $ | Quick iterations |
| DALL-E 3 | Excellent | Medium | $$$ | Text in images |
| SDXL | Good | Fast | $$ | General use |
| Ideogram | Very Good | Medium | $$ | Typography |
Advanced Techniques
Multi-Step Generation
Multi-Step Generation
Refine images through conversation:
Style Transfer
Style Transfer
Apply artistic styles to concepts:
Combining with Research
Combining with Research
Use online search for reference:
Batch Generation
Batch Generation
Request variations:
Image Generation in Workflows
- Content Creation
- Brainstorming
- Learning
Best Practices
Clear Descriptions
Be specific about subjects, style, and mood
Iterate
Refine through conversation rather than one perfect prompt
Save Prompts
Keep track of prompts that work well for reuse
Ethical Use
Respect copyrights and use generated images responsibly
Limitations
- Text in images: Can be inconsistent (use Ideogram or DALL-E 3 for better text)
- Specific people: Cannot reliably generate real individuals
- Complex scenes: Very detailed multi-element scenes may need iteration
- Fine details: Small text or intricate patterns may be imperfect
- Consistency: Generated images of same subject will vary
Troubleshooting
Image generation not working
Image generation not working
Self-hosted:
- Verify API key is correct
- Check model config exists and is active
- Review server logs for errors
- Ensure sufficient API credits
- Feature should work automatically
- Try explicit
/imagecommand - Report issue if persistent
Poor quality results
Poor quality results
Try:
- Use more descriptive prompts
- Specify art style explicitly
- Reference high-quality examples
- Switch to higher-quality model (Flux Pro, DALL-E 3)
Slow generation
Slow generation
Reasons:
- High-quality models take longer
- API service load
- Use faster model (Flux Schnell)
- Be patient (typically 10-30 seconds)
Unexpected style
Unexpected style
Solutions:
- Be more explicit about desired style
- Include negative prompts (“not cartoonish”)
- Reference specific artists or movements
- Try different model better suited to your style
Ethical Considerations
Please use image generation responsibly:
- Don’t create misleading or deceptive content
- Respect copyright and don’t replicate specific artworks
- Avoid generating harmful or offensive imagery
- Give credit when sharing AI-generated art
- Follow platform guidelines and laws
Saving and Using Images
Next Steps
Create Diagrams
Use
/diagram command for Excalidraw-style diagramsAutomate Image Tasks
Schedule automated image generation
Learn More Prompting
Read the detailed blog post about image generation
