OpenAI Image Gpt Image 2 Edit API
Reference-image editing with gpt-image-2.
Data from OpenAI.
Category: Media Generation
Price
Variable: provider price plus 35%
Inspect returns pricing metadata, not a quote. Use max_cost_usd caps where supported.
Operation specification
| Property | Value |
|---|---|
| Public tool ID | openai/image-gpt-image-2-edit |
| Direct REST endpoint | POST https://keepbal.com/apis/v1/openai/image-gpt-image-2-edit |
| Envelope REST endpoint | POST https://keepbal.com/apis/v1/run (publicId: "openai/image-gpt-image-2-edit") |
| MCP meta-tool | run_tool (tool: "openai/image-gpt-image-2-edit" at https://keepbal.com/mcp) |
| Required path parameters | None |
| Known input fields | Inspect via POST /apis/v1/inspect ($0) |
| Failed or timed-out call fee | $0.00 |
Input schema is not available in the local snapshot. Call inspect first; fill body and queryParams as required and replace any pathParams placeholders before running.
Discover
curl https://keepbal.com/apis/v1/discover -H 'Authorization: Bearer YOUR_KEEPBAL_KEY' -H 'Content-Type: application/json' -d '{"query":"OpenAI"}'Inspect
curl https://keepbal.com/apis/v1/inspect -H 'Authorization: Bearer YOUR_KEEPBAL_KEY' -H 'Content-Type: application/json' -d '{"publicId":"openai/image-gpt-image-2-edit"}'curl
curl https://keepbal.com/apis/v1/openai/image-gpt-image-2-edit \
-H 'Authorization: Bearer YOUR_KEEPBAL_KEY' \
-H 'Content-Type: application/json' \
-d '{}'MCP run_tool
{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "run_tool",
"arguments": {
"tool": "openai/image-gpt-image-2-edit",
"input": {}
}
}
}Python
import json, os, requests
# Inspect first and replace input_data with the required parameters.
input_data = json.loads("{}")
response = requests.post(
"https://keepbal.com/apis/v1/openai/image-gpt-image-2-edit",
headers={"Authorization": "Bearer " + os.environ["KEEPBAL_API_KEY"]},
json=input_data,
)
response.raise_for_status()
print(response.json())JavaScript (fetch)
const inputData = JSON.parse("{}");
const response = await fetch("https://keepbal.com/apis/v1/openai/image-gpt-image-2-edit", {
method: "POST",
headers: {
"Authorization": "Bearer " + process.env.KEEPBAL_API_KEY,
"Content-Type": "application/json",
},
body: JSON.stringify(inputData),
});
if (!response.ok) throw new Error("HTTP " + response.status);
console.log(await response.json());Errors and billing
Failed provider calls are not charged. HTTP 400 invalid_request means invalid JSON or parameters, including missing pathParams. HTTP 401 missing_api_key or invalid_api_key means authentication is required. HTTP 402 insufficient_credits means insufficient balance; top up before retrying. HTTP 503 provider_unavailable means the provider is unavailable. A pending run can settle later; poll GET /apis/v1/runs/{id} instead of starting another execution.
Frequently asked questions
How much does the OpenAI Image Gpt Image 2 Edit API cost?
Variable: provider price plus 35% Unsuccessful or timed-out upstream calls charge $0.
How do I call openai/image-gpt-image-2-edit from Python, JavaScript, or MCP?
Send POST https://keepbal.com/apis/v1/openai/image-gpt-image-2-edit with Authorization: Bearer YOUR_KEEPBAL_KEY, or call MCP run_tool with tool "openai/image-gpt-image-2-edit" at https://keepbal.com/mcp.
What parameters does openai/image-gpt-image-2-edit require?
Call POST /apis/v1/inspect with {"publicId":"openai/image-gpt-image-2-edit"} at $0 to check inputs before running.
Do I need a separate OpenAI subscription?
No. One KeepBal API key and one prepaid balance cover this operation with no monthly subscription. OpenAI describes the data source and does not imply vendor affiliation.
Related tools
| Tool | What it returns | Price |
|---|---|---|
| OpenAI Image Gpt Image 2 | Image Gpt Image 2 through KeepBal. Data from OpenAI. Category: Media Generation. Pricing: variable. Public operation: openai/image-gpt-image-2. Inspect this operation for required inputs before running. | Variable: provider price plus 35% |
| OpenAI Image Gpt Image 2 5 Flare | Image Gpt Image 2 5 Flare through KeepBal. Data from OpenAI. Category: Media Generation. Pricing: variable. Public operation: openai/image-gpt-image-2-5-flare. Inspect this operation for required inputs before running. | Variable: provider price plus 35% |
| OpenAI Image Gpt Image 2 5 Flare Edit | Reference-image editing with gpt-image-2.5-flare. | Variable: provider price plus 35% |
| OpenAI Image Gpt Image 2 5 Sunburst | Text-to-image with gpt-image-2.5-sunburst. | Variable: provider price plus 35% |
| OpenAI Image Gpt Image 2 5 Sunburst Edit | Reference-image editing with gpt-image-2.5-sunburst. | Variable: provider price plus 35% |
| Alibaba Image Qwen Image 3 0 | Text-to-image and image editing with Qwen-Image 3.0. | Variable: provider price plus 35% |