当前位置: 首页 > Skill >

AI Image & Video Generation

AI Image & Video Generation

AI Image & Video Generation

使用 VibeVideo API 生成图片和视频。当用户请求创建 AI 图片或视频、查询生成状态、列出可用模型等时使用。

1.0.3 2026.11.17 303
获取Skill文件查看使用说明
作 者:沈言 许可证: 更新时间:2026.11.17
本文目录展开

VibeVideo Generation Skill

Prerequisites

  • Environment variable VIBEVIDEO_API_KEY must be set with a valid API key
  • Get your API key from: Dashboard → Settings → API Keys

API Endpoint

This skill always uses the official VibeVideo API endpoint: https://vibevideo.app

Generate Image

Create an image generation task:

curl -s -X POST https://vibevideo.app/api/ai/generate 
  -H "Authorization: Bearer $VIBEVIDEO_API_KEY" 
  -H "Content-Type: application/json" 
  -d '{
    "mediaType": "image",
    "scene": "text-to-image",
    "model": "nano-banana-2",
    "prompt": "A cat sitting on a rainbow",
    "options": {
      "aspect_ratio": "1:1",
      "quality": "2K"
    }
  }'

For image-to-image, set "scene": "image-to-image" and add "image_url": "..." in options.

Response:

{ "code": 0, "data": { "id": "task_id", "status": "pending", "taskId": "...", "costCredits": 5 } }

Generate Video

Create a video generation task:

curl -s -X POST https://vibevideo.app/api/ai/generate 
  -H "Authorization: Bearer $VIBEVIDEO_API_KEY" 
  -H "Content-Type: application/json" 
  -d '{
    "mediaType": "video",
    "scene": "text-to-video",
    "model": "seedance-2-0",
    "prompt": "A dog playing in a park",
    "options": {
      "resolution": "720p",
      "duration": "5s",
      "aspect_ratio": "16:9"
    }
  }'

For image-to-video, set "scene": "image-to-video" and add "image_url": "..." in options. For frames-to-video, add "start_image_url": "..." and "end_image_url": "..." in options.

Query Task Status

Tasks are asynchronous. Poll until status is success, failed, or canceled:

curl -s -X POST https://vibevideo.app/api/ai/query 
  -H "Authorization: Bearer $VIBEVIDEO_API_KEY" 
  -H "Content-Type: application/json" 
  -d '{ "taskId": "YOUR_TASK_ID" }'

Response includes status, taskInfo, taskResult, and taskUrls (JSON string of media URLs).

Calculate Cost

Check credit cost before generating:

curl -s -X POST https://vibevideo.app/api/ai/cost 
  -H "Authorization: Bearer $VIBEVIDEO_API_KEY" 
  -H "Content-Type: application/json" 
  -d '{
    "model": "seedance-2-0",
    "mediaType": "video",
    "scene": "text-to-video",
    "options": { "resolution": "720p", "duration": "5s" }
  }'

Cancel Task

curl -s -X DELETE https://vibevideo.app/api/ai/tasks/YOUR_TASK_ID 
  -H "Authorization: Bearer $VIBEVIDEO_API_KEY"

Workflow

  1. If the user doesn't specify a model, pick the default for the scene (see tables below)
  2. Call the generate endpoint
  3. Poll the query endpoint every 5 seconds until status is terminal (success/failed/canceled)
  4. Parse taskUrls from the response and report the media URL(s) to the user
  5. If code is not 0, handle the error (see Error Handling below)

Image Models

ID Label Vendor Scenes Qualities
nano-banana-2 Nano Banana 2 Google text-to-image, image-to-image 1K, 2K, 4K
gpt-image-1-5 GPT Image 1.5 OpenAI text-to-image, image-to-image Medium, High
grok-imagine Grok Imagine Grok text-to-image, image-to-image —
seedream-5-0 Seedream 5.0 ByteDance text-to-image, image-to-image Basic, High
qwen-image Qwen Image Qwen text-to-image, image-to-image —
wan-2-7-image Wan 2.7 Image Qwen/Alibaba text-to-image, image-to-image 1K, 2K
wan-2-7-image-pro Wan 2.7 Image Pro Qwen/Alibaba text-to-image, image-to-image 1K, 2K, 4K

Default for text-to-image: nano-banana-2

Video Models

ID Label Vendor Scenes Resolutions Durations
seedance-2-0 Seedance 2.0 ByteDance text-to-video, image-to-video, frames-to-video, reference-to-video 720p, 1080p 5s, 10s, 15s
seedance-2-0-fast Seedance 2.0 Fast ByteDance text-to-video, image-to-video, frames-to-video, reference-to-video 720p, 1080p 5s, 10s, 15s
seedance-1-5-pro Seedance 1.5 Pro ByteDance text-to-video, image-to-video 480p, 720p, 1080p 4s, 8s, 12s
grok-imagine Grok Imagine Grok text-to-video, image-to-video 480p, 720p 6s, 10s, 15s
kling-2-6 Kling 2.6 Kling text-to-video, image-to-video — 5s, 10s
runway Runway Runway text-to-video, image-to-video 720p, 1080p 5s, 10s
veo-3-1 Veo 3.1 Google text-to-video, image-to-video, frames-to-video, reference-to-video 720p, 1080p, 4k —
veo-3-1-fast Veo 3.1 Fast Google text-to-video, image-to-video, frames-to-video, reference-to-video 720p, 1080p, 4k —
seedence-1-0-pro Seedence 1.0 Pro ByteDance text-to-video, image-to-video 480p, 720p, 1080p 5s, 10s
seedence-1-0-pro-fast Seedence 1.0 Pro Fast ByteDance image-to-video 720p, 1080p 5s, 10s
seedence-1-0-lite Seedence 1.0 Lite ByteDance text-to-video, image-to-video 480p, 720p, 1080p 5s, 10s

Default for text-to-video: seedance-2-0

Error Handling

  • code: -1 with "no auth": User's API key is missing or invalid. Remind them to set VIBEVIDEO_API_KEY.
  • code: -1002 with "insufficient credits": User needs to purchase credits at VibeVideo dashboard.
  • code: -1 with "invalid": Wrong model ID, scene, or mediaType. Check against the model tables above.
  • Task stuck in "processing": Polling timeout. The task may still complete — suggest the user wait and query again later.

API Response Envelope

All endpoints return:

{ "code": 0, "message": "ok", "data": { ... } }

code: 0 means success. Non-zero code means error (check message).

推荐文章

更多
PHP时间戳与日期字符串相互转换方法详解

本文介绍PHP中时间数值(Unix时间戳)与日期字符串之间的相互转换方法。通过strtotime和date函数,实现将当前时间、指定日期转换为时间戳,以及将时间戳格式化为可读的日期时间字符串,并提供相关在线计算工具推荐。

2025.11.30 1,016
PHP跨域配置:怎么安全地允许指定域名而非使用通配符

在 PHP 中安全地允许指定域名跨域,核心是解析请求头中的 Origin ,验证其是否在白名单内,然后动态设置 Access-Control-Allow-Origin 响应头。不要使用通配符 * ,也不要硬编码单一域名。

2025.03.29 1,004
JavaScript中利用replace结合正则实现replaceAll效果

JavaScript原生仅支持replace()进行单次或全局替换,缺乏类似Java的replaceAll()便捷方法。本文总结四种在JS中实现全量替换的方案:使用带g标志的正则、带gm标志的正则、扩展String原型以及split后join。通过对比代码示例,展示各方法的实现细节与适用场景,帮助开发者根据需求选择最优解。

2025.04.29 1,002
PHP日期转时间戳时区偏差怎么解决

在 PHP 中将日期字符串转换为时间戳时,若未显式指定时区,默认使用脚本配置的 date.timezone 或系统时区。当服务器时区与业务逻辑预期(如 UTC )不一致时,会产生偏差。解决核心是确保输入字符串携带明确时区信息,或在转换前统一设置时区上下文。

2026.10.24 1,001
PHP集成RabbitMQ实现消息队列的完整步骤

使用 php-amqplib 库,通过建立连接、声明交换机与队列并绑定,即可在 PHP 中实现消息的发送与消费。

2026.05.24 1,001
Apache开启.htaccess及使用方法详解

本文介绍如何在本地Apache环境中启用.htaccess文件,主要涉及修改httpd.conf中的AllowOverride参数。同时详细解析.htaccess的多种实用功能,包括自定义错误页面、目录密码保护、IP访问限制、URL自动转向、默认首页设置以及防止图片盗链等配置方法,并分析了使用.htaccess对服务器性能和安全性的潜在影响。

2026.05.09 1,001
Skill 文件
  • SKILL.md
    • VibeVideo Generation Skill
    • Prerequisites
    • API Endpoint
    • Generate Image
    • Generate Video
    • Query Task Status
    • Calculate Cost
    • Cancel Task
    • Workflow
    • Image Models
    • Video Models
    • Error Handling
    • API Response Envelope
  • 项目或源文件

相关 Skill

更多
Pixshop CLI — AI Image & Video Generation Pixshop CLI — AI Image & Video Generation Pixshop CLI 命令行工具 — AI 图片/视频生成、编辑工具、应用市场、提示词库 / Pixshop CLI — command-line AI image/video generation, editing tools, apps, prompts. Use when user wants to ge...
Media.io AI Image & Video Generation API Media.io AI Image & Video Generation API 通过Media.io OpenAPI生成和编辑AI图像及视频,支持文生图、图生图、文生视频、图生视频及查询任务状态等功能。
service-qa-coach service-qa-coach Review support quality for chat, email, phone, social DM, or marketplace service teams. Use when a team needs a QA scorecard, failure-mode analysis, coaching plan, calibration checklist, or service-improvement brief without live ticketing, CRM, or contact-center system access.
高中数学作业批改助手 高中数学作业批改助手 >图片识别 直接读取学生手写作答照片,识别公式、符号、步骤 🧮 自动推导 根据题目自动生成参考答案和评分细则,无需教师预设 📊 逐步给分 每个关键步骤独立评分,体现过程分 📝 结构化报告 输出含识别内容、参考答案、逐步评分、改进建议的完整报告 🗂 批量批改 支持一次性批改多道题,最终汇总得分表
Vibration Analysis Vibration Analysis 分析来自CMS趋势、RMS/峰值、频谱及SCADA报警的风机传动链(主轴、齿轮箱、发电机)振动数据。