이미지 생성
CometAPI에서 OpenAI POST /v1/images/generations를 사용해 텍스트 프롬프트로 이미지를 생성하고, 모델별 제어 옵션은 공식 이미지 생성 가이드를 따르세요.
이 경로를 사용하면 CometAPI에서 OpenAI 호환 요청 형식으로 텍스트로부터 이미지를 생성할 수 있습니다.Documentation Index
Fetch the complete documentation index at: https://apidoc.cometapi.com/llms.txt
Use this file to discover all available pages before exploring further.
공식 레퍼런스
background,output_compression, 스트리밍 또는 향후 GPT 이미지 옵션과 같은 모델별 제어 기능을 사용하기 전에 OpenAI 이미지 생성 가이드를 읽으세요.- 현재 파라미터 목록은 OpenAI 이미지 생성 레퍼런스를 사용하세요.
먼저 모델 선택하기
response_format으로 간단한 첫 요청을 보내려면dall-e-3를 사용하세요output_format,quality,background와 같은 GPT 전용 제어가 필요하면 GPT 이미지 모델을 사용하세요- 해당 provider가 특별히 필요하다면
qwen-image를 사용하되,n은 1로 유지하세요
안전한 첫 요청
dall-e-3로 시작하세요size는1024x1024로 유지하세요- 작은 JSON 응답과 임시 다운로드 URL이 필요하면
response_format: "url"로 설정하세요 - GPT 이미지 모델 파라미터가 필요하면 API 레퍼런스의 검증된 GPT 요청 예제를 사용하세요
jpeg와 같은 특정 인코딩 이미지 형식이 필요할 때만output_format을 추가하세요background,output_compression또는 스트리밍을 추가하기 전에 OpenAI 이미지 생성 가이드를 확인하세요- 배치 생성이나 스타일 튜닝을 추가하기 전에 프롬프트 하나와 출력 이미지 하나로 먼저 사용해 보세요
모델별 요청 동작
response_format은dall-e-2와dall-e-3에 적용됩니다- GPT 이미지 모델은
output_format,quality,background,output_compression과 같은 GPT 전용 제어를 사용합니다 - 최신 모델별 옵션은 OpenAI 이미지 생성 가이드를 따르세요
qwen-image는n > 1을 지원하지 않습니다
인증
Bearer token authentication. Use your CometAPI key.
본문
The image generation model to use. Choose a current model from the Models page.
Text description of the image you want to generate.
"A paper boat floating on calm water at sunrise."
Number of images to generate. Keep this at 1 for the broadest compatibility.
Quality setting for models that support it. See the OpenAI image generation guide for the latest model-specific values.
Requested output size. Supported values depend on the selected model. See the OpenAI image generation guide for the latest model-specific ranges.
"1024x1024"
The response container for dall-e-2 and dall-e-3. This parameter is not supported for GPT image models, which return base64-encoded image data.
url, b64_json The encoded image type for GPT image model results, such as png, jpeg, or webp. See the OpenAI image generation guide for current GPT image output controls.
"jpeg"
응답
Image generation result.
Unix timestamp for the completed generation.
Background mode returned by models that expose it.
Encoded image type returned by GPT image models.
Quality level returned by models that expose it.
Output size returned by models that expose it.