Skip to main content
skill CX Codex

9routerx-video — Claude Code skill for video generation

The 9routerx-video Claude Code skill creates videos through xAI Grok Imagine. It runs when asked to generate a clip from text or an image.

MIT ★ 259 updated 2026-11-16

Install into Claude Code · Skills CLI (Vercel) All methods and platforms ↓
npx skills add yanstd888/9routerx --skill 9routerx-video -a claude-code
Open on GitHub

What 9routerx-video does

The skill sends a generation request through 9RouterX, receives a request_id, checks the job status, then downloads the finished MP4. The API also supports editing or extending an existing video by passing a video URL or file_id.

It needs 9ROUTERX_URL and an xAI account connected in the 9RouterX dashboard. Account access can use Grok Build OAuth with a SuperGrok or X Premium+ subscription, or an xAI API key. Set 9ROUTERX_KEY when 9RouterX authentication is enabled. Jobs belong to the account that created them, so status checks must send the same x-connection-id; creation requests are not automatically retried.

What it helps with

  • generate a video from a text prompt
  • turn an image into a video clip
  • edit or extend an existing video
  • download the MP4 after a generation job finishes

Example prompts for the agent

  • Generate a clip from this text and save it as video.mp4.
  • Animate this image as a video.
  • Extend the existing clip through 9RouterX.

How to install 9routerx-video

1Skills CLI (Vercel)

npx skills add yanstd888/9routerx --skill 9routerx-video -a claude-code

2Manually: put the files in place

~/.claude/skills/9routerx-video/SKILL.md

Copy the whole skill folder; for one project use .claude/skills/9routerx-video/

Step by step, with commands for each platform: How to install skills in Claude Code: five ways

Questions about 9routerx-video

How do I install 9routerx-video in Claude Code?

Run npx skills add yanstd888/9routerx --skill 9routerx-video -a claude-code. The skill file is at ~/.claude/skills/9routerx-video/SKILL.md.

What does 9routerx-video do?

It submits video generation, editing, or extension jobs through 9RouterX and xAI Grok Imagine. It then checks job progress and downloads the completed MP4.

What does 9routerx-video require?

It needs 9ROUTERX_URL and an xAI account connected in the 9RouterX dashboard, using either Grok Build OAuth with a SuperGrok or X Premium+ subscription or an xAI API key. 9ROUTERX_KEY is required when 9RouterX authentication is enabled.

Source text

SKILL.md · MIT
---
name: 9routerx-video
description: Generate videos via 9RouterX /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.
---

# 9RouterX — Video Generation (xAI Grok Imagine)

Requires `9ROUTERX_URL` (and `9ROUTERX_KEY` if auth enabled). See https://raw.githubusercontent.com/yanstd888/9routerx/refs/heads/main/skills/9routerx/SKILL.md for setup.

Requires a connected **xAI account** in the 9RouterX 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.

## Endpoints (async job flow)

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": "…" }` |

## Examples

Submit a job:

```bash
curl -X POST "$9ROUTERX_URL/v1/videos/generations" \
  -H "Authorization: Bearer $9ROUTERX_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-connection-id: <id>)
```

Poll until done (echo the connection header back so the same account polls the job):

```bash
curl "$9ROUTERX_URL/v1/videos/abc123" \
  -H "Authorization: Bearer $9ROUTERX_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.

## CLI one-shot

```bash
9routerx 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.

## Notes & limits

- Jobs are **account-bound** upstream: poll with the same connection that created the job (`x-connection-id` header, value from the create response's `x-connection-id`).
- Creation POSTs are **never auto-retried** (a retry could create and bill two videos). Only a 401→token-refresh→single-retry is performed, which upstream rejects before job creation.
- Video models are tagged `kind: "video"` and are excluded from chat model lists and chat fallback combos.
- Grok Build **subscription OAuth** tokens are sent to the same `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 9RouterX — a `403`/`permission_denied` from upstream means the connected account has no video access.

© yanstd888 · MIT · yanstd888/9routerx

Similar skills

SKILL.md skills catalog →

From the same set9

9routerx-embeddings The 9routerx-embeddings Claude Code skill creates text embeddings through the 9RouterX API. The agent uses it for RAG, semantic search, and text similarity tasks. CX Codex +1 ★ 259repo stars 9routerx-chat The 9routerx-chat Claude Code skill sends language-model requests through 9RouterX. It activates for code generation, text summaries, and other prompts to a model. CX Codex +1 ★ 259repo stars 9routerx Claude Code skill connects your agent to the 9RouterX gateway. It routes OpenAI-compatible REST calls for chat, speech, embeddings, and web fetch to multiple AI models. CX Codex +1 ★ 259repo stars 9routerx-tts The 9routerx-tts Claude Code skill turns text into speech through the 9RouterX API. It runs for voiceovers, generated audio, or reading text aloud. CX Codex +1 ★ 259repo stars 9routerx-image The 9routerx-image Claude Code skill creates images through the 9RouterX API. It activates when a request asks for a picture or text-to-image generation. CX Codex +1 ★ 259repo stars 9routerx-stt 9routerx-stt — a skill for Claude Code and Codex that routes audio transcription requests through 9RouterX. Transcribes voice recordings and generates subtitle files across multiple model backends. CX Codex +1 ★ 259repo stars 9routerx-web-fetch The 9routerx-web-fetch Claude Code skill retrieves webpage content as Markdown, plain text, or HTML. The agent uses it to read an article or extract material from a URL. CX Codex +1 ★ 259repo stars 9routerx-web-search The 9routerx-web-search Claude Code skill searches the web and public X posts through 9RouterX. It runs when an agent is asked to find articles, information, or posts on X. CX Codex +1 ★ 259repo stars

Project sponsors

Companies that keep this analytics open