Skip to main content
POST

Authorizations

Authorization
string
header
required

Use Authorization: Bearer sk-... from https://omniall.ai/dashboard

Body

application/json

OpenAI-compatible image generation body (POST /v1/images/generations). Maps to gateway dto.ImageRequest. Works for GPT-Image, DALL·E, Flux, Grok Imagine, Seedream/Jimeng image channels, and many Gemini image models when routed to this path.

model
string
required

Image model id from Model Square / GET /v1/models. Examples: gpt-image-1, gpt-image-2, dall-e-3, flux-pro, grok-imagine-image, doubao-seedream-5-0-pro-260628, gemini-2.5-flash-image.

Example:

"gpt-image-2"

prompt
string
required

Text description of the image to generate. Be specific about subject, style, lighting, and composition.

Example:

"A calm studio workspace with soft daylight"

n
integer
default:1

How many images to generate. Cost usually scales with n. Some models only allow n=1.

Required range: 1 <= x <= 128
size
string

Output size as pixel string (e.g. 1024x1024, 2048x1152, 3840x2160, auto), or use aspect_ratio with quality/image_size (1K/2K/4K). See the GPT-Image ratio table for common aspect ratios (3:1 through 1:3). Custom sizes: max side ≤ 3840, multiples of 16, aspect ratio ≤ 3:1.

Example:

"1024x1024"

quality
string

Quality tier. GPT-Image commonly: low / medium / high / auto; some models also use 1K / 2K / 4K (see ratio table).

Example:

"high"

aspect_ratio
enum<string>

Aspect ratio, e.g. 1:1, 16:9, 9:16, 3:2, 4:3, 21:9, 3:1, 1:3. Combined with 1K/2K/4K tiers, see the GPT-Image ratio table for pixel sizes.

Available options:
3:1,
21:9,
16:9,
3:2,
4:3,
1:1,
3:4,
2:3,
9:16,
1:3,
4:5,
5:4
Example:

"1:1"

image_size
string

Provider-specific image size field (passed through; not rewritten into resolution).

resolution
string

Provider-specific resolution field (passed through independently from image_size).

response_format
enum<string>

Return image URL(s) or Base64 JSON. Default often url when supported.

Available options:
url,
b64_json
style
any

Style hint for models that support it (e.g. DALL·E vivid / natural).

background
any

Background control for models that support transparent/opaque backgrounds (e.g. GPT-Image).

moderation
any

Moderation level when the model supports it.

output_format
any

Output file format when supported (e.g. png, jpeg, webp).

output_compression
any

Compression level for formats that support it.

partial_images
any

Partial/streaming image options when the model supports progressive output.

stream
boolean

Request streaming image events when the upstream model supports it (e.g. some GPT-Image streams).

watermark
boolean

Whether to request a watermark when the provider supports this flag.

image

Optional reference image(s). Single URL, Base64, data:image/...;base64,..., or a string array of references. Prefer /v1/images/edits for full edit/inpaint flows.

user
any

Opaque end-user id for abuse monitoring.

extra_fields
any

Reserved/extra JSON fields. Prefer documented top-level fields when available.

Response

Image generation result

OpenAI-compatible image response.

created
integer

Unix timestamp when the image job completed.

data
object[]

Generated image payloads.