xAI Grok Imagine Video 모델로 기존 영상을 편집합니다. 출력은 원본 영상의 길이·해상도(720p 상한)·종횡비를 그대로 상속합니다.
콘솔의 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/edit",
"input": {
"prompt": "Add gentle falling snow to the scene",
"video": "https://example.com/clip.mp4",
"duration": 5
}
}'| 파라미터 | 타입 | 필수 | 기본값 | 설명 |
|---|---|---|---|---|
prompt | string | Yes | - | 편집 내용을 설명하는 텍스트 프롬프트입니다. |
video | string | Yes | - | 편집할 원본 영상 URL입니다. 출력이 원본의 길이·해상도(720p 상한)·종횡비를 상속합니다. |
duration | integer | No | 15 | 과금 힌트 - 원본 영상의 길이(초, 1~15)입니다. xAI는 이 값을 무시하며 출력은 항상 원본 길이를 따릅니다. 미지정 시 최대치인 15초 기준으로 과금됩니다. |
이 모델의 video 파라미터에 파일을 전달하는 방법은 3가지입니다.
공개 접근 가능한 URL을 직접 전달합니다. Storage API(POST /v1/files/upload-url)로 업로드하면 파일이 S3로 직접 올라가고(파일당 50MB), 반환된 file_url을 그대로 쓰면 됩니다.
{
"model": "xai/grok-imagine-video/edit",
"input": {
"prompt": "your prompt here",
"video": "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/edit" \
-F 'input={"prompt":"your prompt here"}' \
-F "file:video=@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로도 제공 |
기존 클립에 내리는 눈 효과 추가
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/edit",
"input": {
"prompt": "Add gentle falling snow to the scene",
"video": "https://example.com/clip.mp4",
"duration": 5
}
}'