gpt-image-2.6-sunburst-call

Before use, press Access Basics to set SHANHAI_BASE_URL (this site’s root address) and SHANHAI_API_KEY (this site’s token). The following command is suitable for Bash; the material example address must be replaced with a real address that can be downloaded directly.

Text: JSON. Reference images: file upload.

POST /v1/images/generations · POST /v1/images/edits

request parameters

Parameter Value
model gpt-image-2.6-sunburst-call / gpt-image-2.6-sunburst-按次
n 1
size (PNG) 1024x1024, 1536x1024, 1024x1536
image (edits) PNG / JPEG / WebP / GIF · multipart/form-data
response_format b64_json
output_format png / gif
frame_count (edits) 2–64 (4)
frame_duration_ms (edits) 20–2000 ms (200 ms), Δ 10 ms

Text-only GIFs use 4 frames at 200 ms each. Add a reference image to change the timing.

Request Example

curl --fail-with-body "$SHANHAI_BASE_URL/v1/images/generations" \
  -H "Authorization: Bearer $SHANHAI_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "model": "gpt-image-2.6-sunburst-call",
  "prompt": "A red ball rolling from left to right",
  "n": 1,
  "response_format": "b64_json",
  "output_format": "gif"
}'

Image editing

curl --fail-with-body "$SHANHAI_BASE_URL/v1/images/edits" \
  -H "Authorization: Bearer $SHANHAI_API_KEY" \
  -F "model=gpt-image-2.6-sunburst-call" -F "n=1" -F "response_format=b64_json" \
  -F "prompt=Change only the red ball to green" \
  -F "size=1024x1024" -F "image=@reference.png;type=image/png"
curl --fail-with-body "$SHANHAI_BASE_URL/v1/images/edits" \
  -H "Authorization: Bearer $SHANHAI_API_KEY" \
  -F "model=gpt-image-2.6-sunburst-call" -F "n=1" -F "response_format=b64_json" \
  -F "prompt=Animate only the red ball" -F "image=@reference.png;type=image/png" \
  -F "output_format=gif" -F "frame_count=5" -F "frame_duration_ms=300"

Return results

Decode data[0].b64_json and save in the returned format.

encountered a problem

If you encounter problems with calling or configuration, please contact the site customer service and provide the model name, task number, error time and error message. Do not provide the complete token.