Compare the recorded score and API price.
GPT Image 2
OpenAIUpload an image as multipart data and describe the edits. The response contains PNG image data.
Choose your workload
Models for revising existing images with clear creative instructions.
Compare the recorded score and API price.
Upload an image as multipart data and describe the edits. The response contains PNG image data.
Prices apply to the stated model settings. Token input rates cover uncached input; output tokens are priced separately. Cache usage and image or video settings can change the charge.
Input formats, model capabilities and prices.
| Reference | GPT Image 2Available candidate |
|---|---|
| Input → output | text, image → image |
| Price for these settings | Contact Roten for editing pricing. |
| Reference Arena score | 1462 |
| Billing details | Image generation uses the stated size and quality. Contact Roten for image-editing pricing. |
Implementation
Copy an available model request, replace the API key with your own, and run.
API model ID: gpt-image-2
Image generation and multipart image editing, with PNG output.
Upload an image as multipart data and describe the edits. The response contains PNG image data.
Copy the Python or cURL test for GPT Image 2. Replace the API-key placeholder with your own key and run.
GPT Image 2 · image editing · Downloads a sample PNG from Roten and submits it for editing.
import requests
image = requests.get("https://roten-ai.com/examples/sample.png", timeout=30)
image.raise_for_status()
response = requests.post(
url="https://api.roten-ai.com/v1/images/edits",
headers={
"Authorization": "Bearer YOUR_ROTEN_API_KEY",
},
data={
"model": "gpt-image-2",
"prompt": "Change the background of this abstract image to midnight navy while keeping the shapes in place.",
"size": "1024x1024",
"n": "1"
},
files={"image": ("sample.png", image.content, "image/png")},
timeout=180,
)
print(response.json())
response.raise_for_status()curl --fail-with-body 'https://roten-ai.com/examples/sample.png' -o roten-sample.png && \
curl --fail-with-body 'https://api.roten-ai.com/v1/images/edits' \
-H 'Authorization: Bearer YOUR_ROTEN_API_KEY' \
-F 'model=gpt-image-2' \
-F 'prompt=Change the background of this abstract image to midnight navy while keeping the shapes in place.' \
-F 'size=1024x1024' \
-F 'n=1' \
-F '[email protected];type=image/png'Python requires requests: install once with python3 -m pip install requests. cURL examples run directly in your terminal.
Evidence and limits
Reference Arena scores, API tests and billing rates describe different aspects of each candidate.
Built for production
Talk to us about volume pricing, model selection and migration.