メインコンテンツへスキップ
更新日: 2026-06-06

GPT Image

gpt-image-2 uses the OpenAI-compatible Images API:
Use the primary image route https://api.crazyrouter.com/v1 for gpt-image-2. The full generation endpoint is https://api.crazyrouter.com/v1/images/generations. Account login, billing, and the console remain on https://crazyrouter.com.

Generate Image

Request Parameters

These parameters are rejected for gpt-image-2: response_format, style, input_fidelity, background=transparent, quality=standard, and output_format=png with output_compression.
response_format is not a gpt-image-2 parameter. Do not send response_format="url" or response_format="b64_json"; use output_format="png", "jpeg", or "webp" to choose the image file format, and read data[0].url from the response by default. response_format notes on DALL-E, Doubao, Qwen, or other image-model pages do not apply to gpt-image-2.

Request Examples

Streaming

gpt-image-2 supports stream=true. If you send partial_images, you must also set stream=true, and the value must be 0-3.
cURL
Synchronous quality=high requests, including the compatibility value quality=hd, can take a long time. For image workloads, use https://api.crazyrouter.com/v1; for high-quality jobs, prefer stream=true or set your client timeout above 180 seconds.

Response Example


Edit Image

Edit an existing image with mask-based region editing support. You can also pass multiple reference images for blending, style transfer, or composition work.

Request Parameters

Single-Image Edit Example

Python

Multi-Reference Edit Example

Multi-image editing requests must use multipart/form-data. Prefer multiple image[] fields for reference images; repeated image fields are also accepted.
gpt-image-2 supports up to 16 reference images. Multi-image requests are routed to carriers that support multi-reference image editing.