Orux AI
Documentation

Images

POST /api/v1/images/generations — generate images synchronously.

POST/api/v1/images/generationsBearer sk-app-…

Synchronous image generation. For long-running or queue-based image jobs (Midjourney imagine → upscale workflows), use the async tasks endpoint instead.

Pick an image model#

Image parameters vary by model — gpt-image-2 takes size + quality, Gemini and Flux take aspect_ratio, Midjourney needs a multi-step workflow. The table below lets you filter; the per-model section that follows shows every parameter.

Model IDModelSpecCapabilitiesTop paramsDoc
gpt-image-2
GPT-Image-2
OpenAI native image generation. Strong typography, clean compositions.
1536x1536
promptsizequality
View
gemini-3-pro-image
Gemini 3 Pro Image
Google Imagen variant via Gemini 3 Pro. Strong photo realism.
1408x1408
promptaspect_ration
View
flux-kontext-pro
Flux Kontext Pro
Black Forest Labs flux-kontext: prompt-driven edit & generation with reference images.
2048x2048
promptaspect_ratioprompt_upsampling
View
flux-kontext-max
Flux Kontext Max
Top-tier flux-kontext, higher quality, longer latency.
2048x2048
promptaspect_ratioreference_image_url
View
runway-gen4-image
Runway Gen-4 Image
Runway Gen-4 still-image generation. Up to 3 reference images.
1920x1080
promptaspect_ratioreference_images
View
midjourney-v7
Midjourney v7
Midjourney v7. Multi-step workflow: imagine → upscale / variation / reroll using returned task_id.
2048x2048
promptaspect_ratiostylize
View
seedream-4-0
Seedream 4.0
ByteDance Seedream 4.0 — strong Chinese-language prompts.
4096x4096
promptsizeaspect_ratio
View
qwen-image-edit
Qwen Image Edit
Alibaba Qwen image edit — region-targeted edits.
promptimage_url
View
recraft-v3
Recraft v3
Recraft v3 — vector-art friendly model.
promptstyle
View
9 models

Request body (shared)#

FieldTypeDefaultDescription
modelrequiredstringModel ID, e.g. "gpt-image-2", "gemini-3-pro-image", "midjourney".
promptrequiredstringText prompt. Up to 4000 chars on most models.
nint1Number of images to generate, 1–4.
sizestring"1024x1024"WxH; common values 1024x1024, 1024x1792, 1792x1024.
qualitystring"standard""standard" or "hd" (where supported).
response_formatstring"url""url" or "b64_json".
userstringEnd-user identifier.

Response#

FieldTypeDefaultDescription
createdintUnix timestamp.
dataarray<{url?, b64_json?, revised_prompt?}>One element per image.

Per-model parameters#

Each model exposes its own parameter set. Pass only what the table for that model lists — Orux AI rejects unknown fields with invalid_param so misconfiguration shows up at request time rather than as silently dropped behaviour.

GPT-Image-2gpt-image-2

OpenAI native image generation. Strong typography, clean compositions.

1536x1536
$0.04–$0.17 / image
FieldTypeDefaultDescription
promptrequiredstringText prompt describing the desired output.
sizeenum1024x1024Output WxH.
1024x10241536x10241024x1536auto
qualityenumautoQuality / rendering budget.
lowmediumhighauto
nint (1–4)1Number of images to generate per request.
response_formatenumurlReturn a temporary URL or base64-encoded bytes.
urlb64_json
webhook_urlurlHTTPS endpoint Orux AI will POST a signed event to on terminal status. Optional — fall back to polling.

Gemini 3 Pro Imagegemini-3-pro-image

Google Imagen variant via Gemini 3 Pro. Strong photo realism.

1408x1408
$0.04 / image
FieldTypeDefaultDescription
promptrequiredstringText prompt describing the desired output.
aspect_ratioenum1:1Aspect ratio of the output image.
1:116:99:164:33:421:9
nint (1–4)1Number of images to generate per request.
seedintBest-effort determinism. Same seed + same prompt + same model usually reproduces the output.
webhook_urlurlHTTPS endpoint Orux AI will POST a signed event to on terminal status. Optional — fall back to polling.

Flux Kontext Proflux-kontext-pro

Black Forest Labs flux-kontext: prompt-driven edit & generation with reference images.

2048x2048
$0.04 / image
FieldTypeDefaultDescription
promptrequiredstringText prompt describing the desired output.
aspect_ratioenum1:1Output aspect ratio.
21:916:94:31:13:49:16
prompt_upsamplingbooleanfalseIf true, upstream rewrites the prompt for higher quality.
seedintBest-effort determinism. Same seed + same prompt + same model usually reproduces the output.
reference_image_urlurlOptional reference image to condition on.
webhook_urlurlHTTPS endpoint Orux AI will POST a signed event to on terminal status. Optional — fall back to polling.

Flux Kontext Maxflux-kontext-max

Top-tier flux-kontext, higher quality, longer latency.

2048x2048
FieldTypeDefaultDescription
promptrequiredstringText prompt describing the desired output.
aspect_ratioenum1:1Output aspect ratio.
21:916:94:31:13:49:16
reference_image_urlurlOptional reference image.
seedintBest-effort determinism. Same seed + same prompt + same model usually reproduces the output.
webhook_urlurlHTTPS endpoint Orux AI will POST a signed event to on terminal status. Optional — fall back to polling.

Runway Gen-4 Imagerunway-gen4-image

Runway Gen-4 still-image generation. Up to 3 reference images.

1920x1080
FieldTypeDefaultDescription
promptrequiredstringText prompt describing the desired output.
aspect_ratioenum16:9Output ratio.
16:99:161:14:33:4
reference_imagesarrayUp to 3 reference image URLs.
seedintBest-effort determinism. Same seed + same prompt + same model usually reproduces the output.
webhook_urlurlHTTPS endpoint Orux AI will POST a signed event to on terminal status. Optional — fall back to polling.

Midjourney v7midjourney-v7

Midjourney v7. Multi-step workflow: imagine → upscale / variation / reroll using returned task_id.

2048x2048
async task
  • imagine returns a 4-image grid + a task_id. To get a full-resolution single image, send a follow-up upscale request referencing the original task_id and the index (1–4).
FieldTypeDefaultDescription
promptrequiredstringText prompt describing the desired output.
aspect_ratiostringArbitrary a:b string, e.g. "16:9", "2:3", "7:4".
stylizeint (0–1000)100Artistic styling strength.
weirdint (0–3000)0Unconventional composition strength.
chaosint (0–100)0Variance between the four grid images.
tilebooleanfalseTileable seamless image (for textures).
webhook_urlurlHTTPS endpoint Orux AI will POST a signed event to on terminal status. Optional — fall back to polling.

Seedream 4.0seedream-4-0

ByteDance Seedream 4.0 — strong Chinese-language prompts.

4096x4096
FieldTypeDefaultDescription
promptrequiredstringText prompt describing the desired output.
sizeenum2KOutput resolution tier.
1K2K4K
aspect_ratioenum1:1Aspect ratio.
1:116:99:164:33:4
watermarkbooleanfalseWhether the upstream stamps a watermark.
webhook_urlurlHTTPS endpoint Orux AI will POST a signed event to on terminal status. Optional — fall back to polling.

Qwen Image Editqwen-image-edit

Alibaba Qwen image edit — region-targeted edits.

FieldTypeDefaultDescription
promptrequiredstringText prompt describing the desired output.
image_urlrequiredurlSource image to edit.
webhook_urlurlHTTPS endpoint Orux AI will POST a signed event to on terminal status. Optional — fall back to polling.

Recraft v3recraft-v3

Recraft v3 — vector-art friendly model.

FieldTypeDefaultDescription
promptrequiredstringText prompt describing the desired output.
stylestringRecraft style id, e.g. "digital_illustration", "vector_illustration".
webhook_urlurlHTTPS endpoint Orux AI will POST a signed event to on terminal status. Optional — fall back to polling.

Midjourney workflow: imagine → upscale / variation / reroll#

Midjourney is a multi-step queue. imagine returns a 4-image grid and a task_id; to obtain a single high-resolution image you must send a follow-up request with action=upscale (or variation, reroll) referencing the original task_id and an index (1–4).

┌──────────────────┐
│  POST imagine    │  → task_id A,  4-image grid (low-res)
└────────┬─────────┘
         │
         ├─→ POST { action: "upscale",   parent_task_id: A, index: 2 }  → high-res single image
         ├─→ POST { action: "variation", parent_task_id: A, index: 1 }  → new 4-image grid
         └─→ POST { action: "reroll",    parent_task_id: A }            → re-run same prompt
parent_task_id is the glue
Once imagine succeeds, any follow-up sub-action passes the original task_id as parent_task_id. The same pattern recurs in Suno (audio) and the kling pose-driven flows.

Reference images#

Several models (flux-kontext-pro/max, runway-gen4-image, midjourney-v7) accept a reference_image_url (or reference_images array). Pass an https URL to a publicly accessible JPG/PNG/WEBP. For Midjourney, the upscale / variation actions implicitly reference the parent task_id — no URL needed.

Examples#

Generate an image

curl
curl https://orux.top/api/v1/images/generations \
  -H "Authorization: Bearer $ORUX_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "gpt-image-2",
    "prompt": "A cinematic shot of a fox in a neon-lit alley, rain",
    "size": "1024x1024",
    "n": 1,
    "response_format": "url"
  }'

gpt-image-2 with explicit size and quality

curl
curl https://orux.top/api/v1/images/generations \
  -H "Authorization: Bearer $ORUX_API_KEY" \
  -d '{
    "model":"gpt-image-2",
    "prompt":"Cinematic neon-lit Tokyo alley in the rain",
    "size":"1536x1024",
    "quality":"high",
    "n":1
  }'

Flux Kontext Pro with reference image

curl
curl https://orux.top/api/v1/images/generations \
  -H "Authorization: Bearer $ORUX_API_KEY" \
  -d '{
    "model":"flux-kontext-pro",
    "prompt":"a photo of the subject riding a bicycle, golden hour",
    "aspect_ratio":"3:4",
    "reference_image_url":"https://example.com/subject.jpg",
    "prompt_upsampling": true,
    "seed": 42
  }'