Gemini + Inliner.ai Integration
Set up Google Gemini to automatically generate Inliner.ai image URLs in your code. Transform your development workflow with AI-powered image generation using custom instructions.

Google Gemini + Inliner.ai = Seamless AI-powered development
This tutorial will show you how to configure Google Gemini to automatically generate Inliner.ai image URLs when you request code that includes images. By adding specific instructions to your Gemini custom instructions, you'll enable seamless image generation without leaving your chat interface.
Prerequisites
- A Google Gemini account (free or paid)
- An Inliner.ai account (free tier available)
- A project created in Inliner.ai (we'll use
inliner-demo
as an example)
inliner-demo
with your actual project namespace from Inliner.ai. Each project has a unique namespace that appears in your image URLs.
How to Set Up Gemini with Inliner.ai
To get started, you'll need a Gemini account. Visit Gemini →
Step 1: Get Your Inliner.ai Project Instructions
First, you need to get the specific instructions for your Inliner.ai project. Here's how:
- Log into your Inliner.ai account
- Go to the Projects section
- Find your project and click the LLM Instructions button
- In the modal that opens, click the Copy button next to "Google Gemini"
Step 2: Configure Gemini Custom Instructions
Now you'll add the instructions to your Gemini custom instructions:
- Open Google Gemini in your browser
- Click on the Settings icon (gear) in the top right
- Select Custom Instructions
- In the Custom Instructions section, paste the instructions you copied from Inliner.ai
- Click Save
Where to Find Custom Instructions
The Custom Instructions setting is located in Gemini's settings menu. You can access it by:
- Clicking the settings gear icon → Custom Instructions
- Or going to Settings → Custom Instructions
This setting applies to all your conversations with Gemini, so you only need to set it up once.
Step 3: Test the Integration
Now you can test the integration by asking Gemini to generate code with images:
Example Prompts to Test
- "Create a React component for a hero section with a background image"
- "Generate HTML for a product showcase with multiple product images"
- "Build a landing page with hero, features, and testimonial sections"
- "Create a portfolio website with project thumbnails"
- "Add images to this existing component"
How It Works
When you ask Gemini to generate code that includes images, it will now automatically:
- Ask for your Inliner.ai project name if not provided
- Use your project namespace in the URLs
- Generate descriptive, hyphen-separated image names
- Include appropriate dimensions for different use cases
- Create meaningful alt text for accessibility
- Prefer professional, realistic imagery
- Leverage Gemini's multimodal capabilities for better image descriptions
Example Output
Here's what Gemini will generate when you ask for a hero section:
Gemini's Response
<!-- Hero Section -->
<section class="hero">
<div class="hero-content">
<h1>Welcome to Our Platform</h1>
<p>Transform your workflow with AI-powered tools</p>
<button class="cta-button">Get Started</button>
</div>
<div class="hero-image">
<img
src="https://img.inliner.ai/inliner-demo/team-working-modern-office-collaboration_800x600.png"
alt="Team working together in a modern office environment"
class="hero-bg"
>
</div>
</section>
Generated Image Output:

The image above was generated using the URL from the code example. Notice how Gemini automatically creates a professional, realistic image that perfectly fits the hero section context.
Common Use Cases & Dimensions
Gemini will automatically use appropriate dimensions based on the context:
Use Case | Dimensions | Example |
---|---|---|
Hero images | 1200x600, 1920x1080 | hero-banner-startup-pitch_1200x600 |
Feature cards | 600x400, 800x600 | dashboard-analytics-overview_800x400 |
Profile photos | 400x400, 300x300 | user-profile-avatar-portrait_400x400 |
Product images | 600x800, 800x800 | product-showcase-lifestyle_600x800 |
Advanced Features
Custom Prompts
If you've set up custom prompts in your Inliner.ai project, Gemini will automatically apply them to all generated images, ensuring consistent branding and style.
Reference Images
If your project has reference images uploaded, Gemini can reference them in the generated URLs to maintain visual consistency with your brand assets.
Multimodal Capabilities
Gemini's multimodal capabilities allow it to better understand and describe images, leading to more accurate and detailed image prompts:
Gemini's Multimodal Advantage
Unlike other AI assistants, Gemini can:
- Analyze existing images to understand style and composition
- Generate more precise descriptions for better image generation
- Understand visual context when you share reference images
- Provide better alt text for accessibility
Project-Specific Instructions
You can customize the instructions for different projects by asking Gemini to use specific project names:
Project-Specific Request Example
Project-Specific Request Example
User: "Generate a landing page for my SaaS project. Use the project name 'inliner-demo' for all images."
Gemini: "I'll create a landing page using your 'inliner-demo' project for all images. Here's the code:
<section class=\"hero\">
<img src=\"https://img.inliner.ai/inliner-demo/saas-hero-banner_1920x600.png\"
alt=\"SaaS hero banner with modern UI\"
class=\"hero-image\">
</section>
<section class=\"products\">
<img src=\"https://img.inliner.ai/inliner-demo/product-showcase-grid_1200x800.png\"
alt=\"Product showcase grid\"
class=\"product-grid\">
</section>"
Troubleshooting
Common Issues
- Images not generating: Make sure you're logged into Inliner.ai and the project exists
- Wrong project namespace: Double-check the project name in your Inliner.ai dashboard
- Poor image quality: Try adding more descriptive prompts or adjusting dimensions
- Style inconsistencies: Check your project's custom prompt settings
- Custom instructions not working: Ensure you've saved the custom instructions and started a new conversation
Best Practices
- Be specific: The more descriptive your request, the better the generated images
- Use consistent naming: Let Gemini handle the URL generation for consistency
- Test different dimensions: Experiment with various sizes for different use cases
- Leverage custom prompts: Set up project-level styling for automatic brand consistency
- Start new conversations: Custom instructions work best in fresh conversations
- Use multimodal features: Share reference images to get better results
Next Steps
Now that you have Google Gemini integrated with Inliner.ai, you can:
- Generate complete landing pages with all images included
- Create marketing materials with consistent branding
- Build portfolio websites with professional imagery
- Develop product showcases with high-quality visuals
- Create social media graphics and banners
- Add images to existing components and pages
- Leverage Gemini's multimodal capabilities for better image descriptions
Ready to transform your development workflow? Start generating images with Google Gemini and Inliner.ai today!