HERMES + KLING

在 Hermes Agent 中使用 Kling。

Kuaishou 推出的 Kling 3.0 可从文本或图像生成最高 1080p 的视频,支持原生音频、多镜头场景以及 3–15 秒时长。Hermes Agent 通过 custom:runapi 提供方使用 RunAPI 调用它——与你为聊天配置的密钥和基础 URL 相同。

一个 API 密钥 · 文生视频 + 图生视频 · 按秒计费
通过 Hermes Agent 使用 RunAPI 借助 Kling 3.0 生成视频。

要求:
- 使用 Hermes Agent 中已配置的 custom:runapi 提供方
- 调用 POST https://runapi.ai/api/v1/kling/text_to_video
- 将 model 设置为 "kling-3.0"
- RUNAPI_API_KEY 环境变量提供授权
- 设置 duration_seconds 控制时长(3–15 秒)
- 将 aspect_ratio 设置为 "16:9" 以生成横向视频
- 使用 enable_sound: true 启用原生音频
- 响应是异步的——轮询任务状态端点直到任务完成,然后获取视频 URL
curl -X POST https://runapi.ai/api/v1/kling/text_to_video \
  -H "Authorization: Bearer $RUNAPI_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "kling-3.0",
    "prompt": "A drone shot pulling back from a mountain lake at sunrise, mist rising off the water, cinematic lighting",
    "duration_seconds": 5,
    "aspect_ratio": "16:9",
    "enable_sound": true,
    "output_resolution": "1080p"
  }'
{
  "task_id": "tsk_abc123",
  "status": "pending",
  "model": "kling-3.0"
}
复制 curl 命令进行测试 kling
工作原理

三步在 Hermes Agent 中使用 Kling

1

Configure RunAPI

Set the RUNAPI_API_KEY environment variable. If you already added RunAPI as a custom:runapi provider in Hermes Agent for chat, the same key and base_url work for video generation — no extra configuration needed.

export RUNAPI_API_KEY=runapi_xxx
2

Call Kling text_to_video

Send a POST to /api/v1/kling/text_to_video with model set to kling-3.0. Include a prompt, duration_seconds (3–15), aspect_ratio, and optionally enable_sound for native audio. For image-driven generation, use /api/v1/kling/image_to_video with a first_frame_image_url instead.

POST /api/v1/kling/text_to_video
3

Poll for the result

The endpoint returns a task_id immediately. Poll the task status endpoint until the status changes to completed, then retrieve the video URL from the response. Generation typically takes 30–120 seconds depending on duration and resolution.

GET /api/v1/kling/text_to_video/tsk_abc123
参数

Kling text_to_video API 参数

参数 类型 说明
model string Required. kling-3.0 for the latest version.
prompt string Video description. Required unless multi_shots is enabled.
duration_seconds integer Video length. Kling 3.0 supports 3–15 seconds. Older versions accept 5 or 10.
aspect_ratio string Output aspect ratio: 16:9, 9:16, or 1:1.
output_resolution string Resolution: 720p, 1080p, or 4k. Higher resolution costs more per second.
enable_sound boolean Generate native audio alongside video. Increases per-second cost.
negative_prompt string Elements to exclude from generation.
first_frame_image_url string Image URL to use as the opening frame (single-shot mode).
cfg_scale number Guidance scale (0–1). Higher values follow the prompt more closely.
multi_shots boolean Enable multi-shot scene generation with separate prompts per segment.

Hermes Agent 上的 Kling 是什么?

快手的 Kling 3.0 能生成角色一致、运动物理出色的电影级短片——布料垂感、流体动力学和写实镜头运动。通过 Hermes Agent 的 custom:runapi provider,可实现最高 1080p、带原生音频的文生视频和图生视频,单次生成时长 3 至 15 秒(多镜头模式最长 3 分钟)。

Kling 使用场景

长叙事内容

使用 Kling 的多镜头模式构建最长 3 分钟的场景级素材,在各段落间保持一致的视觉效果,串联空镜和角色序列。

旅游与自然内容

生成旅游 vlog B-roll 和自然素材,写实环境渲染效果出色。Kling 在处理水面、薄雾和大气光效等户外场景时表现尤为突出。

产品演示视频

将产品图像动画化为带镜头运动和自然光线过渡的短视频——适用于电商列表和社交广告。

常见问题

Kling + Hermes Agent 常见问题

Hermes Agent 通用配置

尚未配置?请从 Hermes Agent 的 RunAPI 配置指南开始。

Hermes Agent 配置指南 →

Kling 模型目录

查看所有 Kling 版本、定价层级和 API 文档。

Kling 模型 →

立即在 Hermes Agent 中试用 Kling。

免费获取 RunAPI 密钥,配置 custom:runapi 提供方,即可开始使用 Kling 3.0 生成视频。