Skip to main content
POST
/
v1
/
images
/
generate
curl --request POST \ --url https://openapi.imini.ai/imini/router/v1/images/generate \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data ' { "model": "openai/gpt-image-2", "prompt": "A cute shiba inu in a spacesuit standing on the moon, 3D cartoon style", "aspect_ratio": "1:1", "resolution": "1K", "quality": "medium" } '
{
  "task_id": "task_2041350318103396352",
  "model": "openai/gpt-image-2",
  "created_at": "2026-04-23T03:00:17.062Z",
  "request_id": "285f20ce-8158-401b-945c-7bc6a7ef6ead"
}

Documentation Index

Fetch the complete documentation index at: https://docs.imini.ai/llms.txt

Use this file to discover all available pages before exploring further.

Authorizations

Authorization
string
header
required

Pass Authorization: Bearer <YOUR_API_KEY> in the request header. Go to the API Keys management page to create and manage API Keys.

Body

application/json
model
string
required

Fixed value openai/gpt-image-2.

prompt
string
required

The prompt. Up to 32000 characters. Supports English and Chinese; detail-rich descriptions yield better results.

Example:

"A majestic snow-capped mountain at golden hour, ultra-realistic photography"

resolution
enum<string>
required

Output resolution tier (required): 1K / 2K / 4K.

Available options:
1K,
2K,
4K
aspect_ratio
enum<string>
required

Output aspect ratio (required). Allowed values:

1:1 2:3 3:2 3:4 4:3 4:5 5:4 9:16 16:9 21:9 9:21

Available options:
1:1,
2:3,
3:2,
3:4,
4:3,
4:5,
5:4,
9:16,
16:9,
21:9,
9:21
quality
enum<string>
required

Rendering quality (required):

  • low — fastest and cheapest, for drafts and batch generation

  • medium — balanced

  • high — most detailed, for finals and cover art

Quality is orthogonal to resolution: within a given resolution, quality only changes visual detail and cost, not the output dimensions.

Available options:
low,
medium,
high
images
object[]

Reference image list. Omitting or passing an empty array means text-to-image mode; passing images switches to image-to-image / style reference mode. Up to 3 images.

Maximum array length: 3
num
integer
default:1

Number of images to generate per call, 1-10.

Required range: 1 <= x <= 10

Response

Submitted successfully

task_id
string

Unique task ID, used for subsequent polling

Example:

"task_2041350318103396352"

model
string

The model ID used for this task

Example:

"openai/gpt-image-2"

created_at
string

Task creation time

Example:

"2026-04-23T03:00:17.062Z"

request_id
string

Unique request ID

Example:

"285f20ce-8158-401b-945c-7bc6a7ef6ead"