PixMind Docs
API ReferenceImage ModelsGPT Image 2

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

OpenAI

Model ID

gpt-image-2

Endpoint

POST /api-platform/v1/generations

Model notes

  • Both quality and size participate in pricing.

Request parameters

ParameterTypeRequiredDescription
modelstringYes

Stable PixMind model ID. Use `gpt-image-2`.

Allowed values: gpt-image-2

promptstringYes

Natural-language generation or editing instructions.

qualitystringNo

Generation quality tier.

Allowed values: low, medium, high

Default: medium

resolutionstringNo

Output resolution tier. This field affects request pricing.

Allowed values: 1K, 2K, 4K

Default: 2K

aspectRatiostringNo

Requested output aspect ratio.

Allowed values: auto, 1:1, 2:3, 3:2, 3:4, 4:3, 4:5, 5:4, 9:16, 16:9, 21:9

Default: auto

referenceImagesstring[] (URI)No

Reference image URLs used for editing, composition, subject, or style guidance.

Request example

cURL
curl https://aihub-admin.aimix.pro/api-platform/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",
  "resolution": "2K",
  "aspectRatio": "1:1",
  "referenceImages": [
    "https://example.com/package.png"
  ]
}'
JavaScript
const response = await fetch("https://aihub-admin.aimix.pro/api-platform/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",
  "resolution": "2K",
  "aspectRatio": "1:1",
  "referenceImages": [
    "https://example.com/package.png"
  ]
})
});

const task = await response.json();

Accepted task response

Generation is asynchronous. Save taskId and poll GET /api-platform/v1/tasks/{taskId} until status is ready or failed.

200 OK
{
  "code": 1000,
  "data": {
    "id": "img_44160",
    "taskId": 44160,
    "type": "image",
    "model": "gpt-image-2",
    "status": "processing"
  }
}

API pricing

ConfigurationPrice
Low · 1K / 2K / 4K$0.050 / $0.060 / $0.090
Medium · 1K / 2K / 4K$0.070 / $0.130 / $0.260
High · 1K / 2K / 4K$0.260 / $0.430 / $0.510

API pricing uses the apiPlatform role and is separate from PixMind Studio credits. The accepted task response is the final pricing snapshot.