sora-video

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Sora Video Generation

Sora视频生成

Use the
lnapi.com
API to generate videos with Sora. Supports text-to-video and image-to-video.
使用
lnapi.com
API通过Sora生成视频。支持文本转视频和图片转视频。

Script Directory

脚本目录

Important: All scripts are located in the
scripts/
subdirectory of this skill.
Agent Execution Instructions:
  1. Determine this SKILL.md file's directory path as
    SKILL_DIR
  2. Script path =
    ${SKILL_DIR}/scripts/main.ts
  3. Replace all
    ${SKILL_DIR}
    in this document with the actual path
重要提示:所有脚本都位于该skill的
scripts/
子目录中。
Agent执行说明:
  1. 确定此SKILL.md文件的目录路径为
    SKILL_DIR
  2. 脚本路径 =
    ${SKILL_DIR}/scripts/main.ts
  3. 将本文档中所有
    ${SKILL_DIR}
    替换为实际路径

Usage

使用方法

bash
undefined
bash
undefined

Text-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
undefined
npx -y bun ${SKILL_DIR}/scripts/main.ts --prompt "夜晚的城市" --seconds 15 --size 1280x720 --output video.mp4
undefined

Options

选项

  • --prompt <text>
    ,
    -p
    : Prompt text (required)
  • --promptfiles <files...>
    : Read prompt from files
  • --image <path>
    : Input image path (for image-to-video)
  • --output <path>
    : Output video path (required)
  • --model <id>
    : Model ID (default
    sora-2
    )
  • --seconds <n>
    : Duration in seconds (10 or 15, default
    10
    )
  • --size <WxH>
    : Resolution (1280x720, 720x1280, 720x720, default
    720x1280
    )
  • --poll <ms>
    : Polling interval in ms (default
    5000
    )
  • --json
    : JSON output
  • -h, --help
    : Show help
  • --prompt <文本>
    ,
    -p
    :提示文本(必填)
  • --promptfiles <文件...>
    :从文件中读取提示文本
  • --image <路径>
    :输入图片路径(用于图片转视频)
  • --output <路径>
    :输出视频路径(必填)
  • --model <ID>
    :模型ID(默认值
    sora-2
  • --seconds <数字>
    :视频时长(单位:秒,可选10或15,默认值
    10
  • --size <宽x高>
    :分辨率(可选1280x720、720x1280、720x720,默认值
    720x1280
  • --poll <毫秒>
    :轮询间隔(单位:毫秒,默认值
    5000
  • --json
    :输出JSON格式结果
  • -h, --help
    :显示帮助信息

Fixed Config

固定配置

  • Base URL:
    https://lnapi.com
  • API Key:
    LNAPI_KEY
    (Required in environment)
  • 基础URL:
    https://lnapi.com
  • API密钥:
    LNAPI_KEY
    (需在环境变量中配置,必填)