AI Image Generator - Text to Image
Pricing
from $0.00005 / actor start
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
Maintained by CommunityActor stats
1
Bookmarked
351
Total users
17
Monthly active users
12 days ago
Last modified
Categories
Features
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
| Ratio | Dimensions | Best For |
|---|---|---|
| 1:1 | 1024x1024 | Social media posts, square images |
| 16:9 | 1184x672 | Landscape photos, videos, presentations |
| 9:16 | 672x1184 | Stories, vertical content |
| 4:3 | 1184x880 | Classic photo format |
| 3:4 | 880x1184 | Portrait photos |
| 21:9 | 1568x672 | Ultra-wide panoramic |
| 9:21 | 672x1568 | Ultra-tall content |
| 3:2 | 1248x832 | Standard photo print |
| 2:3 | 832x1248 | Portrait print |
| 2:1 | 1456x720 | Cinematic wide |
| 1:2 | 720x1456 | Tall 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
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
prompt | string | Yes | — | Text description of the image you want to generate |
ratio | string | No | 1:1 | Aspect 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
- Open the Actor page on Apify Store and click Start Actor.
- Describe the image you want in
prompt. - Optionally pick an aspect
ratio(defaults to 1:1). - Run the Actor and get
imageUrl,savedImageKey, andimageBase64from 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 requestsresponse = 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
| Event | Description | Price |
|---|---|---|
imageGenerated | Successfully 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
promptis 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.
Related Actors
If you need more AI image tools from Apify, check out my other Apify Actors:
- AI Background Remover - HD & Transparent
- AI Face Swap
- AI Image Upscaler & Face Enhancer
- Analyze Image
- Frame Image Converter
Built and maintained by akash9078 on the Apify platform.