# OpenAI: GPT Image 2

Provider: reAPI
Final price: $0.081/success
Success rate: 100%

Generate or edit one image with GPT Image 2 at a flat per-resolution price.

## Parameters

- size (string, optional)
- model (string, required)
- prompt (string, required)
- image_urls (array, optional)
- resolution (string, optional)

## Example

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

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