gpt-image-2.6-sunburst-call
사용 전 접속 기본을 눌러
SHANHAI_BASE_URL(본 사이트의 루트 주소)와SHANHAI_API_KEY(본 사이트의 토큰)를 설정하세요. 다음 명령은 Bash에 적합합니다. 자료 예시 주소는 직접 다운로드할 수 있는 실제 주소로 대체되어야 합니다.
텍스트는 JSON으로 보내고 참조 이미지는 파일로 업로드하세요.
POST /v1/images/generations · POST /v1/images/edits
요청 매개변수
| 매개변수 | 값 |
|---|---|
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 |
텍스트만으로 만든 GIF는 프레임 4개로 구성되며 각 프레임은 200밀리초입니다. 참조 이미지를 추가하면 프레임 수와 표시 시간을 바꿀 수 있습니다.
요청 예시
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"
}'
이미지 편집
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"
결과 반환
data[0].b64_json을 디코딩하고 반환된 형식으로 저장하세요.
에 문제가 발생했습니다.
통화 또는 구성에 문제가 있는 경우, 사이트 고객 서비스에 문의하여 모델명, 작업 번호, 오류 시간 및 오류 메시지를 알려주십시오. 완전한 토큰을 제공하지 마십시오.