BLACK FRIDAYUntil Dec 8 (Tue) 23:59 JSTUntil Dec 8

OpenAI

GPT Image 2 (Medium)

gpt-image-2-mediumAvailable

OpenAI's GPT Image 2 at Medium quality. Creates 1K images from text. Each quality level is a separate model (gpt-image-2-low, -medium, -high).

Released
Apr 21, 2026

Price per image (Echo's price, Basic members)

Prices by size
UnitEcho's priceOfficial price (USD, excl. tax)
1 image$0.0567≈ ¥9.1$0.053

How to call

POST/v1/images/generations

curl -o response.json https://token.echohub.io/v1/images/generations \
  -H "Authorization: Bearer $ECHO_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "gpt-image-2-medium",
    "prompt": "A Shiba Inu walking on the beach at dusk",
    "n": 1,
    "size": "1024x1024",
    "quality": "medium"
  }'

# Save the image as image.png (works for both b64_json and url; if the request failed, response.json holds the error)
python3 -c "import json, base64, urllib.request; d = json.load(open('response.json'))['data'][0]; open('image.png', 'wb').write(base64.b64decode(d['b64_json'])) if d.get('b64_json') else urllib.request.urlretrieve(d['url'], 'image.png')"
  • Always set quality to medium (leaving it out, or a quality that differs from the model name, returns HTTP 400)
  • size must be 1024x1024, 1536x1024 or 1024x1536
  • n must be 1
  • By default the image comes back as b64_json. Set "response_format": "url" to get the image URL (url) instead
  • stream, partial_images, input_fidelity and image editing (/v1/images/edits) cannot be used