About
OpenAI's precision-focused image model, built for premium visual work, extra fidelity on intricate detail, in exchange for longer generation times.
1. Calling the API
Setup your API Key
To begin using Infron, you first need to create an account and generate your API Key.
Once you have your API key, set it as an environment variable in your runtime environment. This allows your applications to securely access Infron’s API.
export INFRON_KEY="YOUR_API_KEY"
Submit a request
For long-running requests, you can poll for results.
curl https://media.onerouter.pro/v1/images/generations \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "openai/gpt-image-2.5-sunburst/text-to-image",
"prompt": "create a realistic image taken with iphone at these coordinates 41°43′32″N 49°56′49″W 15 April 1912.",
"n": 1,
"size": "auto",
"quality": "auto",
"background": "auto",
"moderation": "low"
}'
Response with queue task id
The response will look like this:
{
"code": 200,
"message": "success",
"data": {
"task_id": "20260910054254377517742WetVRjdp",
"object": "image",
"model": "openai/gpt-image-2.5-sunburst/text-to-image",
"status": "created",
"urls": {
"query": "https://media.onerouter.pro/v1/images/tasks/20260910054254377517742WetVRjdp"
},
"created_at": "2026-09-10 05:42:54.40"
}
}
Fetch request status
You can fetch the status of a request to check if it is completed or still in progress.
curl https://media.onerouter.pro/v1/images/tasks/{task_id} \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json"
# For example
curl https://media.onerouter.pro/v1/images/tasks/20260910054254377517742WetVRjdp \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json"
Response with queue task status query
{
"code": 200,
"message": "success",
"data": {
"task_id": "20260910054254377517742WetVRjdp",
"object": "image",
"model": "openai/gpt-image-2.5-sunburst/text-to-image",
"status": "in_progress",
"fail_reason": "",
"submit_time": 1789018974,
"start_time": 1789018974,
"finish_time": 0,
"outputs": [],
"created_at": "2026-09-10 05:42:54"
}
}
Possible statuses:
- created
- in_progress
- processing
- completed
- failed
created -> in_progress → processing → completed | failed
Poll every 1-2 seconds until status is "completed" or "failed"
Get the result (when status is "completed")
Once the request is completed, you can fetch the result. See the Output Schema for the expected result format.
{
"code": 200,
"message": "success",
"data": {
"task_id": "20260910054254377517742WetVRjdp",
"object": "image",
"model": "openai/gpt-image-2.5-sunburst/text-to-image",
"status": "completed",
"fail_reason": "",
"submit_time": 1789018974,
"start_time": 1789018974,
"finish_time": 1789019012,
"outputs": [
"https://infron.ai/cdn/media/image/generated/official_openai_image_061d8ccf443d4d7fabad7156e76b3efe.png"
],
"usage": {
"completion_tokens": 1544,
"completion_tokens_details": {
"image_tokens": 1544,
"text_tokens": 0
},
"image_count": 1,
"image_quality": "auto",
"prompt_tokens": 39,
"prompt_tokens_details": {
"image_tokens": 0,
"text_tokens": 39
},
"quality": "auto",
"size": "auto",
"total_tokens": 1583,
"web_search": false
},
"cost": {
"total_cost": 0.046515,
"cost_details": {
"prompt_cost": 0,
"completion_cost": 0,
"image_cost": 0.046515,
"video_cost": 0,
"audio_cost": 0,
"native_web_search_cost": 0,
"plugin_web_search_cost": 0,
"tools_cost": 0,
"prompt_cache_read_cost": 0,
"prompt_cache_write_cost": 0,
"prompt_cache_write_5_min": 0,
"prompt_cache_write_1_h": 0,
"reasoning_cost": 0,
"discount_rate": 1,
"is_byok": false,
"byok_cost": 0
}
},
"created_at": "2026-09-10 05:42:54"
}
}
2. Schema
Input
| Parameter | Type | Required | Default | Range | Description |
|---|---|---|---|---|---|
| model | string | Yes | -- | Explore all models | Model name. |
| prompt | string | Yes | -- | -- | Text prompt for generation; Positive text prompt. |
| n | integer | No | 1 | >=1 | Number of images to generate. |
| size | string | No | auto | auto, WIDTHxHEIGHT | auto or WIDTHxHEIGHT; width and height are multiples of 16, each side ≤3840, total pixels 655,360–8,294,400, long side/short side ≤3. |
| quality | string | No | auto | auto, low, medium, high, xhigh, max | Quality for the generated image. Use 'auto' to let the model pick the best quality for the prompt. |
| output_format | string | No | png | png, jpeg, webp | Output format for the images. |
| output_compression | integer | No | 100 | [0,100] | Output compression for the images. Only supported for webp/jpeg formats. Out-of-bounds values are clamped to 0 or 100; an explicit 0 is preserved. Transmission alongside PNG is rejected. |
| background | string | No | auto | auto, opaque, transparent | Transparent backgrounds are only supported with PNG or WebP; transparent + JPEG is not allowed. |
| moderation | string | No | auto | auto, low | You can control moderation strictness with the moderation parameter. |
Example request
curl https://media.onerouter.pro/v1/images/generations \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "openai/gpt-image-2.5-sunburst/text-to-image",
"prompt": "create a realistic image taken with iphone at these coordinates 41°43′32″N 49°56′49″W 15 April 1912.",
"n": 1,
"size": "auto",
"quality": "auto",
"background": "auto",
"moderation": "low"
}'
Output
| Parameter | Type | Range | Description |
|---|---|---|---|
| code | integer | -- | Status code of the request. |
| message | string | -- | Status message of the request. |
| data | object | -- | Data of the task. |
| data.task_id | string | -- | ID of the task. |
| data.object | string | -- | Object type of the task. |
| data.model | string | -- | Model name of the task. |
| data.status | string | created, in_progress, processing, completed, failed | Status of the task. |
| data.fail_reason | string | -- | Fail reason of the task. |
| data.submit_time | integer | -- | Timestamp of the task submission. |
| data.start_time | integer | -- | Timestamp of the task start. |
| data.finish_time | integer | -- | Timestamp of the task finish. |
| data.outputs | array | -- | Outputs of the task. |
| data.created_at | string | -- | Timestamp of the task creation. |
Example output
{
"code": 200,
"message": "success",
"data": {
"task_id": "20260910054254377517742WetVRjdp",
"object": "image",
"model": "openai/gpt-image-2.5-sunburst/text-to-image",
"status": "completed",
"fail_reason": "",
"submit_time": 1789018974,
"start_time": 1789018974,
"finish_time": 1789019012,
"outputs": [
"https://infron.ai/cdn/media/image/generated/official_openai_image_061d8ccf443d4d7fabad7156e76b3efe.png"
],
"usage": {
"completion_tokens": 1544,
"completion_tokens_details": {
"image_tokens": 1544,
"text_tokens": 0
},
"image_count": 1,
"image_quality": "auto",
"prompt_tokens": 39,
"prompt_tokens_details": {
"image_tokens": 0,
"text_tokens": 39
},
"quality": "auto",
"size": "auto",
"total_tokens": 1583,
"web_search": false
},
"cost": {
"total_cost": 0.046515,
"cost_details": {
"prompt_cost": 0,
"completion_cost": 0,
"image_cost": 0.046515,
"video_cost": 0,
"audio_cost": 0,
"native_web_search_cost": 0,
"plugin_web_search_cost": 0,
"tools_cost": 0,
"prompt_cache_read_cost": 0,
"prompt_cache_write_cost": 0,
"prompt_cache_write_5_min": 0,
"prompt_cache_write_1_h": 0,
"reasoning_cost": 0,
"discount_rate": 1,
"is_byok": false,
"byok_cost": 0
}
},
"created_at": "2026-09-10 05:42:54"
}
}
3. Detailed Pricing
| Billing item | USD per 1 million tokens |
|---|---|
| Text input | $5.00 |
| Cached text input | $1.25 |
| Image input | $8.00 |
| Cached image input | $2.00 |
| Image output | $30.00 |
For uncached requests: (text_input_tokens × 5 + image_input_tokens × 8 + image_output_tokens × 30) / 1,000,000 USD, before any account discount. Images of equal size and quality can use different numbers of tokens; this is not a fixed per-image fee. The illustrated usage is billed at $0.022494.
Failed tasks refund their reserved quota. Cached-token discounts remain unverified because repeated live requests did not return cache-hit token details.