---
title: &quot;RunAPI 経由で Hermes Agent に Wan を使う — 動画・画像 API ガイド&quot;
url: &quot;https://runapi.ai/ja/hermes-wan.md&quot;
canonical: &quot;https://runapi.ai/ja/hermes-wan&quot;
locale: &quot;ja&quot;
model: &quot;wan&quot;
---

# Hermes Agent で Wan を使う。

Wan は Alibaba のオープンソース動画・画像生成モデルで、Apache 2.0 ライセンスのもと Artificial Analysis のテキスト→動画リーダーボードで第 1 位にランクされています。Wan 2.2 から 2.7 まで 20 以上のバリアントを揃え —— テキスト→動画、画像→動画、リップシンク付き音声→動画、R2V による動画編集、最高 4K の画像生成に対応します。Hermes Agent はチャットと同じ RunAPI カスタム provider と APIキーで任意の Wan エンドポイントを呼び出します。

## API example

```bash
curl -X POST https://runapi.ai/api/v1/task/text_to_video \
  -H &quot;Authorization: Bearer $RUNAPI_API_KEY&quot; \
  -H &quot;Content-Type: application/json&quot; \
  -d &#39;{
    &quot;model&quot;: &quot;wan-2.7-text-to-video&quot;,
    &quot;prompt&quot;: &quot;A drone shot rising over terraced rice paddies at golden hour, mist rolling through the valleys, slow upward camera tilt&quot;,
    &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;wan-2.7-text-to-video&quot;
}

```

## How it works

1. **Configure RunAPI** — Set RUNAPI_API_KEY in the environment where Hermes Agent runs. If you already added RunAPI as a custom:runapi provider, the same key and base_url handle all Wan endpoints — no additional setup needed.
2. **Call a Wan endpoint** — Send a POST request to text_to_video with model set to wan-2.7-text-to-video and output_resolution to 720p or 1080p. For image-to-video, use wan-2.7-image-to-video with a first_frame_image_url. For speech-driven video, use wan-2.2-a14b-speech-to-video-turbo with source_audio_url and source_image_url. Hermes Agent routes all requests through the custom:runapi provider.
3. **Poll for the result** — The endpoint returns a task_id immediately. Poll the task status endpoint until the status is completed, then read the output video or image URL from the response. RunAPI SDKs and the CLI handle polling automatically.

## Parameters

| Parameter | Type | Description |
|-----------|------|-------------|
| `model` | `string` | Required. wan-2.7-text-to-video, wan-2.6-text-to-video, wan-2.5-text-to-video, wan-2.2-a14b-text-to-video-turbo, or wan-2.7-r2v. |
| `prompt` | `string` | Required. Text description of the desired video scene, including camera motion, lighting, and subject detail. |
| `output_resolution` | `string` | Optional. 720p or 1080p for Wan 2.5+. Wan 2.2 also accepts 480p and 580p. Defaults to 720p. |
| `aspect_ratio` | `string` | Optional. For wan-2.7-r2v only. Accepted values: 16:9, 9:16, 1:1, 4:3, 3:4. |
| `duration_seconds` | `integer` | Optional. For wan-2.7-r2v only. Video length in seconds, 2 to 10. |
| `seed` | `integer` | Optional. Reproducibility seed for deterministic output. |
| `callback_url` | `string` | Optional. Webhook URL that receives a POST when the task completes. |

## FAQ

### Which Wan endpoints can I call from Hermes Agent?

All of them. text_to_video, image_to_video, speech_to_video, text_to_image (Wan 2.7 Image), edit_video, and animate. Configure RunAPI as a custom:runapi provider once, then switch endpoints and model slugs per request — for example wan-2.7-text-to-video for video and wan-2.7-image for image generation up to 4K.

### How do I configure RunAPI as a custom provider in Hermes Agent for Wan?

Add a custom:runapi provider entry with base_url set to https://runapi.ai/v1 and your RUNAPI_API_KEY as the API key. Once configured, every Wan endpoint — and all 113+ RunAPI models — is accessible through the same provider without additional plugins.

### What is the difference between Wan 2.5, 2.6, and 2.7?

Wan 2.5 introduced 1080p output. Wan 2.6 added video editing (R2V) and flash variants for faster generation. Wan 2.7 adds image generation (wan-2.7-image, wan-2.7-image-pro up to 4K), video editing (wan-2.7-edit-video), and improved text-to-video quality that leads the Artificial Analysis leaderboard.

### What does a real project actually cost with Wan credits?

Costs vary by variant and resolution. A 720p text-to-video clip with Wan 2.7 runs about 25-35 cents per generation. 1080p costs more. Speech-to-video is priced per generation regardless of length. Check the RunAPI pricing page for exact per-model rates -- credits on RunAPI do not expire.

### Can Hermes Agent use Wan&#39;s speech-to-video alongside TTS models?

Yes. Hermes Agent can chain ElevenLabs TTS to generate speech audio, then pass the audio URL to Wan&#39;s speech-to-video endpoint, creating a complete text-to-spoken-video pipeline in one workflow.


## Links

- [Hermes Agent セットアップガイド →](https://runapi.ai/ja/hermes-agent)
- [Wan on RunAPI →](https://runapi.ai/ja/models/wan)
- [Model catalog](https://runapi.ai/ja/models)
- [API docs](https://runapi.ai/ja/docs)
