Images
POST /api/v1/images/generations — generate images synchronously.
/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 ID | Model | Spec | Capabilities | Top params | Doc |
|---|---|---|---|---|---|
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 → |
Request body (shared)#
| Field | Type | Default | Description |
|---|---|---|---|
modelrequired | string | — | Model ID, e.g. "gpt-image-2", "gemini-3-pro-image", "midjourney". |
promptrequired | string | — | Text prompt. Up to 4000 chars on most models. |
n | int | 1 | Number of images to generate, 1–4. |
size | string | "1024x1024" | WxH; common values 1024x1024, 1024x1792, 1792x1024. |
quality | string | "standard" | "standard" or "hd" (where supported). |
response_format | string | "url" | "url" or "b64_json". |
user | string | — | End-user identifier. |
Response#
| Field | Type | Default | Description |
|---|---|---|---|
created | int | — | Unix timestamp. |
data | array<{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.
| Field | Type | Default | Description |
|---|---|---|---|
promptrequired | string | — | Text prompt describing the desired output. |
size | enum | 1024x1024 | Output WxH.1024x10241536x10241024x1536auto |
quality | enum | auto | Quality / rendering budget.lowmediumhighauto |
n | int (1–4) | 1 | Number of images to generate per request. |
response_format | enum | url | Return a temporary URL or base64-encoded bytes.urlb64_json |
webhook_url | url | — | HTTPS 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.
| Field | Type | Default | Description |
|---|---|---|---|
promptrequired | string | — | Text prompt describing the desired output. |
aspect_ratio | enum | 1:1 | Aspect ratio of the output image.1:116:99:164:33:421:9 |
n | int (1–4) | 1 | Number of images to generate per request. |
seed | int | — | Best-effort determinism. Same seed + same prompt + same model usually reproduces the output. |
webhook_url | url | — | HTTPS 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.
| Field | Type | Default | Description |
|---|---|---|---|
promptrequired | string | — | Text prompt describing the desired output. |
aspect_ratio | enum | 1:1 | Output aspect ratio.21:916:94:31:13:49:16 |
prompt_upsampling | boolean | false | If true, upstream rewrites the prompt for higher quality. |
seed | int | — | Best-effort determinism. Same seed + same prompt + same model usually reproduces the output. |
reference_image_url | url | — | Optional reference image to condition on. |
webhook_url | url | — | HTTPS 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.
| Field | Type | Default | Description |
|---|---|---|---|
promptrequired | string | — | Text prompt describing the desired output. |
aspect_ratio | enum | 1:1 | Output aspect ratio.21:916:94:31:13:49:16 |
reference_image_url | url | — | Optional reference image. |
seed | int | — | Best-effort determinism. Same seed + same prompt + same model usually reproduces the output. |
webhook_url | url | — | HTTPS 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.
| Field | Type | Default | Description |
|---|---|---|---|
promptrequired | string | — | Text prompt describing the desired output. |
aspect_ratio | enum | 16:9 | Output ratio.16:99:161:14:33:4 |
reference_images | array | — | Up to 3 reference image URLs. |
seed | int | — | Best-effort determinism. Same seed + same prompt + same model usually reproduces the output. |
webhook_url | url | — | HTTPS 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.
- •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).
| Field | Type | Default | Description |
|---|---|---|---|
promptrequired | string | — | Text prompt describing the desired output. |
aspect_ratio | string | — | Arbitrary a:b string, e.g. "16:9", "2:3", "7:4". |
stylize | int (0–1000) | 100 | Artistic styling strength. |
weird | int (0–3000) | 0 | Unconventional composition strength. |
chaos | int (0–100) | 0 | Variance between the four grid images. |
tile | boolean | false | Tileable seamless image (for textures). |
webhook_url | url | — | HTTPS 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.
| Field | Type | Default | Description |
|---|---|---|---|
promptrequired | string | — | Text prompt describing the desired output. |
size | enum | 2K | Output resolution tier.1K2K4K |
aspect_ratio | enum | 1:1 | Aspect ratio.1:116:99:164:33:4 |
watermark | boolean | false | Whether the upstream stamps a watermark. |
webhook_url | url | — | HTTPS 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.
| Field | Type | Default | Description |
|---|---|---|---|
promptrequired | string | — | Text prompt describing the desired output. |
image_urlrequired | url | — | Source image to edit. |
webhook_url | url | — | HTTPS 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.
| Field | Type | Default | Description |
|---|---|---|---|
promptrequired | string | — | Text prompt describing the desired output. |
style | string | — | Recraft style id, e.g. "digital_illustration", "vector_illustration". |
webhook_url | url | — | HTTPS 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 promptimagine 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 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 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 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
}'