---
title: &quot;通过 RunAPI 在爱马仕 (Hermes Agent) 中使用 Runway —— 视频 API 指南&quot;
url: &quot;https://runapi.ai/zh-CN/hermes-runway.md&quot;
canonical: &quot;https://runapi.ai/zh-CN/hermes-runway&quot;
locale: &quot;zh-CN&quot;
model: &quot;runway&quot;
---

# 在 Hermes Agent 中使用 Runway。

Runway Gen-4 可根据文本提示词或首帧图像，以 720p 或 1080p 生成 5 秒或 10 秒的视频。Hermes Agent 通过 RunAPI 自定义端点调用它 —— 一次性配置 custom:runapi，发送带时长和分辨率的 text_to_video，然后轮询获取完成的视频。使用 extend_video 扩展片段，或使用 Runway Aleph 进行视频转视频编辑。

## API example

```bash
curl -X POST https://runapi.ai/api/v1/runway/text_to_video \
  -H &quot;Authorization: Bearer $RUNAPI_API_KEY&quot; \
  -H &quot;Content-Type: application/json&quot; \
  -d &#39;{
    &quot;model&quot;: &quot;runway&quot;,
    &quot;prompt&quot;: &quot;A drone shot rising over a misty mountain lake at sunrise, cinematic lighting&quot;,
    &quot;duration_seconds&quot;: 10,
    &quot;output_resolution&quot;: &quot;1080p&quot;,
    &quot;aspect_ratio&quot;: &quot;16:9&quot;
  }&#39;

```

### Response

```json
{
  &quot;task_id&quot;: &quot;tsk_abc123&quot;,
  &quot;status&quot;: &quot;pending&quot;,
  &quot;model&quot;: &quot;runway&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 handles Runway video requests — no additional provider configuration needed.
2. **Call Runway text_to_video** — Send a POST to the text_to_video endpoint with model set to runway, a prompt, duration_seconds (5 or 10), and output_resolution (720p or 1080p). Hermes Agent can build this request through the custom:runapi provider. Add first_frame_image_url to anchor the opening frame.
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 URL from the response. To extend the clip, call extend_video with the source_task_id.

## Parameters

| Parameter | Type | Description |
|-----------|------|-------------|
| `model` | `string` | Required. Use runway for Gen-4, or runway-aleph for Aleph edit_video. |
| `prompt` | `string` | Required. Text description of the video content — camera motion, scene, lighting. |
| `duration_seconds` | `integer` | Required. Video length: 5 or 10 seconds. |
| `output_resolution` | `string` | Required. Output resolution: 720p or 1080p. Affects pricing. |
| `first_frame_image_url` | `string` | Optional. URL of an image to use as the first frame of the video. |
| `aspect_ratio` | `string` | Optional. Output aspect ratio: 16:9, 9:16, 1:1, 4:3, or 3:4. |
| `callback_url` | `string` | Optional. Webhook URL that receives a POST when the task completes. |

## FAQ

### Can I use Runway video generation in Hermes Agent?

Yes. Hermes Agent can call the RunAPI Runway endpoint through the custom:runapi provider. Set RUNAPI_API_KEY in your environment and send a POST to /api/v1/runway/text_to_video with model set to runway, a prompt, duration, and resolution.

### What is the difference between Runway Gen-4 and Runway Aleph?

Runway Gen-4 (model: runway) handles text_to_video and extend_video — generating new clips from text or images. Runway Aleph (model: runway-aleph) handles edit_video — restyling existing footage with a text prompt and source_video_url. Both run through the same RunAPI key.

### Is Runway good enough for YouTube creators?

Yes. Runway Gen-4 produces production-grade clips with cinematic framing that many YouTubers use for intros, B-rolls, and short ad segments. The 5 or 10 second duration covers most insert-clip needs. For longer sequences, chain multiple generations using first_frame_image_url for continuity.

### How does Hermes Agent handle Runway&#39;s first_frame_image_url parameter?

Include the first_frame_image_url in your request body when calling the Runway endpoint through Hermes Agent. The custom:runapi provider passes it directly. Hermes Agent can also generate the first frame with an image model, then feed the URL to Runway automatically.

### Can Hermes Agent choose between Gen-4 and Aleph models dynamically?

Yes. Hermes Agent can select the Runway model based on your requirements -- Gen-4 for creating new clips from text or images, Aleph for editing and restyling existing footage. Set the model parameter in each request to switch between them.


## Links

- [Hermes Agent 配置指南 →](https://runapi.ai/zh-CN/hermes-agent)
- [Runway on RunAPI →](https://runapi.ai/zh-CN/models/runway)
- [Model catalog](https://runapi.ai/zh-CN/models)
- [API docs](https://runapi.ai/zh-CN/docs)
