GPT Image 2 Image Generation
Generate and edit images with GPT Image 2 quality and resolution controls.
High-control image generation and editing with independent quality and resolution controls.
Provider
OpenAIModel ID
gpt-image-2Endpoint
POST /v1/generationsModel notes
- Both quality and size participate in pricing.
- Each reference image adds $0.008 to the request.
Request parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
model | string | Yes | Stable PixMind model ID. Use `gpt-image-2`. Allowed values: |
prompt | string | Yes | Natural-language generation or editing instructions. |
quality | string | No | Generation quality tier. Allowed values: Default: |
size | string | No | Output resolution tier. This field affects request pricing. Allowed values: Default: |
aspect_ratio | string | No | Requested output aspect ratio. Allowed values: Default: |
reference_images | string[] (URI) | No | Reference image URLs used for editing, composition, subject, or style guidance. |
callback_url | string (URI) | No | HTTPS endpoint that receives the terminal task event. Polling remains available when omitted. |
Request example
curl https://aihub-admin.aimix.pro/v1/generations \
-H "Authorization: Bearer $PIXMIND_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "gpt-image-2",
"prompt": "Create a premium skincare campaign image and preserve the supplied package design",
"quality": "medium",
"size": "2K",
"aspect_ratio": "1:1",
"reference_images": [
"https://example.com/package.png"
]
}'const response = await fetch("https://aihub-admin.aimix.pro/v1/generations", {
method: "POST",
headers: {
"Authorization": `Bearer ${process.env.PIXMIND_API_KEY}`,
"Content-Type": "application/json"
},
body: JSON.stringify({
"model": "gpt-image-2",
"prompt": "Create a premium skincare campaign image and preserve the supplied package design",
"quality": "medium",
"size": "2K",
"aspect_ratio": "1:1",
"reference_images": [
"https://example.com/package.png"
]
})
});
const task = await response.json();Accepted task response
Generation is asynchronous. Save the id from the response and poll GET /v1/generations/{id} until it reaches a terminal status.
{
"id": "img_01JXYZ...",
"model": "gpt-image-2",
"status": "processing"
}API pricing
| Configuration | Price |
|---|---|
| Low · 1K / 2K / 4K | $0.040 / $0.056 / $0.080 |
| Medium · 1K / 2K / 4K | $0.064 / $0.120 / $0.240 |
| High · 1K / 2K / 4K | $0.240 / $0.400 / $0.480 |
| Reference image surcharge | $0.008 / image |
API pricing uses the apiPlatform role and is separate from PixMind Studio credits. The accepted task response is the final pricing snapshot.