xai/grok-imagine-image
Grok Imagine의 기본 이미지 생성 모델로, 대량 생성에 적합합니다. OpenAI 호환 /v1/images/generations 엔드포인트로 사용하며, aspect_ratio로 화면 비율을 지정하고 1k / 2k 해상도를 선택할 수 있습니다. 요청당 최대 4장을 생성할 수 있으며 이미지당 과금됩니다. 이미지 편집은 아직 지원하지 않습니다.
API 호출 시 어떤 ID든 사용할 수 있습니다.
xai/grok-imagine-imageONEHOP_KEY 자리 표시자를 귀하의 API key로 교체하세요. 생성하기 →
from openai import OpenAI
client = OpenAI(
base_url="https://api.onehop.ai/v1",
api_key="<ONEHOP_KEY>",
)
response = client.images.generate(
model="xai/grok-imagine-image",
prompt="A red panda coding under the moonlight",
n=1,
)
print(response.data[0].url)