ReplicateImage GenerationAI generation

openai/gpt-image-2

replicate.image-gen.gpt-image-2

Generate or edit images with GPT Image 2 through Replicate's official model, priced per image by quality.

Price
$0.513/successAt provider cost
Success rate
100%Last 30 days · 602 calls
Latency p50
180 msp95 390 ms
Last verified
Sep 14, 2026Verified working
POSThttps://toolswitch.dev/v1/tools/replicate.image-gen.gpt-image-2Preview
  • Uses platform quota
  • Asynchronous response
  • Reads public data

Parameters

This tool has no parameters. See provider docs ↗ Provider docs

Code samples

Replace $TOOLSWITCH_KEY with the key you created in the console.

Preview
curl -X POST 'https://toolswitch.dev/v1/tools/replicate.image-gen.gpt-image-2' \
  -H "X-Toolswitch-Key: $TOOLSWITCH_KEY" \
  -H "Content-Type: application/json" \
  --data-raw '{"input":{"prompt":"A clean editorial illustration of a paper airplane.","quality":"low","aspect_ratio":"1:1","output_format":"webp","number_of_images":1}}'

This gateway API is in preview; its URL and authentication may change. The example parameters are sample data. Calls are billed at $0.513/success, including the service fee.