GPT Image class model

Access the GPT Image class model according to the actual model and channel configuration of this site.

The GPT Image class model generates or edits images through supported image protocols. The specific version, size, quality and input quantity need to be confirmed according to the actual model on this site.

Step 1: Confirm model and purpose

Query the available ID of the current Key and distinguish between generation and editing capabilities. The price page checks applicable units for mass, input and output. This page does not promise that an official version has been launched on this site.

Step 2: Generate a picture

curl --fail-with-body https://dunduntoken.com/v1/images/generations   -H "Authorization: Bearer $DUNDUN_API_KEY"   -H "Content-Type: application/json"   -d '{"model":"IMAGE_MODEL_ID","prompt":"白色背景上的蓝色陶瓷杯,产品摄影","n":1}'

Do not pass unconfirmed size, quality, background or response_format yet. After success, the items are added one by one. Other image model enumerations cannot be directly applied.

Step 3: Edit existing images

Use an ID that supports editing and press Image Edit to send the multipart material. Confirm the reference image and mask limits; for multi-image editing, clarify the purpose of each image, and do not assume that all versions have the same image limit.

Step 4: Save and Accept

Read the URL or Base64 of the actual image in data and save it in the real format. Check body, text, size and transparent background, do not treat revised_prompt as image payload. For downloading methods, see Image Generation.

FAQ

For unknown parameters, return to the minimum request first; if the picture is not available, check the model and material; if it times out, check the record first, and do not resend infinitely. Generation and editing may have different costs and times and should be tested separately.