Skip to content
API Feature

Generate Images with AI

Create stunning images from text prompts using state-of-the-art AI models.

Vydra's Image Generation API provides access to multiple best-in-class AI models including Google's Gemini 2.0 Flash and Nano Banana for text-to-image generation.

Simple REST API, multiple aspect ratios, and consistent response format across all models. Generate everything from marketing assets to creative artwork.

Why Use Our Image Generation API

Multiple Models

Choose from Gemini Flash (fast), Nano Banana (high quality), and Flux Edit (multi-image).

10 Aspect Ratios

Square, portrait, landscape, widescreen, and ultra-wide formats supported.

Fast Generation

Get images in seconds. Gemini Flash is optimized for speed.

Consistent API

Same request/response format across all models for easy integration.

Use Cases

See how developers and businesses use our image generation api to build amazing products.

Marketing Assets

Generate social media images, ad creatives, and promotional content.

Product Mockups

Create product visualization and concept images.

Content Illustration

Add custom illustrations to blog posts and articles.

Creative Projects

Explore artistic concepts and generate reference images.

Simple API Integration

Get started with just a few lines of code.

cURLPOST
curl -X POST https://vydra.ai/api/v1/models/gemini/generate \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "prompt": "A serene Japanese garden with cherry blossoms",
    "aspectRatio": "16:9"
  }'
JavaScript
const response = await fetch('https://vydra.ai/api/v1/models/gemini/generate', {
  method: 'POST',
  headers: {
    'Authorization': 'Bearer YOUR_API_KEY',
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
    prompt: 'A serene Japanese garden with cherry blossoms',
    aspectRatio: '16:9',
  }),
});

const { imageUrl } = await response.json();
Python
import requests

response = requests.post(
    'https://vydra.ai/api/v1/models/gemini/generate',
    headers={'Authorization': 'Bearer YOUR_API_KEY'},
    json={
        'prompt': 'A serene Japanese garden with cherry blossoms',
        'aspectRatio': '16:9',
    }
)

image_url = response.json()['imageUrl']

Frequently Asked Questions

Which model should I use?

Gemini Flash for speed and prototyping, Nano Banana for higher quality, Flux Edit for multi-image composition.

What aspect ratios are supported?

1:1, 2:3, 3:2, 3:4, 4:3, 4:5, 5:4, 9:16, 16:9, and 21:9. Default is 1:1 (square).

How much does image generation cost?

Gemini: 5 credits, Nano Banana: 8 credits, Flux Edit: 15 credits per image.

Can I edit generated images?

Yes! Use the Gemini Edit or Nano Banana endpoints with an image_url parameter for image editing.

Ready to Get Started?

Sign up for free and get 100 credits to try our image generation api.