Grok Imagine Video 1.5 API
APIMaster를 통해 Grok Imagine Video 1.5를 호출하여 텍스트-투-비디오 및 이미지-투-비디오 생성을 수행합니다.
Grok Imagine Video 1.5
텍스트-투-비디오 및 이미지-투-비디오 생성을 위해 **grok-imagine-video-1.5**와 함께 APIMaster의 비동기 비디오 API를 사용하세요.
Base URL:
https://apimaster.ai/v1(https://apimaster.ai/v1).POST https://apimaster.ai/v1/videos/generations로 작업을 생성하세요.
작업 제출
POST https://apimaster.ai/v1/videos/generations
| 필드 | 유형 | 필수 | 설명 |
|---|---|---|---|
model |
string | 예 | grok-imagine-video-1.5 |
prompt |
string | 예 | 영어 또는 중국어로 된 비디오 설명 |
aspect_ratio |
string | 아니요 | 16:9, 9:16, 1:1과 같은 화면 비율, 기본값 16:9 |
duration |
integer | 아니요 | 비디오 길이(초), 기본값 6 |
resolution |
string | 아니요 | 480p, 720p 또는 현재 사용 가능한 다른 해상도, 기본값 720p |
image_urls |
string[] | 아니요 | 공개적으로 접근 가능한 HTTP(S) 참조 이미지 URL |
텍스트-투-비디오
curl -s "https://apimaster.ai/v1/videos/generations" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "grok-imagine-video-1.5",
"prompt": "A dog running on a sunny beach, cinematic slow motion",
"aspect_ratio": "16:9",
"duration": 6,
"resolution": "720p"
}'
이미지-투-비디오
curl -s "https://apimaster.ai/v1/videos/generations" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "grok-imagine-video-1.5",
"prompt": "Animate the scene naturally with a gentle camera push-in",
"image_urls": ["https://example.com/start.png"],
"aspect_ratio": "16:9",
"duration": 10,
"resolution": "720p"
}'
제출 응답에는 작업 ID가 포함됩니다:
{
"code": 200,
"data": [{"task_id": "task_xxxxxxxx", "status": "submitted"}]
}
작업 상태 확인
GET https://apimaster.ai/v1/videos/{task_id}
curl -s "https://apimaster.ai/v1/videos/task_xxxxxxxx" \
-H "Authorization: Bearer YOUR_API_KEY"
완료되면 응답에 비디오 URL이 포함됩니다:
{
"id": "task_xxxxxxxx",
"status": "completed",
"progress": "100%",
"url": "https://apimaster.ai/v1/videos/task_xxxxxxxx/content"
}
다운로드
GET https://apimaster.ai/v1/videos/{task_id}/content
curl -L "https://apimaster.ai/v1/videos/task_xxxxxxxx/content" \
-H "Authorization: Bearer YOUR_API_KEY" \
-o output.mp4
제한 및 오류
- 6초 미만의 길이는 6초로 정규화됩니다. 사용 가능한 최대 길이와 해상도는 현재 모델 카드와 응답에 따라 결정됩니다.
- 각
image_urls항목은 공개 HTTP(S) URL이어야 합니다. 401은 유효하지 않은 API 키,402는 잔액 부족,429는 속도 제한을 의미합니다.- 실패한 작업의 경우 다운로드를 시도하기 전에 상태 응답에서 오류를 확인하세요.
