sora-video
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseSora Video Generation
Sora视频生成
Use the API to generate videos with Sora. Supports text-to-video and image-to-video.
lnapi.com使用 API通过Sora生成视频。支持文本转视频和图片转视频。
lnapi.comScript Directory
脚本目录
Important: All scripts are located in the subdirectory of this skill.
scripts/Agent Execution Instructions:
- Determine this SKILL.md file's directory path as
SKILL_DIR - Script path =
${SKILL_DIR}/scripts/main.ts - Replace all in this document with the actual path
${SKILL_DIR}
重要提示:所有脚本都位于该skill的子目录中。
scripts/Agent执行说明:
- 确定此SKILL.md文件的目录路径为
SKILL_DIR - 脚本路径 =
${SKILL_DIR}/scripts/main.ts - 将本文档中所有替换为实际路径
${SKILL_DIR}
Usage
使用方法
bash
undefinedbash
undefinedText-to-Video
文本转视频
npx -y bun ${SKILL_DIR}/scripts/main.ts --prompt "A golden retriever running on the beach" --output video.mp4
npx -y bun ${SKILL_DIR}/scripts/main.ts --prompt "一只金毛在沙滩上奔跑" --output video.mp4
Image-to-Video
图片转视频
npx -y bun ${SKILL_DIR}/scripts/main.ts --prompt "Animate this image" --image input.jpg --output video.mp4
npx -y bun ${SKILL_DIR}/scripts/main.ts --prompt "将此图片动画化" --image input.jpg --output video.mp4
Specify duration and size
指定时长和尺寸
npx -y bun ${SKILL_DIR}/scripts/main.ts --prompt "City at night" --seconds 15 --size 1280x720 --output video.mp4
undefinednpx -y bun ${SKILL_DIR}/scripts/main.ts --prompt "夜晚的城市" --seconds 15 --size 1280x720 --output video.mp4
undefinedOptions
选项
- ,
--prompt <text>: Prompt text (required)-p - : Read prompt from files
--promptfiles <files...> - : Input image path (for image-to-video)
--image <path> - : Output video path (required)
--output <path> - : Model ID (default
--model <id>)sora-2 - : Duration in seconds (10 or 15, default
--seconds <n>)10 - : Resolution (1280x720, 720x1280, 720x720, default
--size <WxH>)720x1280 - : Polling interval in ms (default
--poll <ms>)5000 - : JSON output
--json - : Show help
-h, --help
- ,
--prompt <文本>:提示文本(必填)-p - :从文件中读取提示文本
--promptfiles <文件...> - :输入图片路径(用于图片转视频)
--image <路径> - :输出视频路径(必填)
--output <路径> - :模型ID(默认值
--model <ID>)sora-2 - :视频时长(单位:秒,可选10或15,默认值
--seconds <数字>)10 - :分辨率(可选1280x720、720x1280、720x720,默认值
--size <宽x高>)720x1280 - :轮询间隔(单位:毫秒,默认值
--poll <毫秒>)5000 - :输出JSON格式结果
--json - :显示帮助信息
-h, --help
Fixed Config
固定配置
- Base URL:
https://lnapi.com - API Key: (Required in environment)
LNAPI_KEY
- 基础URL:
https://lnapi.com - API密钥:(需在环境变量中配置,必填)
LNAPI_KEY