Home/APIs/Image Generation
Generative AIFree tier available

Generate stunning images from text prompts with AI

Create images from text descriptions, modify images with inpainting and outpainting, and generate variations of existing images. A versatile generative AI API for marketers, designers, and developers.

See It in Action

Real examples generated by the API. See the quality for yourself.

Text to ImageAPI Output
Text to Image

Prompt: "gorilla eating pizza" — Size: 1024x1024

Features

Text to Image

Generate images from text prompts with fine control over style, composition, and content.

Inpainting

Modify specific regions of an image by painting inside a mask area with AI-generated content.

Outpainting

Extend images beyond their original boundaries with seamless AI-generated expansions.

Image Variations

Create variations of existing images while preserving the overall composition and style.

Fine Control

Tune results with cfg_scale, seed, negative prompts, and multiple output sizes up to 1408x768.

Cloud-Based

No GPU needed on your end. Fully managed cloud infrastructure handles the processing.

API Reference

4 endpoints, simple integration. Here's everything you need.

Supported Content Types

multipart/form-dataapplication/x-www-form-urlencoded
POSThttps://imagegenius-ai.p.rapidapi.com/generate-image

Generate an image from a text prompt. Supports size, cfg_scale, seed, and negative prompts.

promptstringrequired

Text description of the image to generate

negative_textstring

Text describing what to exclude from the image

sizestring

Output dimensions, e.g. 1024x1024, 768x768, 512x512. Default: 512x512

cfg_scalefloat

Prompt adherence strength (1.1-10.0). Lower = more random. Default: 8.0

seedinteger

Seed for reproducible results (0-2,147,483,646). Default: 0

Response Schema
{
  "statusCode": 200,
  "body": {
    "imageUrl": "https://...generated-image.jpg"
  }
}
POSThttps://imagegenius-ai.p.rapidapi.com/inpainting

Modify an image by changing the area inside a mask to match the prompt or surrounding background.

image / image_urlfile/stringrequired

The image to modify (binary or URL)

mask_image / mask_image_urlfile/stringrequired

Mask image defining the area to modify (black=inside, white=outside)

promptstring

Text describing what to paint inside the mask. If omitted, fills with background.

negative_textstring

Text describing what to exclude

cfg_scalefloat

Prompt adherence strength (1.1-10.0). Default: 8.0

Response Schema
{
  "statusCode": 200,
  "body": {
    "imageUrl": "https://...inpainted-image.jpg"
  }
}
POSThttps://imagegenius-ai.p.rapidapi.com/outpainting

Extend an image beyond its original boundaries. The mask defines the region to preserve.

image / image_urlfile/stringrequired

The image to extend (binary or URL)

mask_image / mask_image_urlfile/stringrequired

Mask defining the region to keep (black=keep, white=extend)

promptstringrequired

Text describing what to generate outside the mask

negative_textstring

Text describing what to exclude

outpainting_modestring

DEFAULT (may adjust original) or PRECISE (preserves original exactly)

cfg_scalefloat

Prompt adherence strength (1.1-10.0). Default: 8.0

Response Schema
{
  "statusCode": 200,
  "body": {
    "imageUrl": "https://...outpainted-image.jpg"
  }
}
POSThttps://imagegenius-ai.p.rapidapi.com/image-variation

Generate variations of an existing image. Optionally guide the variation with a prompt.

image / image_urlfile/stringrequired

The source image (binary or URL)

promptstring

Text to guide what to preserve or change

negative_textstring

Text describing what to exclude

sizestring

Output dimensions, e.g. 1024x1024, 512x512. Default: 512x512

cfg_scalefloat

Prompt adherence strength (1.1-10.0). Default: 8.0

Response Schema
{
  "statusCode": 200,
  "body": {
    "imageUrl": "https://...variation-image.jpg"
  }
}

Response

200

Returns JSON with a temporary URL to the generated image. The URL is valid for approximately 1 hour.

Quick Start

Copy-paste code to get started in seconds. Replace YOUR_API_KEY with your RapidAPI key.

# Text to Image
curl -X POST "https://imagegenius-ai.p.rapidapi.com/generate-image" \
  -H "x-rapidapi-key: YOUR_API_KEY" \
  -H "x-rapidapi-host: imagegenius-ai.p.rapidapi.com" \
  -H "Content-Type: application/x-www-form-urlencoded" \
  -d "prompt=a futuristic city at sunset&size=1024x1024"

# Inpainting
curl -X POST "https://imagegenius-ai.p.rapidapi.com/inpainting" \
  -H "x-rapidapi-key: YOUR_API_KEY" \
  -H "x-rapidapi-host: imagegenius-ai.p.rapidapi.com" \
  -F "image=@photo.jpg" \
  -F "mask_image=@mask.png" \
  -F "prompt=add yellow flowers"

Pricing

Start free, scale as you grow. All plans include full API access with no credit card required for the free tier.

Free

Basic

$0Free

5 requests/mo

  • Full API access
  • All endpoints
  • Standard support

Pro

$12.99/mo

400 requests/mo

  • Full API access
  • All endpoints
  • Standard support
Recommended

Ultra

$22.99/mo

800 requests/mo

  • Full API access
  • All endpoints
  • Standard support

Mega

$92.99/mo

4,000 requests/mo

  • Full API access
  • All endpoints
  • Standard support

Start Using Image Generation Today

Sign up on RapidAPI to get your API key. The free tier includes generous monthly requests — no credit card required.