← All models
Generate images from text or edit with reference images, with control over aspect ratio and resolution up to 4K.
images
Details
- Accepts
- text
Pricing
- Price
- 2.56 cr / image
Prices in credits (1 credit = $0.01).
Data schema
Input
| Field | Type | Description |
|---|---|---|
| images | array | Up to 10 reference images the prompt edits or draws from. When present, the request runs as an edit and the first image drives 'auto' aspect ratio. Each image must be at least 256x256 px and at most 16 MP. Must be jpeg, png, gif, or webp. |
| promptrequired | string | Text description of the image to generate, or of the edit to apply to the reference images. |
| grounding | boolean | Let the model research the prompt with web search and image search before generating. |
| resolution | —enum: 768sq, 1k, 1.5k, 2k, 4k | Resolution of the output image. Input images are resized to the closest bin, up to 2k. |
| aspect_ratio | —enum: auto, 21:9, 2:1, 16:9, 3:2, 7:5… | Aspect ratio of the generated image. 'auto' picks the ratio from the prompt and the first reference image. |
| output_format | —enum: webp, jpg, png | Format of the output images. |
| output_quality | integer | Quality when saving the output images, from 0 to 100. 100 is best quality, 0 is lowest quality. Not relevant for .png outputs |
| safety_tolerance | integer | Moderation tolerance for inputs and outputs. 0 is the strictest, 4 is the most permissive. |