Generate, edit, and iterate on high-quality AI images with OmniDino.
Use the OmniDino Image Playground or OpenAI-compatible Images API for text-to-image generation, reference-image editing, mask-based changes, size control, and automated workflows.
What is GPT Image 2?
GPT Image 2 accepts text and image inputs and returns images for high-quality generation and editing.
It is an image model, not a standard chat model.
Use /v1/images/generations to create images and /v1/images/edits to edit them. Do not send these requests to the standard Chat Completions endpoint.
Start generating without writing code.
OmniDino Image Playground
Enter your OmniDino API Key in the browser, select a model, upload reference images, edit masks, and save generation history. The workspace is available at image.omnidino.com.
POST /v1/images/generations
Bearer YOUR_OMNIDINO_API_KEYapplication/jsoncurl https://api.omnidino.com/v1/images/generations \
-H "Authorization: Bearer YOUR_OMNIDINO_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "gpt-image-2",
"prompt": "An orange cat in a transparent raincoat standing on a neon-lit street at night, cinematic composition",
"size": "1024x1024",
"quality": "high",
"output_format": "png"
}'
Start with the minimum request, then add options one at a time.
prompt
Required. Describe the subject, scene, lighting, camera, composition, materials, and style.
model
Explicitly use the exact model name shown in the OmniDino model catalog.
size
Set the image dimensions and aspect ratio.
quality
Higher quality usually requires more time and costs more.
output_format
Set the encoding format of the returned image.
background
Control the background mode. Final support depends on the upstream provider and gateway passthrough.
output_compression
JPEG or WebP compression level, usually from 0 to 100.
n
The number of images requested. A channel may enforce a lower limit.
moderation
Set moderation strength where supported by the current upstream provider.
model, prompt, and size. Add other parameters one at a time after the request succeeds.Python and Node.js
import base64
import os
import requests
response = requests.post(
"https://api.omnidino.com/v1/images/generations",
headers={
"Authorization": f"Bearer {os.environ['OMNIDINO_API_KEY']}",
"Content-Type": "application/json",
},
json={
"model": "gpt-image-2",
"prompt": "A futuristic solar-powered city in soft morning light, realistic architectural photography",
"size": "1536x1024",
"quality": "high",
"output_format": "png",
},
timeout=300,
)
response.raise_for_status()
payload = response.json()
with open("omnidino-image.png", "wb") as file:
file.write(base64.b64decode(payload["data"][0]["b64_json"]))
import { writeFile } from "node:fs/promises";
const response = await fetch(
"https://api.omnidino.com/v1/images/generations",
{
method: "POST",
headers: {
Authorization: `Bearer ${process.env.OMNIDINO_API_KEY}`,
"Content-Type": "application/json",
},
body: JSON.stringify({
model: "gpt-image-2",
prompt: "A futuristic solar-powered city in soft morning light, realistic architectural photography",
size: "1536x1024",
quality: "high",
output_format: "png",
}),
}
);
if (!response.ok) {
throw new Error(`${response.status}: ${await response.text()}`);
}
const payload = await response.json();
await writeFile(
"omnidino-image.png",
Buffer.from(payload.data[0].b64_json, "base64")
);
POST /v1/images/edits
The editing endpoint uses multipart/form-data to upload reference images, an optional mask, and a text prompt.
curl https://api.omnidino.com/v1/images/edits \
-H "Authorization: Bearer YOUR_OMNIDINO_API_KEY" \
-F "model=gpt-image-2" \
-F "image[]=@./input.png" \
-F "mask=@./mask.png" \
-F "prompt=Keep the subject's pose and replace the background with a neon-lit street on a rainy night" \
-F "size=1024x1024" \
-F "quality=high" \
-F "input_fidelity=high" \
-F "output_format=png" \
-F "n=1"
Choose the entry point that fits your workflow.
Image Playground
Images API
Image data is usually returned in b64_json.
{
"created": 1711111111,
"data": [
{
"b64_json": "iVBORw0KGgoAAAANSUhEUgAA..."
}
]
}
Start troubleshooting with authentication, paths, models, and parameters.
Ready to generate your first image?
Open OmniDino Image Playground, paste your API Key, select gpt-image-2, and begin with a clear, specific prompt.