Logo Openrouter Video Generate

Openrouter Video Generate

Cộng đồng
Yuki001
openrouter-video-generate

Generate and download videos through OpenRouter's dedicated asynchronous Video API. Use this skill whenever the user wants to create, render, generate, poll, resume, or save an OpenRouter video, including text-to-video, first/last-frame image-to-video, reference-to-video, choosing or listing video models, setting duration/resolution/aspect ratio/audio/seed, checking job status, downloading completed outputs, configuring callbacks, or passing provider-specific video options. Prefer the bundled Python script so asynchronous jobs and API options are handled consistently.

Add to TypingMind

Tổng quan

Nhà phát hànhYuki001
Kho mãgame-dev-skills
Tên kỹ năngopenrouter-video-generate
Sao
104
Bản fork
13
Tệp đi kèm
1
Liên kết
  • Hướng dẫn bằng Markdown

    Tệp SKILL.md được mô hình tải khi cần, nên chỉ tốn token khi có yêu cầu thực sự phù hợp.

  • Dùng được với mọi LLM

    Kỹ năng AI dùng hướng dẫn viết bằng Markdown thay vì mã dành riêng cho một nhà cung cấp, nên dùng được với GPT, Claude, Gemini, Grok hoặc mô hình cục bộ.

  • 1 tệp đi kèm

    Các tập lệnh, mẫu và tài liệu tham khảo mà mô hình có thể đọc khi làm việc. Các tệp chỉ cho phép đọc và không bao giờ được thực thi.

  • Mã nguồn mở

    Được Yuki001 công bố trên GitHub. Hãy đọc các tệp nguồn trước khi cài đặt.

Cài đặt

Cài đặt kỹ năng AI Openrouter Video Generate trong TypingMind để dùng với bất kỳ LLM nào, hoặc thêm vào một tác nhân AI khác có thể đọc SKILL.md.

1

Cài đặt trong TypingMind

TypingMind cài đặt kỹ năng trực tiếp từ thư mục GitHub — đọc SKILL.md, đóng gói các tệp tài nguyên và lưu kết quả trên máy.

  1. Mở ứng dụng và vào Plugin → Kỹ năng.
  2. Chọn "Cài đặt từ GitHub".
  3. Dán URL của thư mục kỹ năng được hiển thị bên dưới rồi xác nhận.
    https://github.com/Yuki001/game-dev-skills/tree/main/skills/openrouter-video-generate
  4. Bật kỹ năng trong từng cuộc trò chuyện mà bạn muốn sử dụng kỹ năng đó.
Plugin → Kỹ năng → Thêm kỹ năng → Từ URL GitHub, sau đó dán URL thư mục và nhấn Tiếp tục.
2

Cài đặt trong tác nhân AI khác

Bất kỳ tác nhân AI nào đọc được định dạng Agent Skills đều có thể dùng kỹ năng này — hãy sao chép thư mục vào thư mục kỹ năng của tác nhân AI đó.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/Yuki001/game-dev-skills.git /tmp/game-dev-skills
mkdir -p .claude/skills
cp -r /tmp/game-dev-skills/skills/openrouter-video-generate .claude/skills/openrouter-video-generate
Khởi động lại Claude Code sau khi sao chép để ứng dụng nhận kỹ năng mới.

Sử dụng trong TypingMind

Bật Openrouter Video Generate trong bất kỳ cuộc trò chuyện nào trên TypingMind, mô hình sẽ tự xử lý phần còn lại. Tên và mô tả của kỹ năng nằm trong prompt hệ thống. Ngay khi có yêu cầu phù hợp, mô hình tự tải toàn bộ hướng dẫn — bạn không cần gọi thủ công và kỹ năng không tốn token cho đến khi thực sự được dùng.

Mô hình tự nạp Openrouter Video Generate ngay khi có yêu cầu phù hợp.

Dùng được với mọi mô hình AI

Kỹ năng AI là các hướng dẫn Markdown thuần túy, không phải mã dành riêng cho một nhà cung cấp, nên bạn có thể dùng Openrouter Video Generate với cả những mô hình khác ngoài mô hình ban đầu. Chỉ cần cài đặt một lần trong TypingMind rồi dùng với GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama hoặc mô hình cục bộ do bạn tự chạy — tất cả đều dùng khóa API của riêng bạn.

  • Chỉ tải khi cần

    Prompt hệ thống chỉ chứa tên và mô tả. Hướng dẫn được tải khi có yêu cầu phù hợp đầu tiên, nên khi kỹ năng chưa được dùng, bạn không tốn token cho phần hướng dẫn.

  • Đổi mô hình ngay trong cuộc trò chuyện

    Vì kỹ năng là hướng dẫn chứ không phải mã, việc đổi mô hình không làm kỹ năng ngừng hoạt động — mô hình tiếp theo vẫn đọc cùng tệp SKILL.md.

Hướng dẫn của kỹ năng

Đây là nội dung SKILL.md mà mô hình tải. Hãy đọc trước khi cài đặt — kỹ năng là những hướng dẫn mà mô hình của bạn sẽ làm theo.

OpenRouter Video Generation

Use this skill to submit asynchronous OpenRouter video jobs, poll them to a terminal state, and save completed video files.

Default workflow

  1. Use the OpenRouter API key from the current environment first. If it is missing, rely on the bundled script's automatic lookup of the nearest project .env file containing OPENROUTER_API_KEY, unless the user explicitly provides another environment variable name or env file path.
  2. Pick a model from the user's request. If no model is specified, use bytedance/seedance-2.0 and mention that the user can override it. Use model discovery before assuming support for unusual resolutions, aspect ratios, audio, images, or provider options.
  3. Use scripts/openrouter_video_generate.py rather than constructing requests and polling loops manually.
  4. Save generated videos to a user-visible output directory, defaulting to the current working directory if the user did not specify one.
  5. Do not print API keys or put them directly on the command line because shell history may capture them.

Bundled script

Submit, wait, and download in one command:

bash
python scripts/openrouter_video_generate.py generate \
  --prompt "a slow cinematic push-in on a neon cafe sign in the rain" \
  --model "bytedance/seedance-2.0" \
  --duration 5 \
  --resolution 1080p \
  --aspect-ratio 16:9 \
  --output-dir ./outputs

The script reads OPENROUTER_API_KEY from the current environment first. If it is not set, it searches from the current working directory upward for the nearest .env. Use --api-key-env MY_OPENROUTER_KEY for another variable name or --env-file ./path/to/.env to force a particular file.

Generation is asynchronous. The command prints the job ID immediately, polls every 30 seconds by default, and downloads all returned outputs after completion. Use --submit-only to return after submission, then resume later with status or download.

Common generation options

Pass only options the user requests or that the selected model supports:

  • --prompt TEXT is required.
  • --model MODEL_ID defaults to bytedance/seedance-2.0.
  • --duration SECONDS sets the clip duration.
  • --resolution 480p|720p|768p|1080p|1K|2K|4K sets a normalized resolution.
  • --aspect-ratio 16:9|9:16|1:1|4:3|3:4|3:2|2:3|21:9|9:21 sets the output ratio.
  • --size WIDTHxHEIGHT is interchangeable with resolution plus aspect ratio; do not combine them.
  • --first-frame PATH_OR_URL and --last-frame PATH_OR_URL provide exact boundary frames for image-to-video.
  • --reference PATH_OR_URL can be repeated for style or content guidance. Local images are converted to data URLs.
  • --generate-audio or --no-generate-audio explicitly controls audio when the model supports it. Omit both to use the API/model default.
  • --seed INTEGER requests deterministic generation where supported.
  • --callback-url HTTPS_URL sets a per-request webhook. Pair it with --submit-only when another service will handle completion.
  • --provider-options-json '{"google-vertex":{"parameters":{"negativePrompt":"blurry"}}}' passes provider-specific options under provider.options.
  • --provider-options-file options.json is safer for larger provider options.
  • --raw-json payload.json merges additional OpenRouter-compatible request fields into the payload.
  • --poll-interval 30 controls polling frequency and --timeout 1800 limits total waiting time. A timeout does not cancel the remote job.
  • --dry-run prints the request payload without making a network call.

frame_images take precedence over input_references in OpenRouter. Prefer one mode per request so the user's references are not silently ignored.

Model discovery and job recovery

List video models and their supported resolutions, aspect ratios, sizes, passthrough fields, and pricing:

bash
python scripts/openrouter_video_generate.py models

Inspect or resume a submitted job:

bash
python scripts/openrouter_video_generate.py status --job-id JOB_ID --json
python scripts/openrouter_video_generate.py download --job-id JOB_ID --output-dir ./outputs

Use download --index 0 to fetch one output from a multi-output job. download first checks that the job completed, then uses the returned content URLs and authenticates same-origin OpenRouter endpoints when required. Authentication is removed before any cross-origin redirect.

Output and metadata

One output is saved as <output-prefix>.<ext>; multiple outputs are saved as <output-prefix>_001.<ext>, <output-prefix>_002.<ext>, and so on. The extension is inferred from the response content type and defaults to .mp4.

The script writes <output-prefix>_metadata.json by default. It records the request with base64 image bodies omitted, the latest job response, and downloaded file paths. Use --metadata-file PATH to choose another path or --no-metadata to skip it.

If local waiting is interrupted or times out, keep the printed job ID and use status or download; the OpenRouter job continues independently.

Safety, cost, and retention

Video generation can bill the user's OpenRouter account, and higher duration or resolution usually costs more. Before submitting a real job, make sure the model, duration, resolution, audio choice, and output mode match the user's intent. Use models or --dry-run when uncertain.

OpenRouter video generation is not eligible for Zero Data Retention because asynchronous results must be retained temporarily for retrieval. If ZDR enforcement is enabled at the account level or through a request field, the request will not be routed. Tell the user when this conflicts with their privacy requirements.

For webhook receivers, verify X-OpenRouter-Signature against the exact raw request body using HMAC-SHA256, reject stale timestamps, and deduplicate deliveries with X-OpenRouter-Idempotency-Key.

Troubleshooting

  • A long pending or in_progress state can be normal; video generation may take several minutes. Continue polling at a reasonable interval.
  • On failed, cancelled, or expired, report the returned error and preserve the job metadata rather than repeatedly resubmitting.
  • For model or parameter errors, run models --json and verify the model ID and advertised capabilities.
  • If image-guided generation fails, verify that URLs are reachable or local files exist and use supported image formats.
  • A local polling timeout does not mean generation failed. Resume by job ID instead of creating a duplicate billable job.

Tệp đi kèm

Khi kỹ năng đã được tải, mô hình có thể đọc các tệp này nếu cần. Các tệp này chỉ dùng để đọc và không bao giờ được thực thi.

Câu hỏi thường gặp

Kỹ năng AI Openrouter Video Generate làm được gì?

Generate and download videos through OpenRouter's dedicated asynchronous Video API. Use this skill whenever the user wants to create, render, generate, poll, resume, or save an OpenRouter video, including text-to-video, first/last-frame image-to-video, reference-to-video, choosing or listing video models, setting duration/resolution/aspect ratio/audio/seed, checking job status, downloading completed outputs, configuring callbacks, or passing provider-specific video options. Prefer the bundled Python script so asynchronous jobs and API options are handled consistently.

Vì sao nên dùng Openrouter Video Generate trên TypingMind?

Vì bạn chỉ cần cài một lần rồi dùng với bất kỳ mô hình nào. Openrouter Video Generate là nội dung Markdown chứ không phải mã dành riêng cho từng nhà cung cấp, nên cùng một kỹ năng có thể chạy trên GPT-5, Claude, Gemini, Grok hoặc mô hình trên thiết bị — và bạn có thể đổi mô hình ngay trong cuộc trò chuyện mà kỹ năng vẫn hoạt động. TypingMind dùng khóa API riêng của bạn, nên bạn thanh toán trực tiếp cho nhà cung cấp thay vì trả phí thuê bao theo suất người dùng, đồng thời kỹ năng và các cuộc trò chuyện vẫn nằm trong bộ lưu trữ của bạn.

Làm thế nào để cài Openrouter Video Generate trong TypingMind?

Mở Plugin → Kỹ năng → Cài đặt từ GitHub trong TypingMind rồi dán https://github.com/Yuki001/game-dev-skills/tree/main/skills/openrouter-video-generate. TypingMind đọc tệp SKILL.md, đóng gói các tệp đi kèm rồi cài đặt cả gói dưới dạng một kỹ năng mà bạn có thể bật cho từng cuộc trò chuyện.

Những mô hình AI nào có thể dùng Openrouter Video Generate?

Bất kỳ mô hình nào bạn kết nối trong TypingMind. Kỹ năng AI là các hướng dẫn bằng Markdown chứ không phải mã dành riêng cho từng nhà cung cấp, nên GPT, Claude, Gemini, Grok và các mô hình chạy trên thiết bị đều có thể tải kỹ năng này khi có yêu cầu phù hợp.

Có thể dùng Openrouter Video Generate với bao nhiêu mô hình AI?

Bao nhiêu cũng được. Miễn là mô hình hỗ trợ kỹ năng, bạn có thể dùng Openrouter Video Generate với mô hình đó — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama và nhiều mô hình khác — tất cả đều trên TypingMind với khóa API riêng của bạn.

Kỹ năng AI Openrouter Video Generate có miễn phí không?

Kỹ năng này được Yuki001 phát hành trên GitHub. Hãy xem điều khoản giấy phép trong kho mã. Bạn chỉ trả tiền cho nhà cung cấp AI của mình theo số token đã dùng.

Kỹ năng AI là gì?

Kỹ năng AI là một gói hướng dẫn có thể tái sử dụng, chỉ cho mô hình AI cách thực hiện một tác vụ cụ thể. Kỹ năng tuân theo định dạng mở Agent Skills: một tệp SKILL.md chứa tên và mô tả, cùng các tập lệnh, mẫu hoặc tệp tham khảo mà mô hình có thể cần. Mô hình chỉ đọc hướng dẫn khi yêu cầu của bạn phù hợp với kỹ năng, nên kỹ năng đã cài đặt không phát sinh chi phí cho đến khi được sử dụng.

Kỹ năng AI khác gì với plugin hoặc máy chủ MCP?

Plugin hoặc máy chủ MCP cung cấp các công cụ mới mà mô hình có thể gọi. Khi mô hình gọi một công cụ, mã của công cụ đó chạy ở đâu đó và trả về kết quả. Còn kỹ năng AI cung cấp kiến thức và quy trình: cách tiếp cận tác vụ, các bước cần thực hiện và những tiêu chí mà kết quả cần đáp ứng. Kỹ năng chỉ là nội dung Markdown, nên không cần máy chủ, khóa API hay môi trường thực thi và hoạt động với mọi mô hình.

Xem tất cả

Tạo ngay không gian làm việc AI riêng

Đăng ký bản tin của chúng tôi để nhận thông báo về tính năng mới và các đợt tặng quà sắp tới 👇