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.
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
/api/v1/models/gpt-image-2-edit/runLLM.txt
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 | string | - |
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
Example Outputs
Real outputs generated by this model
her hair is blue
Code Examples
Copy and paste to get started
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)
{
"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
{
"jobId": "job_abc123...",
"status": "completed",
"output": {
"images": [
"https://temp.pixeldojo.ai/pixeldojotemp/1705930123-456789.png"
]
},
"creditCost": 5,
"expiresAt": "2025-01-23T12:00:00Z"
}