Synchronous mode
Generate images
Call the synchronous gpt-image-2 image generation endpoint and get the result directly.
POST
Use this endpoint to call the synchronous
gpt-image-2 image generation workflow.
Authorizations
Paste your SmewAI API key as a Bearer token.
Body
application/json
Image model name.
Available options:
gpt-image-2 Describe the image you want to generate.
Number of images to generate. Use 1.
Required range:
1 <= x <= 1Output aspect ratio.
Available options:
auto, 1:1, 3:2, 2:3, 4:3, 3:4, 5:4, 4:5, 16:9, 9:16, 2:1, 1:2, 21:9, 9:21 Output resolution tier.
Available options:
1k, 2k, 4k Optional reference images. Supports remote URLs and base64 data URIs.
Maximum array length:
16