Overview
Generate images using OpenAI’s gpt-image-1 model.- Output Type: image
- Estimated Cost: quality == “high” ? 16 : 8 credits
- Handler: modal
Parameters
Required Parameters
A visual description of your desired image.
Max length 32000 characters.
- Label: Prompt
The size of the generated images. Must be one of ‘1024x1024’, ‘1536x1024’ (landscape), ‘1024x1536’ (portrait), or ‘auto’. Defaults to auto.
- Options:
1024x1024
,1536x1024
,1024x1536
,auto
Optional Parameters
Number of samples to generate
This is the number of tries to generate for the prompt.
If you get a request for n_samples > 1, you are still using a single prompt for the whole set.
- Label: Number of samples
- Minimum: 1
- Maximum: 4
The quality of the image (high, medium, low, auto). ‘auto’ selects the best quality. Defaults to auto.
Set this to high if you want to get the highest level of details, fidelity, and coherence, especially for complex scenes, infographics, or text-heavy images.
- Options:
high
,medium
,low
,auto
Set background transparency (transparent, opaque, auto). ‘transparent’ requires output_format=‘png’ or ‘webp’. Defaults to auto.
- Options:
transparent
,opaque
,auto
Compression level (0-100) for webp/jpeg formats. Defaults to 100.
Output format for the generated image (png, jpeg, webp). Defaults to png. gpt-image-1 always returns images as base64-encoded data.
- Options:
png
,jpeg
,webp
A unique identifier representing your end-user for enabling per-user content monitoring.