> ## Documentation Index
> Fetch the complete documentation index at: https://docs.socialvision.tisyk.xyz/llms.txt
> Use this file to discover all available pages before exploring further.

# Runway 视频接口参考

> Runway Gen-3 视频生成接口

## 查询任务状态

`GET /runwayml/v1/tasks/{task_id}`

根据任务 ID 查询图生视频任务状态与结果。

### 请求参数 (Query / Path)

<ParamField path="task_id" type="string" required>
  提交任务时返回的 id
</ParamField>

### 请求示例 (cURL)

```bash theme={null}
curl "https://socialvision.tisyk.xyz/runwayml/v1/tasks/{task_id}" \
  -H "Authorization: Bearer sk-YOUR_API_KEY"
```

### 响应示例 (200 OK)

```json theme={null}
{
  "batch_id": "",
  "created_at": "2024-12-22T13:38:40.139Z",
  "id": "4665a07c-7641-4809-a133-10786201bb56",
  "prompt": "",
  "state": "pending"
}
```

***

## 图生视频

`POST /runwayml/v1/image_to_video`

以图片为起始帧生成视频。提交后返回任务 `id`，通过 `GET /runwayml/v1/tasks/`{`task_id`}\`\` 轮询。

官方文档：[https://docs.dev.runwayml.com/api/#tag/Start-generating/paths/\~1v1\~1image\_to\_video/post](https://docs.dev.runwayml.com/api/#tag/Start-generating/paths/~1v1~1image_to_video/post)

### 请求体参数 (Body)

<ParamField body="duration" type="integer">
  视频时长（秒）
</ParamField>

<ParamField body="model" type="string" required>
  模型名称
</ParamField>

<ParamField body="promptImage" type="any" required>
  首帧 / 参考图片
</ParamField>

<ParamField body="promptText" type="string">
  运动/内容描述提示词
</ParamField>

<ParamField body="ratio" type="string" required>
  视频宽高比
</ParamField>

<ParamField body="seed" type="integer">
  随机种子
</ParamField>

<ParamField body="watermark" type="boolean">
  是否添加水印
</ParamField>

### 请求示例 (JSON)

```json theme={null}
{
  "duration": 5,
  "model": "gen4_turbo",
  "promptImage": "https://example.com/start-frame.jpg",
  "promptText": "The camera slowly zooms in",
  "ratio": "1280:720"
}
```

### 请求示例 (cURL)

```bash theme={null}
curl -X POST "https://socialvision.tisyk.xyz/runwayml/v1/image_to_video" \
  -H "Authorization: Bearer sk-YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "duration": 5,
  "model": "gen4_turbo",
  "promptImage": "https://example.com/start-frame.jpg",
  "promptText": "The camera slowly zooms in",
  "ratio": "1280:720"
}'
```

### 响应示例 (200 OK)

```json theme={null}
{
  "batch_id": "",
  "created_at": "2024-12-22T13:38:40.139Z",
  "id": "4665a07c-7641-4809-a133-10786201bb56",
  "prompt": "",
  "state": "pending"
}
```

***


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.