visla
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseVisla 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.
- Ask the user for permission before reading
~/.config/visla/.credentials - If permission is granted and the file exists with valid credentials, use with the Python CLI. The Bash CLI does not support
--credentials-file ~/.config/visla/.credentials, so use environment variables instead.--credentials-file - 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 fails with
accountorVISLA_CLI_ERROR_CODE=missing_credentials, treat credentials as invalid and ask the user to provide real ones.VISLA_CLI_ERROR_CODE=auth_failed
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: (Python), (Bash)
scripts/visla_cli.pyscripts/visla_cli.sh凭证(绝对不要在响应中输出API密钥/机密信息):
重要提示:仅在获得用户明确同意后,才可读取本地凭证文件。
- 在读取前,先征得用户许可
~/.config/visla/.credentials - 若获得许可且该文件存在并包含有效凭证,在Python CLI中使用参数。Bash CLI不支持
--credentials-file ~/.config/visla/.credentials,请改用环境变量。--credentials-file - 若用户拒绝、文件缺失或凭证无效,请向用户索要凭证
仅处理用户明确提供的本地文件(脚本/文档),并提醒用户避免上传敏感数据。
- 告知用户:这是一次性设置(配置完成后,后续无需重复操作)
- 告知用户:可从https://www.visla.us/visla-api获取API密钥和密钥机密
- 明确向用户索要API密钥/密钥机密(或请用户更新文件并确认)。请勿在响应中重复机密信息。
凭证有效性检查(实操方法):
- 若凭证已存在,但运行命令时返回
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"脚本文件:(Python版)、(Bash版)
scripts/visla_cli.pyscripts/visla_cli.shPlatform 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
undefinedWith 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):
```powershellpython3 scripts/visla_cli.py --credentials-file ~/.config/visla/.credentials <command>
**Windows原生环境**(无Bash的PowerShell/CMD;使用Python):
```powershellPowerShell
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, may work better than
py -3 scripts/visla_cli.py <command>.python - Credentials:
- The Python CLI only reads a credentials file if is explicitly provided.
--credentials-file - On Windows the default path is typically: .
%USERPROFILE%\\.config\\visla\\.credentials
- The Python CLI only reads a credentials file if
Note: do not print credentials. Prefer environment variables or with explicit user consent.
--credentials-file$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
- Python CLI仅在显式提供
Commands
命令说明
| Command | Description |
|---|---|
| Create video from a script (text or a local file) |
| Create video from web page URL |
| Create video from document (PPT/PDF) |
| Show account info and credit balance |
Source of truth for the exact CLI surface: run or .
scripts/visla_cli.sh --helppython3 scripts/visla_cli.py --help| 命令 | 说明 |
|---|---|
| 从脚本(文本或本地文件)创建视频 |
| 从网页链接创建视频 |
| 从文档(PPT/PDF)创建视频 |
| 显示账户信息和积分余额 |
CLI的准确使用方式请以以下命令的输出为准: 或 。
scripts/visla_cli.sh --helppython3 scripts/visla_cli.py --helpScript 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 , , and commands execute the complete flow automatically:
scripturldoc- Create project
- Poll until generation completes (may take a few minutes)
- Auto-export and return download link
Execution Instructions:
- Inform user that video generation takes some time
- Report progress status periodically during polling
scripturldoc- 创建项目
- 轮询直至生成完成(可能需要几分钟)
- 自动导出并返回下载链接
执行说明:
- 告知用户视频生成需要一定时间
- 轮询期间定期汇报进度状态
Timeout Guidance
超时指引
- This workflow typically takes 3-10 minutes, but can take up to ~30 minutes in the worst case. Set the task/command 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.
timeout - If timeout occurs, the CLI returns in the output. Inform the user they can manually check project status and continue later using the Visla web interface or API.
project_uuid
- 此流程通常需要3-10分钟,最坏情况下可能需要约30分钟。请将任务/命令的超时时间设置为**≥30分钟**(Windows默认通常约10分钟,需要调整)。如果无法修改超时时间,请提前告知用户,若发生超时,询问用户是否继续或切换为分步运行。
- 若发生超时,CLI会在输出中返回。告知用户可通过Visla网页界面或API手动检查项目状态并稍后继续。
project_uuid
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 accountSupported 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”