메인 콘텐츠로 건너뛰기
POST
/
v1
/
images
/
generations
Create images
curl --request POST \
  --url https://api.cometapi.com/v1/images/generations \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "model": "dall-e-3",
  "prompt": "A paper boat floating on calm water at sunrise."
}
'
{
  "created": 1773311889,
  "data": [
    {
      "revised_prompt": "A paper boat floating on calm water at sunrise, with soft golden light reflecting off the water's surface.",
      "url": "https://filesystem.site/cdn/20260312/1d6826050921c07a13ff173310c640.webp"
    }
  ]
}
CometAPI에서 OpenAI 호환 요청 형식으로 텍스트로부터 이미지를 생성하려면 이 경로를 사용하세요.

먼저 모델 선택하기

  • 간단한 URL 기반 스모크 테스트를 원한다면 dall-e-3를 사용하세요
  • 최신 GPT 이미지 모델을 사용하고 base64 응답을 처리할 수 있다면 gpt-image-1, gpt-image-1-mini, 또는 gpt-image-1.5를 사용하세요
  • 해당 provider가 꼭 필요하다면 qwen-image를 사용하되, n은 1로 유지하세요

안전한 첫 요청

  • dall-e-3로 시작하세요
  • size1024x1024로 유지하세요
  • 작은 JSON 응답과 임시 다운로드 URL이 필요하다면 response_format: "url"로 설정하세요
  • 배치 생성이나 스타일 튜닝을 추가하기 전에는 프롬프트 하나와 이미지 하나로 시작하세요

모델별 응답 동작

  • dall-e-2dall-e-3는 URL 응답과 base64 응답을 지원합니다
  • gpt-image-1, gpt-image-1-mini, gpt-image-1.5는 base64 우선 경로로 다루는 것이 더 적합합니다
  • qwen-imagen > 1을 지원하지 않습니다
2026-03-12의 실시간 검증 중, response_format: "url"을 사용한 dall-e-3 요청은 일반적인 created 타임스탬프, revised_prompt, 그리고 임시 이미지 URL을 반환했습니다.
생성된 이미지는 provider 사용 정책을 준수해야 합니다. 불법적이거나 폭력적이거나 음란하거나 저작권을 침해하는 프롬프트는 보내지 마세요.

인증

Authorization
string
header
필수

Bearer token authentication. Use your CometAPI key.

본문

application/json
model
string
기본값:dall-e-3
필수

The image generation model to use. Choose a current model from the Models page.

prompt
string
필수

Text description of the image you want to generate.

예시:

"A paper boat floating on calm water at sunrise."

n
integer
기본값:1

Number of images to generate. Keep this at 1 for the broadest compatibility.

size
string

Requested output size. Supported values depend on the selected model.

예시:

"1024x1024"

response_format
enum<string>

Requested output encoding for models that support it.

사용 가능한 옵션:
url,
b64_json

응답

200 - application/json

Image generation result.

created
integer
필수

Unix timestamp for the completed generation.

data
object[]
필수