Skip to main content
POST
Create image generation
gpt-image-2.5-flare and gpt-image-2.5-sunburst are DimiLinks’ next-generation image models, billed by token ratio. Use async mode (?async=true): creation returns a task_id, then poll with Retrieve image task to fetch the result.

Endpoint

Text-to-image example

Parameters

Billing

Both models are billed by token ratio (input 37.5×, output 2×); the actual cost depends on the image size. Use GET /api/pricing for the live rates.

Next step

In async mode, save the task_id from the response and poll Retrieve image task until completion; sync mode returns image data directly. See Errors for common error codes.

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Query Parameters

async
boolean

Set to true to submit an async image task.

wait_for_result
boolean

Set to false to submit an async image task.

Body

application/json
prompt
string
required
model
string
default:gpt-image-2
n
integer
default:1

1k resolution allows n=1 only; 2k and 4k allow up to 4.

Required range: 1 <= x <= 4
size
string
Examples:

"1:1"

"16:9"

"3840x2160"

resolution
enum<string>
Available options:
1k,
2k,
4k
output_format
string
Examples:

"png"

"jpeg"

"webp"

output_compression
integer
background
string
Examples:

"auto"

"transparent"

"opaque"

moderation
string
Examples:

"auto"

"low"

wait_for_result
boolean
image_urls
mask_url
string
response_format
string
Example:

"b64_json"

user
string

Response

Image generation result or async submission

task_id
string
required
Example:

"task_xxx"

data
object[]
required
Example:
created
integer
Example:

1777080000