openai_generate_image
Create AI-generated images from text descriptions. Generate artwork, illustrations, or visual concepts with customizable model, size, quality, and style.
Instructions
Generate images using OpenAI image models via AceDataCloud.
Creates AI-generated images from text descriptions using models like
gpt-image-1, dall-e-3, and nano-banana variants.
Use this when:
- You want to create an image from a text description
- You need AI-generated artwork or illustrations
- You want to generate product mockups or visual concepts
Returns:
JSON response containing image URLs or base64 data.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| n | No | Number of images to generate (1-10). Default is 1. | |
| size | No | Image dimensions as 'WIDTHxHEIGHT' or 'auto' (default). gpt-image-2 accepts any custom dimensions matching the format (multiples of 16, longer side ≤ 3840, total pixels ≤ 8,294,400). Common presets — 1K: '1024x1024', '1536x1024', '1024x1536', '1792x1024', '1024x1792'; 2K (1.5× rate): '2048x2048', '2048x1536', '1536x2048', '2048x1152', '1152x2048'; 4K (1.5× rate): '2880x2880', '3264x2448', '2448x3264', '3840x2160', '2160x3840'. dall-e-2: '256x256', '512x512', '1024x1024'. dall-e-3: '1024x1024', '1792x1024', '1024x1792'. | 1024x1024 |
| model | No | The image model to use. Options: 'gpt-image-1' (default, versatile), 'gpt-image-1.5', 'gpt-image-2', 'dall-e-3', 'dall-e-2', 'nano-banana', 'nano-banana-2', 'nano-banana-pro'. | gpt-image-1 |
| style | No | Image style for dall-e-3. 'vivid' generates hyper-real and dramatic images, 'natural' produces more natural, less hyper-real looking images. | |
| prompt | Yes | A text description of the desired image(s). Be descriptive about the subject, style, lighting, and composition. Example: 'A serene mountain landscape at sunset with golden light' | |
| quality | No | Image quality. Options: 'auto' (default), 'high', 'medium', 'low', 'hd' (dall-e-3 high detail), 'standard' (dall-e-3 standard). | auto |
| background | No | Background type for gpt-image models. 'transparent' removes the background, 'opaque' keeps it, 'auto' decides automatically. | |
| moderation | No | Content moderation level. 'auto' uses default moderation, 'low' applies less strict filtering. | |
| callback_url | No | Optional webhook URL. When provided, the API returns a task_id immediately and POSTs the result to this URL when generation completes. | |
| output_format | No | Output file format. Options: 'png' (default), 'jpeg', 'webp'. | png |
| partial_images | No | Number of partial images to emit during streaming (0-3). 0 returns the final image in one event. | |
| response_format | No | How to return the image. 'url' (default) returns a URL, 'b64_json' returns base64-encoded image data. | url |
| output_compression | No | Compression level (0-100%) for jpeg/webp output formats. Default is 100. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |