xAI 직결 API로 제공되는 Grok Imagine Video 모델입니다. 텍스트-비디오, 이미지-비디오 생성과 동기화된 오디오를 지원합니다. 기존 클립 편집은 xai/grok-imagine-video/edit 모델을 사용하세요.
콘솔의 Playground에서 별도 코드 없이 이 모델을 즉시 테스트할 수 있어요
이 모델의 사용법을 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-video",
"input": {
"prompt": "a penguin walks away from the camera, towards a large snowy mountaintop in the distance",
"duration": 8,
"resolution": "720p",
"aspect_ratio": "16:9"
}
}'| 파라미터 | 타입 | 필수 | 기본값 | 설명 |
|---|---|---|---|---|
prompt | string | Yes | - | 비디오 생성을 위한 텍스트 프롬프트 |
image | string | No | - | 비디오 생성 기준이 되는 입력 이미지 (이미지-비디오). jpg, jpeg, png, webp 지원 |
duration | integer | No | 8 | 비디오 길이 초 (1~15) |
resolution | string | No | - | 비디오 해상도. 미지정 시 720p 요율로 과금되므로 명시적으로 지정하세요 480p720p |
aspect_ratio | string | No | 16:9 | 출력 비디오의 화면 비율 (직결 xAI API는 'auto'를 허용하지 않습니다) 16:94:31:19:163:43:22:3 |
이 모델의 image 파라미터에 파일을 전달하는 방법은 3가지입니다.
공개 접근 가능한 URL을 직접 전달합니다. Storage API(POST /v1/files/upload-url)로 업로드하면 파일이 S3로 직접 올라가고(파일당 50MB), 반환된 file_url을 그대로 쓰면 됩니다.
{
"model": "xai/grok-imagine-video",
"input": {
"prompt": "your prompt here",
"image": "https://example.com/image.jpg"
}
}POST /v1/predictions/upload에 파일을 직접 첨부합니다. 별도 업로드 과정이 없는 대신, 파일이 API 서버를 거치므로 요청 전체 10MB 제한이 적용됩니다.
curl -X POST "https://api.core.today/v1/predictions/upload" \
-H "X-API-Key: cdt_your_api_key" \
-F "model=xai/grok-imagine-video" \
-F 'input={"prompt":"your prompt here"}' \
-F "file:image=@your_file.png"POST /v1/predictions 요청 시 사용되는 공통 파라미터입니다.
| 파라미터 | 타입 | 필수 | 기본값 | 설명 |
|---|---|---|---|---|
model | string | Yes | - | 모델 식별자 |
input | object | Yes | - | 위 테이블의 모델별 파라미터를 포함하는 객체 |
output_folder | string | No | - | 결과물 저장 폴더 경로 (최대 256자, '..' 사용 불가) |
webhook_url | string | No | - | 완료 시 호출할 Webhook URL |
is_public | boolean | No | false | true 시 결과물을 영구 공개 URL로도 제공 |
텍스트 프롬프트만으로 8초 클립 생성
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-video",
"input": {
"prompt": "a penguin walks away from the camera, towards a large snowy mountaintop in the distance",
"duration": 8,
"resolution": "720p",
"aspect_ratio": "16:9"
}
}'480p는 720p보다 초당 약 28% 저렴합니다
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-video",
"input": {
"prompt": "a lone astronaut walking across a red Martian desert as twin suns set on the horizon",
"duration": 15,
"resolution": "480p",
"aspect_ratio": "16:9"
}
}'