Back to API Platform
GPT Image 2 Edit API
OpenAI GPT Image 2 image editing — supply 1-8 reference images plus an edit instruction. Optional mask for inpainting. 4K-capable; pricing varies by quality + size. Integrate this model via REST with endpoint docs, parameters, and code examples.
Image Generation
Img2Img
Editing
Credit Cost
5 credits
Type
image
Get API Key
Create auth keys for apps and agents
See Usage
Track requests, credits, and logs
Buy Credits
Top up prepaid API capacity
API Endpoint
POST
/api/v1/models/gpt-image-2-edit/runLLM.txt
AI-Ready
For AI assistants
Copy this model's documentation into Claude, GPT, or any AI for instant integration help.
/llm/gpt-image-2-edit.txtOpenAPI Spec
Swagger compatible
Import into Postman, Swagger UI, or generate client SDKs in any language.
/api/openapiParameters
Input parameters accepted by this model
| Parameter | Type | Default |
|---|---|---|
promptrequired | string | - |
image_urlsrequired | array | - |
mask_url | url | - |
image_size | enum | auto |
quality | enum | high |
num_images | integer | 1 |
output_format | enum | png |
See also
Related endpoints on this model — you may need a different apiId for a different operation (e.g. image edit vs generation).
- Generate/api/v1/models/gpt-image-2/run
Code Examples
Copy and paste to get started
bash
curl -X POST "https://pixeldojo.ai/api/v1/models/gpt-image-2-edit/run" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"prompt": "A beautiful mountain landscape at golden hour",
"aspect_ratio": "1:1"
}'Response Format
Submit Response (202 Accepted)
json
{
"jobId": "job_abc123...",
"status": "pending",
"statusUrl": "https://pixeldojo.ai/api/v1/jobs/job_abc123...",
"creditCost": 5,
"creditsRemaining": 95,
"expiresAt": "2025-01-23T12:00:00Z"
}Completed Response
json
{
"jobId": "job_abc123...",
"status": "completed",
"output": {
"images": [
"https://temp.pixeldojo.ai/pixeldojotemp/1705930123-456789.png"
]
},
"creditCost": 5,
"expiresAt": "2025-01-23T12:00:00Z"
}