---
title: &quot;RunAPI 経由で Hermes Agent から Kling を使う — 動画 API ガイド&quot;
url: &quot;https://runapi.ai/ja/hermes-kling.md&quot;
canonical: &quot;https://runapi.ai/ja/hermes-kling&quot;
locale: &quot;ja&quot;
model: &quot;kling&quot;
---

# Hermes Agent で Kling を使う。

Kuaishou の Kling 3.0 は、テキストまたは画像から最大 1080p の動画を生成し、ネイティブ音声、マルチショットシーン、3〜15秒の尺に対応します。Hermes Agent は custom:runapi プロバイダを使って RunAPI 経由で呼び出します——チャット用に設定したものと同じキーとベース URL を使用します。

## API example

```bash
curl -X POST https://runapi.ai/api/v1/kling/text_to_video \
  -H &quot;Authorization: Bearer $RUNAPI_API_KEY&quot; \
  -H &quot;Content-Type: application/json&quot; \
  -d &#39;{
    &quot;model&quot;: &quot;kling-3.0&quot;,
    &quot;prompt&quot;: &quot;A drone shot pulling back from a mountain lake at sunrise, mist rising off the water, cinematic lighting&quot;,
    &quot;duration_seconds&quot;: 5,
    &quot;aspect_ratio&quot;: &quot;16:9&quot;,
    &quot;enable_sound&quot;: true,
    &quot;output_resolution&quot;: &quot;1080p&quot;
  }&#39;

```

### Response

```json
{
  &quot;task_id&quot;: &quot;tsk_abc123&quot;,
  &quot;status&quot;: &quot;pending&quot;,
  &quot;model&quot;: &quot;kling-3.0&quot;
}

```

## How it works

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.
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.
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.

## Parameters

| Parameter | Type | Description |
|-----------|------|-------------|
| `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. |

## FAQ

### How does Kling per-second billing work on RunAPI?

Kling charges per second of generated video. The rate depends on output_resolution and whether enable_sound is on. A 5-second 720p clip without sound is the cheapest option; 1080p with sound costs roughly twice as much per second. Check the RunAPI pricing page for exact rates.

### Is Kling better than Runway for longer clips?

Kling supports 3 to 15 seconds per clip (and multi-shot sequences up to 3 minutes), while Runway caps at 5 or 10 seconds. For scene-length footage, Kling gives you more flexibility. Runway tends to produce cleaner cinematic framing on shorter clips.

### Can I use other Kling versions besides 3.0?

Yes. RunAPI also hosts kling-v2.5-turbo-text-to-video-pro and kling-v2.5-turbo-image-to-video-pro for faster, lower-cost generation at 5 or 10 seconds. Set the model parameter to the version slug you want.

### Does Hermes Agent need a separate provider for Kling video?

No. If you already configured the custom:runapi provider in Hermes Agent for chat or image generation, the same base_url and API key work for Kling video endpoints. Just change the request path and model parameter.

### What happens if Kling generation fails -- am I still charged?

No. RunAPI only bills for completed generations. If the task fails or times out, the reserved credits are rolled back to your account balance.

### How does Hermes Agent manage Kling&#39;s multi-shot video generation?

Hermes Agent calls the Kling endpoint with scene descriptions and camera control parameters through the custom:runapi provider. For multi-shot sequences, the agent can chain multiple generation calls and manage continuity between shots.

### Can Hermes Agent combine Kling video with audio generation models?

Yes. Hermes Agent can orchestrate Kling for video and then call ElevenLabs or Suno through RunAPI to add voiceover or background music, assembling the complete package in one workflow.


## Links

- [Hermes Agent セットアップガイド →](https://runapi.ai/ja/hermes-agent)
- [Kling モデル →](https://runapi.ai/ja/models/kling)
- [Model catalog](https://runapi.ai/ja/models)
- [API docs](https://runapi.ai/ja/docs)
