Skip to main content
POST
/
generate
/
k
/
grok-text-to-video
Grok Text to Video
curl --request POST \
  --url https://api.sinancode.com/v1/generate/k/grok-text-to-video \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "prompt": "A cat playing with a ball in slow motion",
  "aspect_ratio": "2:3",
  "mode": "normal"
}
'
{
  "task_id": "01234567-89ab-cdef-0123-456789abcdef"
}
Generate short videos from text using xAI’s Grok Imagine model. Key Features:
  • Ultra-Fast Generation - Complete video generation within 15 seconds, faster than Sora 2
  • Audio-Video Sync - Native integrated audio generation with automatic sound effects and background music
  • Smooth Motion - 24fps smooth framerate with no distortion in complex movements
  • Smart Camera Work - Dynamic camera effects and intelligent focus shifting

Authorizations

Authorization
string
header
required

Please use your API Token for authentication

Body

application/json

Task parameters

prompt
string
required

Prompt (required)

Required string length: 1 - 5000
Example:

"A cat playing with a ball in slow motion"

aspect_ratio
enum<string>
default:2:3

Aspect ratio (optional, default 2:3)

Available options:
2:3,
3:2,
1:1
Example:

"2:3"

mode
enum<string>
default:normal

Mode (optional, default normal)

Available options:
fun,
normal,
spicy
Example:

"normal"

Response

OK

task_id
string
required

Task ID

Example:

"01234567-89ab-cdef-0123-456789abcdef"