Novita 多模态:AI图像视频及语音 - Openclaw Skills
什么是 Novita 多模态执行?
用于 Openclaw Skills 的 Novita 多模态技能使 AI 智能体能够生成和处理包括图像、视频和音频在内的多种媒体类型。通过与 Novita AI 的高性能模型(如 Seedream 5.0 Lite 和 Vidu Q3 Pro)集成,用户可以通过编程方式创建视觉效果、编辑现有图像以及进行语音与文本的相互转换。该技能在自然语言指令与高保真创意输出之间架起了一座桥梁。
此集成旨在提高速度和透明度,利用专门的逻辑为用户提供任务进度的即时反馈。无论您是在构建营销自动化工具还是无障碍工具,通过 Openclaw Skills 整合此功能都能确保在多模态内容创建方面提供稳健且开发者友好的体验。
下载入口:https://github.com/openclaw/skills/tree/main/skills/ximasadila/novita-multimodal
安装与下载
1. ClawHub CLI
从源直接安装技能的最快方式。
npx clawhub@latest install novita-multimodal
2. 手动安装
将技能文件夹复制到以下位置之一
全局模式~/.openclaw/skills/
工作区
<project>/skills/
优先级:工作区 > 本地 > 内置
3. 提示词安装
将此提示词复制到 OpenClaw 即可自动安装。
请帮我使用 Clawhub 安装 novita-multimodal。如果尚未安装 Clawhub,请先安装(npm i -g clawhub)。
Novita 多模态执行 应用场景
- 使用 Openclaw Skills 从文本描述生成高质量的营销图像。
- 从文本提示或参考图像为社交媒体自动化创建短视频。
- 为具有各种语音配置文件的本地化音频内容实现文本转语音 (TTS)。
- 将音频文件转录为文本 (STT),用于文档和会议摘要。
- 通过提供参考 URL 和修改指令来编辑现有图像。
- 该技能分析用户请求以识别特定的多模态任务类型。
- 它通过优先级查找搜索 API key:直接提示、配置文件或环境变量。
- 在处理之前,该技能向用户发送强制性的进度提示,预估时间和成本,以确保流畅的 Openclaw Skills 体验。
- 它向相应的 Novita AI 端点(例如,用于图像的 Seedream 或用于视频的 Vidu)执行 POST 请求。
- 对于视频或音频生成等异步任务,该技能启动轮询循环,每 15 秒检查一次状态。
- 完成后,该技能返回最终媒体 URL 和操作的实际成本。
Novita 多模态执行 配置指南
要在 Openclaw Skills 生态系统中使用此技能,请使用推荐的目录结构配置您的 API key:
mkdir -p ~/.novita && echo '{"api_key": "YOUR_API_KEY"}' > ~/.novita/config.json
或者,您可以在 shell 中将该 key 导出为环境变量:
export NOVITA_API_KEY="YOUR_API_KEY"
Novita 多模态执行 数据架构与分类体系
Novita 多模态技能通过结构化的 JSON 请求和响应组织其交互。以下是 Openclaw Skills 中任务与其各自模型和数据类型的映射:
| 任务类型 | 使用的模型 | 关键数据参数 |
|---|---|---|
| 文本生成图像 | Seedream 5.0 Lite | prompt, reference_images |
| 文本生成视频 | Vidu Q3 Pro | prompt, duration |
| 图像生成视频 | Vidu Q3 Pro | prompt, images (URL) |
| TTS | MiniMax Speech 2.8 | text, voice_id, speed |
| STT | GLM ASR | file (URL or base64) |
所有异步任务都会返回一个 task_id,用于跟踪从 TASK_STATUS_QUEUED 到 TASK_STATUS_SUCCEED 的状态。
name: novita-multimodal
description: |
Execute multimodal tasks using Novita AI: text-to-image, image-to-image, text-to-video, image-to-video, TTS, STT.
Use for: generating images, generating videos, text-to-speech, speech recognition.
Novita AI Multimodal Execution
Configuration (choose one, by priority)
Method 1: Config File (Recommended)
Create file ~/.novita/config.json:
{
"api_key": "YOUR_API_KEY"
}
One command setup:
mkdir -p ~/.novita && echo '{"api_key": "YOUR_API_KEY"}' > ~/.novita/config.json
Method 2: Environment Variable
export NOVITA_API_KEY="YOUR_API_KEY"
Method 3: Direct Parameter
Include in request: Please use API Key sk_xxx to generate an image...
API Key Reading Logic
1. Check if user message contains API Key (starts with sk_)
2. Check config file ~/.novita/config.json
3. Check environment variable NOVITA_API_KEY
4. None found → Return configuration guide
Configuration guide (only shown when not configured):
You have not configured your Novita AI API Key.
Quick setup (copy and run):
mkdir -p ~/.novita && echo '{"api_key": "YOUR_KEY"}' > ~/.novita/config.json
Get Key: https://novita.ai/settings/key-management
Execution Flow (Important!)
User request → Identify task → Get Key → ?? Send prompt first → Execute task → Return result
?? Must Send Progress Prompt First
Before calling the API, you must reply to the user with a message:
?? Got it! Generating your image...
Task type: Text-to-Image
Model: Seedream 5.0 Lite
Estimated time: 5-15 seconds
Estimated cost: ~$0.035
Please wait, will send as soon as it's ready ?
This message must be sent BEFORE executing the API call! This way users know the task is being processed and won't think the system is stuck.
Progress Templates for Different Tasks
Text-to-Image:
?? Got it! Generating your image...
Model: Seedream 5.0 Lite
Estimated time: 5-15 seconds
Text-to-Video:
?? Got it! Generating your video...
Model: Vidu Q3 Pro
Estimated time: 1-3 minutes (video generation is slower, please be patient)
TTS:
?? Got it! Generating your audio...
Model: MiniMax Speech 2.8 Turbo
Estimated time: 5-15 seconds
Completion Response
? Generation complete!
[Image/Video/Audio URL]
Actual cost: $0.035
Video Task Polling Updates
Video generation requires polling, update status every 15 seconds:
?? Video generating...
Current status: Processing
Elapsed: 30 seconds
Estimated remaining: 1-2 minutes
API Configuration
| Setting | Value |
|---|---|
| Base URL | https://api.novita.ai |
| Auth | Authorization: Bearer <API_KEY> |
| Get Key | https://novita.ai/settings/key-management |
Task Types and Endpoints
| Task | Endpoint | Model |
|---|---|---|
| Text-to-Image | /v3/seedream-5.0-lite |
Seedream 5.0 Lite |
| Image Editing | /v3/seedream-5.0-lite |
Seedream 5.0 Lite |
| Text-to-Video | /v3/async/vidu-q3-pro-t2v |
Vidu Q3 Pro |
| Image-to-Video | /v3/async/vidu-q3-pro-i2v |
Vidu Q3 Pro |
| TTS | /v3/async/minimax-speech-2.8-turbo |
MiniMax Speech 2.8 |
| STT | /v3/glm-asr |
GLM ASR |
| Task Query | /v3/async/task-result?task_id=xxx |
- |
Execution Templates
Text-to-Image
curl -X POST "https://api.novita.ai/v3/seedream-5.0-lite" r
-H "Authorization: Bearer $API_KEY" r
-H "Content-Type: application/json" r
-d '{"prompt": "description"}'
Image Editing
curl -X POST "https://api.novita.ai/v3/seedream-5.0-lite" r
-H "Authorization: Bearer $API_KEY" r
-H "Content-Type: application/json" r
-d '{"prompt": "edit instruction", "reference_images": ["image_url"]}'
Text-to-Video
curl -X POST "https://api.novita.ai/v3/async/vidu-q3-pro-t2v" r
-H "Authorization: Bearer $API_KEY" r
-H "Content-Type: application/json" r
-d '{"prompt": "description", "duration": 4}'
Image-to-Video
curl -X POST "https://api.novita.ai/v3/async/vidu-q3-pro-i2v" r
-H "Authorization: Bearer $API_KEY" r
-H "Content-Type: application/json" r
-d '{"prompt": "motion description", "images": ["image_url"]}'
TTS
curl -X POST "https://api.novita.ai/v3/async/minimax-speech-2.8-turbo" r
-H "Authorization: Bearer $API_KEY" r
-H "Content-Type: application/json" r
-d '{
"text": "text to convert",
"voice_setting": {"voice_id": "male-qn-qingse", "speed": 1.0},
"audio_setting": {"format": "mp3"}
}'
Available voices:
- Male:
male-qn-qingse,male-qn-jingying - Female:
female-shaonv,female-yujie
STT
curl -X POST "https://api.novita.ai/v3/glm-asr" r
-H "Authorization: Bearer $API_KEY" r
-H "Content-Type: application/json" r
-d '{"file": "audio_url_or_base64"}'
Task Result Query
curl "https://api.novita.ai/v3/async/task-result?task_id=$TASK_ID" r
-H "Authorization: Bearer $API_KEY"
Status: TASK_STATUS_QUEUED → TASK_STATUS_PROCESSING → TASK_STATUS_SUCCEED
Error Handling
| Code | Meaning | Action |
|---|---|---|
| 401 | Invalid Key | Check configuration |
| 402 | Insufficient balance | Top up at https://novita.ai/billing |
| 429 | Rate limited | Wait and retry |
Pricing
https://novita.ai/pricing