gpt-image-2 is OpenAI’s GPT Image 2 model for fast, high-quality image generation and editing: flexible image sizes (any resolution within the size constraints, up to 4K), input images always processed at high fidelity, and more reliable layout, text rendering (including multilingual text) and instruction following. It suits product shots, posters and concept art, and works with the official OpenAI SDKs.
Setup
Endpoints
Parameters
Official parameters not supported yet
They return 400; the model is not called and nothing is charged.Pricing
Billed at the model price shown in the console. Invalid requests and failed generations are not charged. The same model is also available on a cheaper per-request Economy route (gpt-image-2-economynomy), see GPT Image 2 Economy.
Quick start
$DREAMTO_API_KEY is your API Key.
Edit an image
/v1/images/edits takes the images as multipart/form-data files; repeat image[] for several reference images:
cURL
Notes
- Edits take
multipart/form-datafile uploads (image[],mask); the newer JSONimages/file_idform is not supported yet. - As with OpenAI, images are returned as Base64 (
data[].b64_json) only;response_formatis not supported. - Parameters the gateway does not declare (such as
response_format) return 400; the model is not called and nothing is charged. - Errors use the DreamTo error envelope (see the error examples of each endpoint).

