
OpenAI · Image
GPT Image 2
High-fidelity image creation and editing through natural language.
EditingTextFidelity
openai/gpt-image-2/text-to-imageStarting at$0.08 / imageSaved models stay in this browser.
Try it now
$0.08 / imagePlayground
97 / 1000
Reference imageOptional
Estimated cost ~0.080 credits$0.0800 USD
Your result will appear hereConfigure a model, then generate it.
Current API contract
Use an organization API key.
Create a key in the studio, then send it as a Bearer token. API usage and credits remain scoped to that key’s organization.
Keys are shown once and API requests are rate limited per key.
const response = await fetch("/api/predictions", {
method: "POST",
headers: {
"Authorization": "Bearer omk_your_api_key",
"Content-Type": "application/json",
"Idempotency-Key": crypto.randomUUID()
},
body: JSON.stringify({
model: "openai/gpt-image-2/text-to-image",
input: {
"prompt": "Surreal floating architecture above a calm reflective sea, soft dusk light, cinematic composition",
"aspect_ratio": "1:1"
}
})
});
const { data, error } = await response.json();- Submit
POST /api/predictionswith an 8–200 characterIdempotency-Key.- Poll
GET /api/predictions/{id}until the returned status is terminal.- Response
- Success returns
{ data: prediction }; failures return{ error: message }.
Model overview
Text to image
High-fidelity image creation and editing through natural language.
EditingTextFidelity
- ProviderOpenAI
- InputsPrompt, Reference image, Aspect ratio
- OutputImage
- Price$0.08 / image
Keep exploring



