Install any skill in seconds. Free to start, no credit card required.
Get Started Free →Generate videos via 9Router /v1/videos/generations using xAI Grok Imagine (grok-imagine-video). Async job flow - submit, poll request_id until done, download MP4. Use when the user wants to create, generate, or render a video, text-to-video (txt2vid), or image-to-video.
.claude/skills/decolua-9router-video/SKILL.md| Model | Eval pass | Runs |
|---|---|---|
| gemini-3.6-flash | 100% | 107 |
| Test case | Without → With | Effect | Δ tokens | Δ turns |
|---|---|---|---|---|
| case-01 | ✗→✓ | ▲ Improved | 32% | 0% |
| case-02 | ✗→✓ | ▲ Improved | 17% | 0% |
| case-03 | ✗→✓ | ▲ Improved | 14% | 0% |
| case-04 | ✗→✓ | ▲ Improved | -13% | 0% |
| case-05 | ✗→✓ | ▲ Improved | 9% | 0% |
Requires NINEROUTER_URL (and NINEROUTER_KEY if auth enabled). See https://raw.githubusercontent.com/decolua/9router/refs/heads/master/skills/9router/SKILL.md for setup.
Requires a connected xAI account in the 9Router dashboard — either Grok Build OAuth (SuperGrok / X Premium+ subscription sign-in) or a direct xAI API key from console.x.ai. The two are separate auth types with separate billing; the dashboard shows which one each connection uses.
Video generation is asynchronous: the POST returns a request_id immediately, then you poll until the job is done or failed.
| Endpoint | Purpose | |---|---| | POST /v1/videos/generations | text-to-video / image-to-video | | POST /v1/videos/edits | edit an existing video | | POST /v1/videos/extensions | extend an existing video | | GET /v1/videos/{request_id} | poll job status |
Request fields (passed through to xAI unchanged — see https://docs.x.ai/developers/rest-api-reference/inference/videos):
| Field | Required | Notes | |---|---|---| | model | no | xai/grok-imagine-video (prefix is stripped before upstream) | | prompt | yes for T2V | video description | | duration | no | seconds | | aspect_ratio | no | 16:9, 9:16, 1:1, 4:3, 3:4, 3:2, 2:3 | | resolution | no | 480p, 720p, 1080p | | image | no | { "url": "https://… or data:image/…;base64,…" } for image-to-video | | video | edits/extensions | { "url": "…mp4" } or { "file_id": "…" } |
Submit a job:
bashcurl -X POST "$NINEROUTER_URL/v1/videos/generations" \ -H "Authorization: Bearer $NINEROUTER_KEY" \ -H "Content-Type: application/json" \ -d '{"model":"xai/grok-imagine-video","prompt":"A cinematic tracking shot through a neon city at night","duration":8,"aspect_ratio":"16:9","resolution":"720p"}' # → {"request_id":"abc123"} (response header x-9router-connection-id: <id>)
Poll until done (echo the connection header back so the same account polls the job):
bashcurl "$NINEROUTER_URL/v1/videos/abc123" \ -H "Authorization: Bearer $NINEROUTER_KEY" \ -H "x-connection-id: <id from create response>" # → {"status":"pending","progress":42} # → {"status":"done","video":{"url":"https://…mp4","duration":8},"model":"grok-imagine-video"} # → {"status":"failed","error":{"code":"…","message":"…"}}
Download: fetch video.url from the done response.
bash9router xai video \ --prompt "A cinematic tracking shot through a neon city at night" \ --output video.mp4 # options: --model --duration --aspect-ratio --resolution --image --timeout --port --api-key
Submits, polls with progress, downloads to video.mp4.part, atomically renames on success. Ctrl+C cancels cleanly; non-zero exit on failure.
x-connection-id header, value from the create response's x-9router-connection-id).kind: "video" and are excluded from chat model lists and chat fallback combos.api.x.ai/v1/videos endpoints as API keys; whether a given subscription tier includes video-generation quota is controlled by xAI and is not verified by 9Router — a 403/permission_denied from upstream means the connected account has no video access.| Case | Status | Duration (ms) | Turns | Tokens | Tool calls | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Without | With | Δ | Without | With | Δ | Without | With | Δ | Without | With | Δ | ||
case-01 | fail→pass | 9,602 | 7,008 | -27% | 1 | 1 | 0% | 2,017 | 2,655 | +32% | 0 | 0 | — |
case-02 | fail→pass | 8,674 | 2,301 | -73% | 1 | 1 | 0% | 1,300 | 1,525 | +17% | 0 | 0 | — |
case-03 | fail→pass | 10,066 | 5,242 | -48% | 1 | 1 | 0% | 2,041 | 2,324 | +14% | 0 | 0 | — |
case-04 | fail→pass | 11,747 | 4,596 | -61% | 1 | 1 | 0% | 2,081 | 1,814 | -13% | 0 | 0 | — |
case-05 | fail→pass | 9,434 | 5,166 | -45% | 1 | 1 | 0% | 1,821 | 1,992 | +9% | 0 | 0 | — |
case-06 | fail→pass | 12,741 | 4,763 | -63% | 1 | 1 | 0% | 1,800 | 2,108 | +17% | 0 | 0 | — |
case-07 | pass→pass | 12,269 | 5,036 | -59% | 1 | 1 | 0% | 2,104 | 1,744 | -17% | 0 | 0 | — |
case-08 | pass→pass | 5,177 | 3,176 | -39% | 1 | 1 | 0% | 946 | 1,705 | +80% | 0 | 0 | — |
case-09 | pass→pass | 10,395 | 3,464 | -67% | 1 | 1 | 0% | 1,776 | 1,736 | -2% | 0 | 0 | — |
case-10 | fail→pass | 8,273 | 1,487 | -82% | 1 | 1 | 0% | 1,207 | 1,378 | +14% | 0 | 0 | — |
case-11 | pass→pass | 12,358 | 4,186 | -66% | 1 | 1 | 0% | 2,093 | 1,887 | -10% | 0 | 0 | — |
case-12 | fail→pass | 12,261 | 2,529 | -79% | 1 | 1 | 0% | 1,778 | 1,558 | -12% | 0 | 0 | — |
case-13 | pass→pass | 12,360 | 6,257 | -49% | 1 | 1 | 0% | 2,439 | 2,317 | -5% | 0 | 0 | — |
case-14 | fail→pass | 8,155 | 2,617 | -68% | 1 | 1 | 0% | 1,358 | 1,543 | +14% | 0 | 0 | — |
case-15 | pass→pass | 10,098 | 2,066 | -80% | 1 | 1 | 0% | 1,882 | 1,428 | -24% | 0 | 0 | — |
case-16 | pass→pass | 6,240 | 1,996 | -68% | 1 | 1 | 0% | 1,409 | 1,342 | -5% | 0 | 0 | — |
case-17 | fail→pass | 9,914 | 3,263 | -67% | 1 | 1 | 0% | 1,589 | 1,575 | -1% | 0 | 0 | — |
case-18 | fail→pass | 6,918 | 2,353 | -66% | 1 | 1 | 0% | 1,127 | 1,445 | +28% | 0 | 0 | — |
case-19 | pass→pass | 15,952 | 2,667 | -83% | 1 | 1 | 0% | 1,455 | 1,515 | +4% | 0 | 0 | — |
case-20 | fail→pass | 7,916 | 3,622 | -54% | 1 | 1 | 0% | 1,464 | 1,462 | -0% | 0 | 0 | — |
case-21 | fail→pass | 6,874 | 3,094 | -55% | 1 | 1 | 0% | 1,219 | 1,479 | +21% | 0 | 0 | — |
case-22 | pass→pass | 9,790 | 7,491 | -23% | 1 | 1 | 0% | 1,694 | 2,412 | +42% | 0 | 0 | — |
case-23 | pass→pass | 10,475 | 8,705 | -17% | 1 | 1 | 0% | 2,061 | 2,888 | +40% | 0 | 0 | — |
case-24 | pass→pass | 9,904 | 7,885 | -20% | 1 | 1 | 0% | 1,964 | 2,699 | +37% | 0 | 0 | — |
DecimalAI ran this skill against gemini-3.6-flash twice over the same eval suite — once with the skill loaded and once without — and compared the two runs case by case. 24 cases were attempted. The headline lift of +54 percentage points is the difference between those two pass rates over the 24 comparable cases.
Without the skill loaded, the model failed this case. With it loaded, the same prompt on the same model passed. This is one improved case from the latest verified run; every case, including any that regressed, is in the table above.
Other measured skills in the registry, with their headline benchmark lift.