Grok Video
xAI Grok video model with normal/fun/spicy styles
기능
- Text-to-video generation
- Image-to-video generation
- Style modes (normal/fun/spicy)
- Fast generation
요금제
| Mode | Credits |
|---|---|
| text-to-video | 30 (~$0.33) |
| image-to-video | 30 (~$0.33) |
엔드포인트
POST
/api/v1/videos/generate매개변수
| Parameter | 타입 | 필수 | 설명 |
|---|---|---|---|
| model | string | 필수 | Must be "grok-video" |
| type | string | 선택 사항 | "text-to-video" or "image-to-video" (default: text-to-video) |
| prompt | string | 필수 | Text prompt (3-5000 chars) |
| mode_option | string | 선택 사항 | "normal", "fun", or "spicy" (default: normal) |
| aspect_ratio | string | 선택 사항 | "16:9", "9:16", "1:1", "2:3", or "3:2" (text-to-video only) |
| image_urls | string[] | 선택 사항 | Required for image-to-video; one public http/https URL only |
| input_image | string | 선택 사항 | Deprecated. Alias for image_urls[0] |
요청 예시
{
"model": "grok-video",
"type": "text-to-video",
"prompt": "A handheld shot of a bustling ramen alley at night",
"mode_option": "fun",
"aspect_ratio": "16:9"
}응답 예시
{
"success": true,
"data": {
"task_id": "task_grok123",
"credits_used": 30,
"remaining_credits": 470,
"model": "grok-video"
}
}코드 예제
curl -X POST https://gateway.bananapro.site/api/v1/videos/generate \
-H "Authorization: Bearer sk-your-api-key" \
-H "Content-Type: application/json" \
-d '{
"model": "grok-video",
"type": "text-to-video",
"prompt": "A handheld shot of a bustling ramen alley at night",
"mode_option": "fun",
"aspect_ratio": "16:9"
}'