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

# Introduction

# Hub 简介

**Hub** 是 Mountsea 的**优质 AI 网关** —— 一套统一接口接入全球顶尖的图像、视频、音频和语音转写模型。

<Tip>
  **一个能力一个端点，多种模型可选。** 切换模型无需改代码，只需修改请求体中的 `model` 字段。
</Tip>

## 为什么选择 Hub？

<CardGroup cols={3}>
  <Card title="官方旗舰画质" icon="award">
    **只接入官方旗舰模型**，绝无山寨版或蒸馏精简版。Veo 3.1、Nano Banana Pro、GPT Image 2、Kling v3 Pro、WAN 2.7、Seedance 2.0、ElevenLabs Music —— **完全等同于官方** 的模型权重与输出质量。
  </Card>

  <Card title="生产级稳定" icon="shield-check">
    专为 **7×24 生产流量** 设计：多区域智能路由、自动故障切换、瞬时错误透明重试、按队列感知的负载均衡。**不再担心** 突发限流、上游抖动、配额墙等问题。
  </Card>

  <Card title="比官方更实惠" icon="circle-dollar-to-slot">
    **只为成功的生成结果付费**，按统一积分计费，单价**显著低于** 直接调用官方接口。无单家供应商的起步门槛、无月费、失败任务**完全免费**。
  </Card>
</CardGroup>

### 对比一览

|          | Hub                                                  | 直连各家官方                                             |
| -------- | ---------------------------------------------------- | -------------------------------------------------- |
| **模型**   | 4 大能力的官方旗舰模型一站接入 —— 图像 / 视频 / 音频 / 转写                | 需注册并维护 6+ 个账号（Google、OpenAI、快手、阿里、字节、ElevenLabs …） |
| **价格**   | **低于官方零售价**，仅在 `status=completed` 时扣费 —— **失败任务零成本** | 按官方零售价付费，绝大多数厂商**失败也扣额度**                          |
| **稳定性**  | 多通道智能路由 + 自动重试，瞬时错误对你透明                              | 单点故障；重试逻辑与限流处理需自行实现                                |
| **接入成本** | 一个 Bearer Token、一个 Base URL、一份统一积分                   | 各家独立 Key、独立账单、独立 SDK                               |
| **运维成本** | 我们负责新增模型 / 替换下线模型的路由                                 | 需自行跟踪每家供应商的弃用通知与迁移成本                               |

<Tip>
  **同样的产出，更低的价格。** Hub 将你的请求转发到原厂的旗舰接口，**返回内容与你直连原厂完全一致**，只是享受了 Hub 的折扣价并自带稳定性保障。
</Tip>

## 核心能力

<CardGroup cols={2}>
  <Card title="图像生成" icon="image" href="/zh/api-reference/hub/image">
    **Nano Banana** (Fast / 2 / Pro) + **GPT Image 2** —— 文生图与图像编辑
  </Card>

  <Card title="视频生成" icon="video" href="/zh/api-reference/hub/video">
    **Veo 3.1** · **Kling v3** · **WAN 2.7** · **Seedance 2.0** —— 文生视频、图生视频、多参考图、首尾帧、视频编辑
  </Card>

  <Card title="音频（音乐）" icon="music" href="/zh/api-reference/hub/audio">
    **ElevenLabs Music** —— 文本生成音乐，可控长度与纯器乐开关
  </Card>

  <Card title="语音转写" icon="microphone" href="/zh/api-reference/hub/transcribe">
    **Whisper / Wizper** —— 音视频转写与翻译
  </Card>
</CardGroup>

## Hub 调用模式

所有 Hub 任务都遵循同样的简单流程：提交任务 → 获取 `task_id` → 轮询直到 `ready=true`。

<Steps>
  <Step title="发现可用模型（可选）">
    调用 `GET /hub/v1/models?capability=image|video|audio|transcribe` 查看某能力下的全部模型。
    对单个模型 `GET /hub/v1/models/:model` 可返回完整的 `input_schema` 和可直接复制使用的 `example` 示例。
  </Step>

  <Step title="提交任务">
    `POST /hub/v1/{image|video|audio|transcribe}`，传入 `{ model, input }`，返回 `{ task_id }`。
  </Step>

  <Step title="轮询结果">
    `GET /hub/v1/tasks/:task_id` —— 每 3-5 秒轮询一次，直到 `ready=true`，结果在 `data` 中。
  </Step>
</Steps>

## 精选模型

<Tip>
  每个接口页（图像 / 视频 / 音频）的顶部都内置了**交互式模型参考**——按能力分组的标签页，点击模型名即可展开完整参数表与可直接复制的请求示例。不再需要滚动浏览又长又平的列表。
</Tip>

### 🖼️ 图像

| 模型                | 提供商    | 能力   | 亮点                              |
| ----------------- | ------ | ---- | ------------------------------- |
| `nano-banana`     | Google | 文生图  | Gemini 2.5 Flash Image —— 快速且经济 |
| `nano-banana-2`   | Google | 文生图  | Gemini 3.1 —— 极端宽高比（1:8 / 8:1）  |
| `nano-banana-pro` | Google | 文生图  | Gemini 3 Pro —— 工作室级画质，最高 4K    |
| `gpt-image-2`     | OpenAI | 文生图  | 细节丰富，文字排版精细                     |
| `*-edit` 变体       | —      | 图像编辑 | 通过参考图 URL 编辑现有图像                |

### 🎬 视频

| 模型                            | 提供商    | 能力     | 亮点                      |
| ----------------------------- | ------ | ------ | ----------------------- |
| `veo-3.1` / `-fast` / `-lite` | Google | 文生视频   | 原生音频，4s / 6s / 8s，最高 4K |
| `veo-3.1-image`               | Google | 图生视频   | 让单张参考图动起来               |
| `veo-3.1-ref`                 | Google | 多参考图   | 多张图保持人物/物体一致            |
| `veo-3.1-first-last`          | Google | 首尾帧    | 两帧之间生成过渡视频              |
| `kling-v3-pro` / `-standard`  | 快手     | 文/图生视频 | 3-15 秒，原生音频，多镜头         |
| `wan-2.7`                     | 阿里     | 文生视频   | 高质量，默认 1080p            |
| `wan-2.7-image`               | 阿里     | 图生视频   | 首尾帧、音频驱动                |
| `wan-2.7-ref`                 | 阿里     | 参考图视频  | 多主体参考                   |
| `wan-2.7-edit`                | 阿里     | 视频到视频  | 基于指令的视频编辑               |
| `seedance-2.0` / `-fast`      | 字节     | 文/图生视频 | 电影感、原生音频、物理感            |

### 🎵 音频（音乐）

| 模型                 | 提供商        | 能力   | 亮点                     |
| ------------------ | ---------- | ---- | ---------------------- |
| `elevenlabs-music` | ElevenLabs | 音乐生成 | 文本生成音乐，3 秒-10 分钟，可选纯器乐 |

### 🎙️ 语音转写

| 模型               | 提供商 | 能力      | 亮点                     |
| ---------------- | --- | ------- | ---------------------- |
| Whisper / Wizper | —   | 转写 / 翻译 | BCP-47 语言代码，词级 / 句段时间戳 |

> 使用 `GET /hub/v1/models?capability=transcribe` 获取最新列表。

***

## 快速示例 —— 图像

```bash theme={null}
# 1. 提交
curl -X POST "https://api.mountsea.ai/hub/v1/image" \
  -H "Authorization: Bearer your-api-key" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "nano-banana-pro",
    "input": {
      "prompt": "A photorealistic black labrador swimming, half above water, half underwater",
      "resolution": "2K",
      "aspect_ratio": "1:1"
    }
  }'
# → { "task_id": "hub-xxxxxxxx-..." }

# 2. 轮询
curl -H "Authorization: Bearer your-api-key" \
  "https://api.mountsea.ai/hub/v1/tasks/hub-xxxxxxxx-..."
```

## 快速示例 —— 视频

```bash theme={null}
curl -X POST "https://api.mountsea.ai/hub/v1/video" \
  -H "Authorization: Bearer your-api-key" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "veo-3.1-fast",
    "input": {
      "prompt": "Cinematic drone shot flying through ancient stone ruins at golden hour",
      "duration": "8s",
      "resolution": "720p",
      "aspect_ratio": "16:9",
      "generate_audio": true
    }
  }'
```

## 快速示例 —— 音乐

```bash theme={null}
curl -X POST "https://api.mountsea.ai/hub/v1/audio" \
  -H "Authorization: Bearer your-api-key" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "elevenlabs-music",
    "input": {
      "prompt": "Uplifting lo-fi hip-hop with mellow piano and vinyl crackle",
      "music_length_ms": 30000
    }
  }'
```

## 快速示例 —— 转写

```bash theme={null}
curl -X POST "https://api.mountsea.ai/hub/v1/transcribe" \
  -H "Authorization: Bearer your-api-key" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "whisper-v3",
    "input": {
      "audio_url": "https://example.com/audio.mp3",
      "language": "en",
      "timestamps": "word"
    }
  }'
```

***

## 端点速览

| 端点                        | 方法   | 说明                         |
| ------------------------- | ---- | -------------------------- |
| `/hub/v1/image`           | POST | 提交图像生成 / 编辑任务              |
| `/hub/v1/video`           | POST | 提交视频生成 / 编辑任务              |
| `/hub/v1/audio`           | POST | 提交音乐生成任务                   |
| `/hub/v1/transcribe`      | POST | 提交转写 / 翻译任务                |
| `/hub/v1/tasks/{task_id}` | GET  | 查询任务状态与结果                  |
| `/hub/v1/models`          | GET  | 列出所有模型（可按能力筛选）             |
| `/hub/v1/models/{model}`  | GET  | 获取单个模型完整 input schema + 示例 |

## 任务状态

| 状态           | 含义                                        |
| ------------ | ----------------------------------------- |
| `pending`    | 已入队，等待 worker                             |
| `processing` | 正在执行                                      |
| `completed`  | ✅ 完成 —— `data` 中包含结果                      |
| `failed`     | ❌ 失败 —— 查看 `error_code` / `error_message` |
| `timeout`    | 超过处理时间限制                                  |
| `cancelled`  | 已被用户或系统取消                                 |

<Tip>
  建议轮询间隔：**3-5 秒**。生成的资源保留 **两周** —— 请及时下载。
</Tip>

## 鉴权

所有端点均需 Bearer Token 鉴权：

```
Authorization: Bearer your-api-key
```

## Base URL

```
https://api.mountsea.ai
```

***

### 浏览 API 文档

* [提交图像任务](image) —— Nano Banana、GPT Image 2（含编辑变体）
* [提交视频任务](video) —— Veo 3.1、Kling v3、WAN 2.7、Seedance 2.0
* [提交音频任务](audio) —— ElevenLabs Music
* [提交转写任务](transcribe) —— Whisper / Wizper
* [轮询任务结果](task) —— 获取任务状态与结果
* [列出模型](models) —— 浏览全部可用模型
* [获取模型详情](model-detail) —— 查看 input schema 与示例
