visla

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Visla Video Generation

Visla 视频生成

Version: 260218-1410
Create AI-generated videos from text scripts, web URLs, or documents (PPT/PDF) using Visla's OpenAPI.
版本: 260218-1410
借助Visla的OpenAPI,从文本脚本、网页链接或文档(PPT/PDF)生成AI制作的视频。

Before You Start

开始之前

Credentials (NEVER output API keys/secrets in responses):
IMPORTANT: Only read local credential files with explicit user consent.
  1. Ask the user for permission before reading
    ~/.config/visla/.credentials
  2. If permission is granted and the file exists with valid credentials, use
    --credentials-file ~/.config/visla/.credentials
    with the Python CLI. The Bash CLI does not support
    --credentials-file
    , so use environment variables instead.
  3. If permission is denied, missing, or invalid, ask the user for credentials
Only process local files (scripts/docs) explicitly provided by the user, and remind users to avoid uploading sensitive data.
  • Tell the user: this is a one-time setup (once configured, they won't need to do this again)
  • Tell the user: get API Key and Secret from https://www.visla.us/visla-api
  • Ask for the API key/secret explicitly (or ask the user to update the file and confirm). Do not repeat the secrets back in the response.
Credential validity check (practical):
  • If credentials exist but running
    account
    fails with
    VISLA_CLI_ERROR_CODE=missing_credentials
    or
    VISLA_CLI_ERROR_CODE=auth_failed
    , treat credentials as invalid and ask the user to provide real ones.
File format (bash/zsh):
bash
export VISLA_API_KEY="your_key"
export VISLA_API_SECRET="your_secret"
For PowerShell (temporary session):
powershell
$env:VISLA_API_KEY = "your_key"
$env:VISLA_API_SECRET = "your_secret"
Scripts:
scripts/visla_cli.py
(Python),
scripts/visla_cli.sh
(Bash)
凭证(绝对不要在响应中输出API密钥/机密信息):
重要提示:仅在获得用户明确同意后,才可读取本地凭证文件。
  1. 在读取
    ~/.config/visla/.credentials
    前,先征得用户许可
  2. 若获得许可且该文件存在并包含有效凭证,在Python CLI中使用
    --credentials-file ~/.config/visla/.credentials
    参数。Bash CLI不支持
    --credentials-file
    ,请改用环境变量。
  3. 若用户拒绝、文件缺失或凭证无效,请向用户索要凭证
仅处理用户明确提供的本地文件(脚本/文档),并提醒用户避免上传敏感数据。
凭证有效性检查(实操方法):
  • 若凭证已存在,但运行
    account
    命令时返回
    VISLA_CLI_ERROR_CODE=missing_credentials
    VISLA_CLI_ERROR_CODE=auth_failed
    ,则判定凭证无效,请用户提供有效凭证。
文件格式(bash/zsh):
bash
export VISLA_API_KEY="your_key"
export VISLA_API_SECRET="your_secret"
PowerShell(临时会话)格式:
powershell
$env:VISLA_API_KEY = "your_key"
$env:VISLA_API_SECRET = "your_secret"
脚本文件
scripts/visla_cli.py
(Python版)、
scripts/visla_cli.sh
(Bash版)

Platform Execution

平台执行策略

Default strategy:
  • Prefer Bash on macOS when dependencies are available (the Bash CLI avoids Python SSL-stack issues on some macOS setups).
  • Prefer Python when you're already using a well-configured Python (or when Bash dependencies are missing).
Bash (recommended on macOS; also works on Linux-like environments):
bash
undefined
默认策略:
  • 若依赖项可用,在macOS上优先使用Bash CLI(Bash CLI可避免部分macOS环境下的Python SSL栈问题)。
  • 若已配置好Python环境,或Bash依赖项缺失,则优先使用Python CLI。
Bash(macOS推荐使用;也适用于类Linux环境)
bash
undefined

With user consent, you may source ~/.config/visla/.credentials

获得用户许可后,可加载~/.config/visla/.credentials

export VISLA_API_KEY="your_key" export VISLA_API_SECRET="your_secret" ./scripts/visla_cli.sh <command>

**Python (cross-platform)**:
```bash
python3 scripts/visla_cli.py --key "your_key" --secret "your_secret" <command>
export VISLA_API_KEY="your_key" export VISLA_API_SECRET="your_secret" ./scripts/visla_cli.sh <command>

**Python(跨平台)**:
```bash
python3 scripts/visla_cli.py --key "your_key" --secret "your_secret" <command>

Or, with user consent:

或者,获得用户许可后:

python3 scripts/visla_cli.py --credentials-file ~/.config/visla/.credentials <command>

**Windows native** (PowerShell/CMD without Bash; Python):
```powershell
python3 scripts/visla_cli.py --credentials-file ~/.config/visla/.credentials <command>

**Windows原生环境**(无Bash的PowerShell/CMD;使用Python):
```powershell

PowerShell

PowerShell

$env:VISLA_API_KEY = "your_key" $env:VISLA_API_SECRET = "your_secret" python scripts/visla_cli.py <command>

Windows note:

- The agent should prefer running the **Python CLI** on Windows unless it has verified a Bash environment (WSL/Git Bash) is available.
- For simple scripts, pass directly: `python scripts/visla_cli.py script "Scene 1: ..."`
- For multi-line or complex scripts, use stdin with `-` (recommended, no temp files):
  ```powershell
  @"
  Scene 1: ...
  Scene 2: ...
  "@ | python scripts/visla_cli.py script -
  • If you have Python Launcher installed,
    py -3 scripts/visla_cli.py <command>
    may work better than
    python
    .
  • Credentials:
    • The Python CLI only reads a credentials file if
      --credentials-file
      is explicitly provided.
    • On Windows the default path is typically:
      %USERPROFILE%\\.config\\visla\\.credentials
      .
Note: do not print credentials. Prefer environment variables or
--credentials-file
with explicit user consent.
$env:VISLA_API_KEY = "your_key" $env:VISLA_API_SECRET = "your_secret" python scripts/visla_cli.py <command>

Windows注意事项:

- 除非已确认Bash环境(WSL/Git Bash)可用,否则在Windows上应优先使用**Python** CLI。
- 对于简单脚本,直接传入内容:`python scripts/visla_cli.py script "Scene 1: ..."`
- 对于多行或复杂脚本,推荐使用标准输入`-`(无需临时文件):
  ```powershell
  @"
  Scene 1: ...
  Scene 2: ...
  "@ | python scripts/visla_cli.py script -
  • 若已安装Python启动器,
    py -3 scripts/visla_cli.py <command>
    可能比
    python
    更有效。
  • 凭证相关:
    • Python CLI仅在显式提供
      --credentials-file
      参数时才会读取凭证文件。
    • Windows上的默认路径通常为:
      %USERPROFILE%\\.config\\visla\\.credentials

Commands

命令说明

CommandDescription
/visla script <script-or-@file>
Create video from a script (text or a local file)
/visla url <URL>
Create video from web page URL
/visla doc <file>
Create video from document (PPT/PDF)
/visla account
Show account info and credit balance
Source of truth for the exact CLI surface: run
scripts/visla_cli.sh --help
or
python3 scripts/visla_cli.py --help
.
命令说明
/visla script <script-or-@file>
从脚本(文本或本地文件)创建视频
/visla url <URL>
从网页链接创建视频
/visla doc <file>
从文档(PPT/PDF)创建视频
/visla account
显示账户信息和积分余额
CLI的准确使用方式请以以下命令的输出为准:
scripts/visla_cli.sh --help
python3 scripts/visla_cli.py --help

Script Format

脚本格式

**Scene 1** (0-10 sec):
**Visual:** A futuristic calendar flipping to 2025 with digital patterns.
**Narrator:** "AI is evolving rapidly! Here are 3 game-changing AI trends."

**Scene 2** (10-25 sec):
**Visual:** Text: "Trend #1: Generative AI Everywhere." Show tools like ChatGPT.
**Narrator:** "Generative AI is dominating industries—creating content and images."
**Scene 1** (0-10 sec):
**Visual:** A futuristic calendar flipping to 2025 with digital patterns.
**Narrator:** "AI is evolving rapidly! Here are 3 game-changing AI trends."

**Scene 2** (10-25 sec):
**Visual:** Text: "Trend #1: Generative AI Everywhere." Show tools like ChatGPT.
**Narrator:** "Generative AI is dominating industries—creating content and images."

Workflow

工作流程

The
script
,
url
, and
doc
commands execute the complete flow automatically:
  1. Create project
  2. Poll until generation completes (may take a few minutes)
  3. Auto-export and return download link
Execution Instructions:
  • Inform user that video generation takes some time
  • Report progress status periodically during polling
script
url
doc
命令会自动执行完整流程:
  1. 创建项目
  2. 轮询直至生成完成(可能需要几分钟)
  3. 自动导出并返回下载链接
执行说明:
  • 告知用户视频生成需要一定时间
  • 轮询期间定期汇报进度状态

Timeout Guidance

超时指引

  • This workflow typically takes 3-10 minutes, but can take up to ~30 minutes in the worst case. Set the task/command
    timeout
    to >= 30 minutes (Windows defaults are often ~10 minutes and need to be increased). If you cannot change the timeout, warn the user up front and, on timeout, ask whether to continue or switch to a step-by-step run.
  • If timeout occurs, the CLI returns
    project_uuid
    in the output. Inform the user they can manually check project status and continue later using the Visla web interface or API.
  • 此流程通常需要3-10分钟,最坏情况下可能需要约30分钟。请将任务/命令的超时时间设置为**≥30分钟**(Windows默认通常约10分钟,需要调整)。如果无法修改超时时间,请提前告知用户,若发生超时,询问用户是否继续或切换为分步运行。
  • 若发生超时,CLI会在输出中返回
    project_uuid
    。告知用户可通过Visla网页界面或API手动检查项目状态并稍后继续。

Examples

示例

/visla script @myscript.txt
/visla script "Scene 1: ..."
/visla url https://blog.example.com/article
/visla doc presentation.pptx
/visla account
/visla script @myscript.txt
/visla script "Scene 1: ..."
/visla url https://blog.example.com/article
/visla doc presentation.pptx
/visla account

Supported Document Formats

支持的文档格式

  • PowerPoint:
    .pptx
    ,
    .ppt
  • PDF:
    .pdf
  • PowerPoint:
    .pptx
    ,
    .ppt
  • PDF:
    .pdf

Output Format

输出格式

  • Start: Display "Visla Skill v260218-1410" when skill begins
  • End: Display "Visla Skill v260218-1410 completed" when skill finishes
  • 启动时:技能开始运行时显示“Visla Skill v260218-1410”
  • 结束时:技能完成时显示“Visla Skill v260218-1410 completed”