
Grok Video API
activexAI's Grok Video — AI video generation powered by Grok Imagine. Supports text-to-video and image-to-video.
xAIvideo24 credits/call
Provider
xAI
Pricing
~$0.048 per video (24 credits)
Speed
30–60 seconds
Output
video
Quick Start
Send a request to the Grok Video API:
bash
curl -X POST https://apiin.one/api/v1/videos/generations \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "grok-imagine/text-to-video",
"prompt": "A cat walking across a piano keyboard, cinematic lighting"
}'API Endpoint
POST
/api/v1/videos/generationsSend a POST request with your API key to generate content using Grok Video.
Headers
| Header | 类型 | 必填 | 描述 |
|---|---|---|---|
Authorization | string | 必填 | Bearer YOUR_API_KEY |
Content-Type | string | 必填 | application/json |
Body Parameters
| 参数 | 类型 | 必填 | 描述 |
|---|---|---|---|
model | string | 必填 | Model identifier: "grok-video" |
prompt | string | 可选 | Text prompt for video generation (required for text-to-video, max 5000 chars) |
model | string | 可选 | Sub-model: "grok-imagine/text-to-video" or "grok-imagine/image-to-video" (默认值: grok-imagine/text-to-video) |
image_urls | array | 可选 | Image URLs for image-to-video mode |
Example Request
json
{
"model": "grok-imagine/text-to-video",
"prompt": "A cat walking across a piano keyboard, cinematic lighting"
}Example Response
Successful task creation response.
{
"code": 200,
"message": "success",
"data": {
"task_id": "n31xxxx_grokvid",
"status": "IN_PROGRESS"
}
}Check Task Status
For asynchronous tasks, poll the status endpoint to check when your task is complete:
GET
/api/v1/tasks/{task_id}Returns the current status of a generation task. Poll until status is 'completed' or 'failed'.
bash
curl https://apiin.one/api/v1/tasks/task_abc123 \
-H "Authorization: Bearer aio_your_key"Use Cases
- ✓Generate short videos from text descriptions
- ✓Animate images into video clips
- ✓Create social media video content
- ✓Build AI video features into apps
API Tester
Test the Grok Video API directly from your browser:
API 测试沙盒POST
Error Codes
{
"error": {
"code": 400,
"message": "Invalid parameters",
"type": "invalid_request"
}
}Frequently Asked Questions
How much does Grok Video cost?
Each video costs 24 credits (~$0.048) for both text-to-video and image-to-video.
Does Grok Video support image-to-video?
Yes. Provide image URLs via the "image_urls" parameter to animate images into video.
Do I need a Twitter/X Premium subscription?
No. API in One provides direct API access without any X/Twitter subscription.
Why Use Grok Video Through API in One?
1No X/Twitter Premium subscription needed
2Both text-to-video and image-to-video
3Direct API access to xAI's Grok
4Same backend as Grok Imagine for consistent quality
Ready to use Grok Video?
Get Your API Key →