AI Image Generator - Text to Image avatar

AI Image Generator - Text to Image

Pricing

from $0.00005 / actor start

Go to Apify Store
AI Image Generator - Text to Image

AI Image Generator - Text to Image

Generate stunning AI images from text prompts. Create high-quality images using advanced AI models with support for multiple aspect ratios and customizable settings.

Pricing

from $0.00005 / actor start

Rating

0.0

(0)

Developer

Akash Kumar Naik

Akash Kumar Naik

Maintained by Community

Actor stats

1

Bookmarked

345

Total users

27

Monthly active users

3 days ago

Last modified

Share

AI Image Generator is an Apify Actor that generates AI images from text prompts using NVIDIA's Flux 2 Klein model. Describe the image you want, pick one of 11 aspect ratios, and get a ready-to-use image URL back in seconds. Built for digital art, marketing visuals, and content creation.

What Is AI Image Generator?

AI Image Generator is a text-to-image generation API that transforms your creative ideas into visual masterpieces. Simply describe what you want to see, and the advanced Flux 2 Klein AI model generates a corresponding image in seconds on NVIDIA's AI infrastructure. Every image is optimized for the aspect ratio you choose, ranging from 672px to 1568px.

Key Features

  • Text-to-Image Generation — create images from text prompts using NVIDIA's Flux 2 Klein model
  • 11 Aspect Ratios — support for 1:1, 16:9, 9:16, 4:3, 3:4, 21:9, 9:21, 3:2, 2:3, 2:1, 1:2
  • High-Quality Output — generate images optimized for each aspect ratio (672-1568px)
  • Fast Processing — powered by NVIDIA's AI infrastructure
  • Pay Per Use — simple pricing at $0.001 per image generated

Supported Aspect Ratios

RatioDimensionsBest For
1:11024x1024Social media posts, square images
16:91184x672Landscape photos, videos, presentations
9:16672x1184Stories, vertical content
4:31184x880Classic photo format
3:4880x1184Portrait photos
21:91568x672Ultra-wide panoramic
9:21672x1568Ultra-tall content
3:21248x832Standard photo print
2:3832x1248Portrait print
2:11456x720Cinematic wide
1:2720x1456Tall portrait

Use Cases

  • Digital Art Creation — generate unique artwork, illustrations, and concept art
  • Marketing & Social Media — create eye-catching visuals for campaigns
  • Product Photography — generate product mockups and lifestyle shots
  • Content Creation — produce images for blogs, websites, and presentations
  • Creative Projects — explore AI-generated visuals for any creative need

Input Parameters

ParameterTypeRequiredDefaultDescription
promptstringYes—Text description of the image you want to generate
ratiostringNo1:1Aspect ratio (1:1, 16:9, 9:16, 4:3, 3:4, 21:9, 9:21, 3:2, 2:3, 2:1, 1:2)

Example input:

{
"prompt": "A beautiful sunset over mountains with vibrant orange and purple colors",
"ratio": "16:9"
}

Sample Output

{
"ok": true,
"imageUrl": "https://api.apify.com/v2/key-value-stores/...",
"savedImageKey": "generated-image.png",
"imageBase64": "data:image/png;base64,iVBORw0KGgoAAAANS..."
}
  • imageUrl: public URL to view/download the generated image
  • savedImageKey: key for accessing the image in the key-value store
  • imageBase64: base64-encoded image data (useful for local development)

How to Use the AI Image Generator

  1. Open the Actor page on Apify Store and click Start Actor.
  2. Describe the image you want in prompt.
  3. Optionally pick an aspect ratio (defaults to 1:1).
  4. Run the Actor and get imageUrl, savedImageKey, and imageBase64 from the dataset.

Connect via API

cURL:

curl -X POST "https://api.apify.com/v2/acts/akash9078/ai-image-generator/runs" \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-H "Content-Type: application/json" \
-d '{"prompt":"A beautiful sunset over mountains with vibrant orange and purple colors","ratio":"16:9"}'

Python:

import requests
response = requests.post(
"https://api.apify.com/v2/acts/akash9078/ai-image-generator/runs",
headers={"Authorization": "Bearer YOUR_API_TOKEN"},
json={"prompt": "A beautiful sunset over mountains with vibrant orange and purple colors", "ratio": "16:9"},
)
print(response.json())

Node.js with the Apify Client:

const { ApifyClient } = require('apify-client');
const client = new ApifyClient({ token: process.env.APIFY_TOKEN });
const run = await client.actor('akash9078/ai-image-generator').call({
prompt: 'A beautiful sunset over mountains with vibrant orange and purple colors',
ratio: '16:9',
});
const { items } = await client.dataset(run.defaultDatasetId).listItems();
console.log(items);

AI Image Generator Pricing

EventDescriptionPrice
imageGeneratedSuccessfully generated one AI image$0.001

You only pay for successful image generations. No charges for failed runs.

Why Use the AI Image Generator?

  • Prompt-only interface — no model configuration, negative prompts, or sampler tuning required
  • 11 aspect ratios out of the box — from square posts to ultra-wide panoramas
  • $0.001 per image — pay per event only when an image is actually generated
  • Managed infrastructure — NVIDIA's AI infrastructure handles the GPU workload; you just call the API
  • Automation-ready — generate images in bulk through the Apify API, schedules, or integrations

Limitations

  • A non-empty prompt is required for every run
  • Aspect ratio is limited to the 11 supported values listed above
  • Output resolution is optimized per ratio and ranges from 672px to 1568px
  • Images are delivered through the dataset and Key-Value Store rather than direct streaming

FAQ

Which model powers the image generation?

NVIDIA's Flux 2 Klein model, running on NVIDIA's AI infrastructure.

How much does one image cost?

$0.001 per successfully generated image. Failed runs are not charged.

Can I control the image size?

You control it through the aspect ratio. Each of the 11 ratios has fixed optimized dimensions between 672px and 1568px.

Where do I get the generated image?

From the dataset: imageUrl (public URL), savedImageKey (key-value store), or imageBase64 (inline data for local development).

Can I use it for social media posts?

Yes — the 1:1 (1024x1024) and 9:16 ratios are designed for social posts and stories.

If you need more AI image tools from Apify, check out my other Apify Actors:


Built and maintained by akash9078 on the Apify platform.