# OpenAI: GPT Image 2

Provider: PiAPI
Final price: $0.169/success
Success rate: 99.9%

Generate images with GPT Image 2 (medium quality only) through PiAPI's OpenAI-shaped async route.

## Example

```curl
curl -X POST 'https://toolswitch.dev/v1/tools/piapi.image-gen.gpt-image-2' \
  -H "X-Toolswitch-Key: $TOOLSWITCH_KEY" \
  -H "Content-Type: application/json" \
  --data-raw '{"n":1,"size":"1024x1024","model":"gpt-image-2","prompt":"A clean editorial illustration of a paper airplane.","quality":"medium"}'
```

[View on Toolswitch](https://toolswitch.dev/zh/tools/piapi.image-gen.gpt-image-2)
