curl --request POST \
--url https://api.omniall.ai/v1/images/generations \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"model": "gpt-image-2",
"prompt": "A calm studio workspace with soft daylight",
"n": 1,
"size": "1024x1024"
}
'{
"created": 1710000000,
"data": [
{
"url": "https://example.com/image.png"
}
]
}{
"error": {
"message": "<string>",
"type": "new_api_error",
"code": "<string>"
}
}{
"error": {
"message": "<string>",
"type": "new_api_error",
"code": "<string>"
}
}{
"error": {
"message": "<string>",
"type": "new_api_error",
"code": "<string>"
}
}{
"error": {
"message": "<string>",
"type": "new_api_error",
"code": "<string>"
}
}Generations
OpenAI-compatible image generation.
Path: POST https://api.omniall.ai/v1/images/generations
General entry. image may be a single URL/Base64 or a string array (multi-reference). With references, some channels route to /v1/images/edits or Chat bridge.
Gemini native: generateContent.
curl --request POST \
--url https://api.omniall.ai/v1/images/generations \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"model": "gpt-image-2",
"prompt": "A calm studio workspace with soft daylight",
"n": 1,
"size": "1024x1024"
}
'{
"created": 1710000000,
"data": [
{
"url": "https://example.com/image.png"
}
]
}{
"error": {
"message": "<string>",
"type": "new_api_error",
"code": "<string>"
}
}{
"error": {
"message": "<string>",
"type": "new_api_error",
"code": "<string>"
}
}{
"error": {
"message": "<string>",
"type": "new_api_error",
"code": "<string>"
}
}{
"error": {
"message": "<string>",
"type": "new_api_error",
"code": "<string>"
}
}Authorizations
Use Authorization: Bearer sk-... from https://omniall.ai/dashboard
Body
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.
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.
"gpt-image-2"
Text description of the image to generate. Be specific about subject, style, lighting, and composition.
"A calm studio workspace with soft daylight"
How many images to generate. Cost usually scales with n. Some models only allow n=1.
1 <= x <= 128Output 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.
"1024x1024"
Quality tier. GPT-Image commonly: low / medium / high / auto; some models also use 1K / 2K / 4K (see ratio table).
"high"
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.
3:1, 21:9, 16:9, 3:2, 4:3, 1:1, 3:4, 2:3, 9:16, 1:3, 4:5, 5:4 "1:1"
Provider-specific image size field (passed through; not rewritten into resolution).
Provider-specific resolution field (passed through independently from image_size).
Return image URL(s) or Base64 JSON. Default often url when supported.
url, b64_json Style hint for models that support it (e.g. DALL·E vivid / natural).
Background control for models that support transparent/opaque backgrounds (e.g. GPT-Image).
Moderation level when the model supports it.
Output file format when supported (e.g. png, jpeg, webp).
Compression level for formats that support it.
Partial/streaming image options when the model supports progressive output.
Request streaming image events when the upstream model supports it (e.g. some GPT-Image streams).
Whether to request a watermark when the provider supports this flag.
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.
Opaque end-user id for abuse monitoring.
Reserved/extra JSON fields. Prefer documented top-level fields when available.