
Grok Video API
activexAI's Grok Video — AI video generation powered by Grok Imagine. Supports text-to-video and image-to-video.
Quick Start
Send a request to the Grok Video API:
| 1 | curl -X POST https://apiin.one/api/v1/videos/generations \ |
| 2 | -H "Authorization: Bearer YOUR_API_KEY" \ |
| 3 | -H "Content-Type: application/json" \ |
| 4 | -d '{ |
| 5 | "model": "grok-imagine/text-to-video", |
| 6 | "prompt": "A cat walking across a piano keyboard, cinematic lighting" |
| 7 | }' |
API Endpoint
/api/v1/videos/generationsSend a POST request with your API key to generate content using Grok Video.
Headers
Bearer YOUR_API_KEY
application/json
Body Parameters
Model identifier: grok-video
Text prompt for video generation (required for text-to-video, max 5000 chars)
Sub-model: grok-imagine/text-to-video or grok-imagine/image-to-video Defaults to grok-imagine/text-to-video.
Image URLs for image-to-video mode
Example Request
| 1 | { |
| 2 | "model": "grok-imagine/text-to-video", |
| 3 | "prompt": "A cat walking across a piano keyboard, cinematic lighting" |
| 4 | } |
Example Response
Successful task creation response.
| 1 | { |
| 2 | "code": 200, |
| 3 | "message": "success", |
| 4 | "data": { |
| 5 | "task_id": "n31xxxx_grokvid", |
| 6 | "status": "IN_PROGRESS" |
| 7 | } |
| 8 | } |
Check Task Status
For asynchronous tasks, poll the status endpoint to check when your task is complete:
/api/v1/tasks/{task_id}Returns the current status of a generation task. Poll until status is 'completed' or 'failed'.
| 1 | curl https://apiin.one/api/v1/tasks/task_abc123 \ |
| 2 | -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:
Error Codes
| 1 | { |
| 2 | "error": { |
| 3 | "code": 400, |
| 4 | "message": "Invalid parameters", |
| 5 | "type": "invalid_request" |
| 6 | } |
| 7 | } |
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?
Ready to use Grok Video?
Get Your API Key →