curl --request POST \
--url https://apiany.ai/v1/images/generations/sync \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"model": "gpt-image-2.6",
"prompt": "A polished studio photograph of an orange ceramic robot",
"output_format": "png",
"size": "1:1",
"n": 1
}
'{
"created": 123,
"data": [
{
"url": "<string>",
"b64_json": "<string>",
"revised_prompt": "<string>"
}
],
"usage": {
"prompt_tokens": 123,
"completion_tokens": 123,
"total_tokens": 123,
"input_tokens": 123,
"output_tokens": 123,
"cached_input_tokens": 123
}
}{
"task_id": "task_123",
"status": "pending",
"poll_url": "/v1/tasks/task_123",
"model": "<string>"
}{
"error": {
"type": "invalid_request",
"message": "<string>",
"param": "<string>",
"code": "<string>"
}
}Images
이미지 생성 후 결과 대기
이미지 작업을 만들고 최대 대기 시간까지 기다립니다. GPT Image 2.6 완료 시 data[0].url에서 PNG 또는 애니메이션 GIF URL 하나를 반환합니다. HTTP 202이면 반환된 작업을 계속 폴링하세요.
POST
/
v1
/
images
/
generations
/
sync
curl --request POST \
--url https://apiany.ai/v1/images/generations/sync \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"model": "gpt-image-2.6",
"prompt": "A polished studio photograph of an orange ceramic robot",
"output_format": "png",
"size": "1:1",
"n": 1
}
'{
"created": 123,
"data": [
{
"url": "<string>",
"b64_json": "<string>",
"revised_prompt": "<string>"
}
],
"usage": {
"prompt_tokens": 123,
"completion_tokens": 123,
"total_tokens": 123,
"input_tokens": 123,
"output_tokens": 123,
"cached_input_tokens": 123
}
}{
"task_id": "task_123",
"status": "pending",
"poll_url": "/v1/tasks/task_123",
"model": "<string>"
}{
"error": {
"type": "invalid_request",
"message": "<string>",
"param": "<string>",
"code": "<string>"
}
}인증
본문
application/json
- Option 1
- Option 2
- Option 3
- Option 4
- Option 5