Skip to main content
xAI빠름표준

Grok Imagine Image

xAI의 Grok Imagine 모델로 이미지를 생성합니다. Grok Imagine Video와 동일한 Grok Imagine 아키텍처를 공유하는 자매 모델로, 빠른 text-to-image 생성을 제공합니다.

47 크레딧
이미지 1장당
Grok Imagine 아키텍처 기반 text-to-image 생성
기존 이미지와 프롬프트를 함께 전달해 편집하는 이미지 편집 모드
14종의 종횡비 프리셋과 auto 옵션
Grok Imagine Video와 동일한 기반 아키텍처 공유

지금 바로 실행해보세요

콘솔의 Playground에서 별도 코드 없이 이 모델을 즉시 테스트할 수 있어요

로그인 후 사용해보기

AI 어시스턴트에서 사용하기

이 모델의 사용법을 Claude, ChatGPT 등에 복사

빠른 시작

curl -X POST "https://api.core.today/v1/predictions" \
  -H "Content-Type: application/json" \
  -H "X-API-Key: cdt_your_api_key" \
  -d '{
  "model": "xai/grok-imagine-image",
  "input": {
    "prompt": "A futuristic city skyline at sunset, flying vehicles, neon reflections on glass towers",
    "aspect_ratio": "16:9"
  }
}'

파라미터

파라미터타입필수기본값설명
promptstringYes-이미지 생성 또는 편집을 위한 텍스트 프롬프트입니다.
imagestringNo-편집할 입력 이미지입니다. 제공되면 모델이 프롬프트를 기반으로 이 이미지를 편집합니다. jpg, jpeg, png, webp 형식을 지원합니다.
aspect_ratiostringNo1:1생성된 이미지의 종횡비입니다. 이미지를 편집할 때는 무시됩니다.
1:116:99:164:33:43:22:32:11:219.5:99:19.520:99:20auto

파일 입력 방법

이 모델의 image 파라미터에 파일을 전달하는 방법은 3가지입니다.

추천

간편 업로드 (Multipart)

POST /v1/predictions/upload에 파일을 직접 첨부합니다. 별도 업로드 과정이 필요 없습니다.

curl -X POST "https://api.core.today/v1/predictions/upload" \
  -H "X-API-Key: cdt_your_api_key" \
  -F "model=xai/grok-imagine-image" \
  -F 'input={"prompt":"your prompt here"}' \
  -F "file:image=@your_file.png"

이미지 URL 전달

공개 접근 가능한 URL을 직접 전달합니다. Storage API로 업로드한 파일의 file_url도 사용 가능합니다.

{
  "model": "xai/grok-imagine-image",
  "input": {
    "prompt": "your prompt here",
    "image": "https://example.com/image.jpg"
  }
}
File Upload 문서에서 Presigned URL 방식 등 더 자세한 업로드 방법을 확인하세요.

공통 파라미터

POST /v1/predictions 요청 시 사용되는 공통 파라미터입니다.

파라미터타입필수기본값설명
modelstringYes-모델 식별자
inputobjectYes-위 테이블의 모델별 파라미터를 포함하는 객체
output_folderstringNo-결과물 저장 폴더 경로 (최대 256자, '..' 사용 불가)
webhook_urlstringNo-완료 시 호출할 Webhook URL
is_publicbooleanNofalsetrue 시 결과물을 영구 공개 URL로도 제공

예제

텍스트 기반 이미지 생성

텍스트 프롬프트만으로 16:9 종횡비의 새 이미지를 생성합니다.

curl -X POST "https://api.core.today/v1/predictions" \
  -H "Content-Type: application/json" \
  -H "X-API-Key: cdt_your_api_key" \
  -d '{
  "model": "xai/grok-imagine-image",
  "input": {
    "prompt": "A futuristic city skyline at sunset, flying vehicles, neon reflections on glass towers",
    "aspect_ratio": "16:9"
  }
}'

기존 이미지 편집

업로드한 이미지를 프롬프트에 따라 편집합니다. 이때 aspect_ratio는 무시됩니다.

curl -X POST "https://api.core.today/v1/predictions" \
  -H "Content-Type: application/json" \
  -H "X-API-Key: cdt_your_api_key" \
  -d '{
  "model": "xai/grok-imagine-image",
  "input": {
    "prompt": "Change the background to a snowy mountain landscape",
    "image": "https://example.com/input-photo.jpg"
  }
}'

팁 & 모범 사례

1image를 전달하면 편집 모드로 전환됩니다 — 새로 생성하는 대신 프롬프트에 따라 해당 이미지를 편집합니다
2이미지를 편집할 때는 출력이 입력 이미지의 크기를 따르므로 aspect_ratio가 무시됩니다
3aspect_ratio=auto를 사용하면 모델이 프롬프트에 적합한 비율을 알아서 선택합니다

사용 사례

텍스트 프롬프트로 이미지 컨셉을 빠르게 반복 탐색할 때
기존 이미지를 입력으로 전달해 객체·스타일 등을 편집할 때
소셜 게시물, 와이드 배너, 모바일 화면 등 다양한 종횡비로 이미지를 생성할 때