Skip to main content
Vendor: OpenAI Model ID: gpt-image-2 Capability: 1024² – 4096² · photorealism · prompt-following · text-in-image Pricing: per image, photoreal tier (live rate) GPT-Image 2 is OpenAI’s photoreal generator. The thing that distinguishes it from Nano Banana is prompt following — when your brief reads “the kettle on the LEFT, mug on the RIGHT, steam rising from both”, GPT-Image 2 respects spatial relationships better than most photoreal alternatives. For pure material fidelity, Nano Banana Pro and 2 still have an edge; for instruction adherence, this is usually the right call.

Request

curl https://llm.bytespike.ai/v1/images/generations \
  -H "Authorization: Bearer $BYTESPIKE_API_KEY" \
  -H "content-type: application/json" \
  -d '{
    "model": "gpt-image-2",
    "prompt": "A kettle on the left and a mug on the right, both steaming, on a marble counter",
    "size": "1024x1024",
    "quality": "high"
  }'

Body parameters

FieldTypeRequiredDefaultNotes
modelstringyesgpt-image-2
promptstringyesEnglish-tuned.
sizestringno1024x1024Supported: 1024x1024, 1024x1536, 1536x1024, 2048x2048, 4096x4096.
nintegerno11–4 images.
qualitystringno"medium""low" / "medium" / "high" / "auto".
stylestringno"natural""natural" / "vivid".
output_formatstringno"png""png" / "webp" / "jpeg".
output_compressionintegerno0–100, only for webp / jpeg.

Response

{
  "created": 1715174400,
  "data": [
    {
      "url": "https://cdn.bytespike.ai/img/...",
      "revised_prompt": "..."
    }
  ]
}
URLs pre-signed, 24h expiry.

Code examples

curl https://llm.bytespike.ai/v1/images/generations \
  -H "Authorization: Bearer $BYTESPIKE_API_KEY" \
  -H "content-type: application/json" \
  -d '{"model": "gpt-image-2", "prompt": "Kettle and mug...", "quality": "high"}'

Errors

CodeTriggerBilled?
400 / 401 / 402 / 403StandardNo
451Prompt blocked by upstream safetyNo
5xxUpstream issueNo (auto-retry)

When to use

  • Prompts that specify spatial relationships, counts, or composition.
  • Briefs that mix text descriptions with explicit constraints.
  • For more material / lighting fidelity, see Nano Banana 2 or Nano Banana Pro.
  • For the compliance-tier variant, see GPT-Image 2 Official.
  • For aesthetic / illustration, see Seedream V4.5.

Limits

LimitValue
Max output resolution4096×4096
Max images per call (n)4
Supports init image (img2img)No
Supports quality modifierYes
Supports style modifierYes
Sync?Yes (≤30s typical, longer at high quality)
Avg latency for 1024² high12-18s