Skip to content

Image generation

Synchronous image generation uses the OpenAI-compatible endpoint and is billed by the actual number of images returned.

POST https://gateway.mindproxy.ai/v1/images/generations

Request

bash
curl https://gateway.mindproxy.ai/v1/images/generations \
  -H "Authorization: Bearer $TT_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "gpt-image-1",
    "prompt": "a cyberpunk city at night, neon lights",
    "n": 1,
    "size": "1024x1024"
  }'
FieldDescription
modelImage model public ID
promptImage description
nNumber of images (optional, default 1)
sizeSize, e.g. 1024x1024 (optional)
qualityQuality level (optional)

Response

json
{
  "created": 1710000000,
  "data": [
    { "url": "https://.../a.png" }
  ]
}

Some models return b64_json (base64) instead of url, depending on the model.

Billing

  • The pricing unit is per image (pricing_unit = image).
  • Settled by the actual number of images in the data array, not the request n.
  • Example: request n=2, 2 returned → billed for 2. Per-image price is on the console "Model Prices" page.

Image editing

POST https://gateway.mindproxy.ai/v1/images/edits

OpenAI-compatible image editing; usage follows OpenAI's docs, auth as above.

Async / slow images

Video, Midjourney, and image generation through the async pipeline are not on this page — they use the task API (submit, then poll). See Async tasks.

Gateway: gateway.mindproxy.ai · Built with VitePress