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

# 接口概览

> SenseAudio 开放平台全模态 API 接口速览

export const PlatformLink = ({href, children}) => {
  const MOBILE_MAX_WIDTH = 768;
  const TOAST_TEXT = '为了更好的支付体验，请在电脑端进行操作';
  const TOAST_DURATION_MS = 2400;
  const [toastVisible, setToastVisible] = useState(false);
  const hideTimerRef = useRef(0);
  useEffect(() => {
    return () => {
      if (hideTimerRef.current) clearTimeout(hideTimerRef.current);
    };
  }, []);
  const handleClick = event => {
    const isMobile = typeof window !== 'undefined' && window.matchMedia(`(max-width: ${MOBILE_MAX_WIDTH - 1}px)`).matches;
    if (!isMobile) return;
    event.preventDefault();
    event.stopPropagation();
    setToastVisible(true);
    if (hideTimerRef.current) clearTimeout(hideTimerRef.current);
    hideTimerRef.current = window.setTimeout(() => {
      setToastVisible(false);
    }, TOAST_DURATION_MS);
  };
  return <>
      <a href={href} onClick={handleClick} target="_blank" rel="noreferrer" className="text-primary">
        {children}
      </a>
      {toastVisible && <div role="status" aria-live="polite" className="fixed left-1/2 bottom-20 -translate-x-1/2 max-w-[calc(100vw-32px)] px-5 py-3 bg-black/85 text-white text-sm leading-normal rounded-lg shadow-lg z-[99999] text-center pointer-events-none">
          {TOAST_TEXT}
        </div>}
    </>;
};

SenseAudio 开放平台提供覆盖**文本、语音、图像、视频、音乐、智能体**六大方向的 RESTful API。所有接口采用统一的鉴权方式与错误语义，开发者可基于本页快速定位所需能力。

## 服务地址

所有接口均在以下地址提供服务：

```
https://api.senseaudio.cn
```

## 鉴权

所有接口均使用 **Bearer Token** 鉴权，请在请求头中携带您的 API Key：

```http theme={null}
Authorization: Bearer <Your_API_Key>
```

API Key 的创建与管理详见 [快速接入](/guides/account/quick-access)，或直接前往 [SenseAudio API 平台 API 密钥](https://senseaudio.cn/api-platform/api-key)。

## 接口分组

<CardGroup cols={2}>
  <Card title="语音合成" icon="waveform-lines" href="/api-reference/endpoint/tts/synthesize">
    将文本合成为富有情感的 AI 语音，支持多情绪、多风格、多音字纠正、公式朗读。
  </Card>

  <Card title="语音识别" icon="ear" href="/api-reference/endpoint/asr/transcriptions">
    音频转写、质检分析与历史记录查询，覆盖通用、极速、语义、整编、质检五档模型。
  </Card>

  <Card title="人声分离" icon="headphones" href="/api-reference/endpoint/voice-isolation/sync">
    上传音频并分离人声，支持同步返回结果或异步轮询任务状态。
  </Card>

  <Card title="文本生成" icon="sparkles" href="/api-reference/endpoint/llm/chat">
    兼容 OpenAI / Anthropic 协议的多模态大模型接口，支持对话、消息与响应三种风格。
  </Card>

  <Card title="图片生成" icon="image" href="/api-reference/endpoint/image/sync">
    同步 / 异步图片生成与任务状态查询，覆盖常规尺寸与高分辨率输出。
  </Card>

  <Card title="音乐生成" icon="music" href="/api-reference/endpoint/music/song-create">
    歌词生成与完整歌曲合成，支持风格控制、结构化歌词与纯音乐模式。
  </Card>

  <Card title="视频生成" icon="video" href="/api-reference/endpoint/video/create">
    视频生成服务面向短视频创作、营销素材制作、内容可视化和创意分镜生成等场景。
  </Card>

  <Card title="实时智能体" icon="robot" href="/api-reference/endpoint/realtime/invoke">
    实时语音对话式智能体，支持会话邀请、状态查询与离会。
  </Card>

  <Card title="自定义智能体" icon="cog" href="/api-reference/endpoint/custom-agent/create">
    创建、更新、查询与删除自定义智能体，可绑定 LLM 模型与系统音色。
  </Card>
</CardGroup>

## 全部接口一览

### 语音合成

| 接口                                                            | 方法        | 路径              |
| ------------------------------------------------------------- | --------- | --------------- |
| [语音合成 HTTP](/api-reference/endpoint/tts/synthesize)           | POST      | `/v1/t2a_v2`    |
| [语音合成 HTTP 流式](/api-reference/endpoint/tts/synthesize-stream) | POST      | `/v1/t2a_v2`    |
| [语音合成 WebSocket](/api-reference/endpoint/tts/websocket)       | WebSocket | `/ws/v1/t2a_v2` |

### 音色

| 接口                                           | 方法   | 路径              |
| -------------------------------------------- | ---- | --------------- |
| [查询可用音色](/api-reference/endpoint/voice/list) | POST | `/v1/get_voice` |

### 语音识别

| 接口                                                      | 方法        | 路径                            |
| ------------------------------------------------------- | --------- | ----------------------------- |
| [语音识别转写](/api-reference/endpoint/asr/transcriptions)    | POST      | `/v1/audio/transcriptions`    |
| [语音识别 WebSocket](/api-reference/endpoint/asr/websocket) | WebSocket | `/ws/v1/audio/transcriptions` |
| [音频质量检测](/api-reference/endpoint/asr/analysis)          | POST      | `/v1/audio/analysis`          |
| [语音识别历史](/api-reference/endpoint/asr/records)           | GET       | `/v1/audio/records`           |

### 人声分离

| 接口                                                          | 方法   | 路径                      |
| ----------------------------------------------------------- | ---- | ----------------------- |
| [同步人声分离](/api-reference/endpoint/voice-isolation/sync)      | POST | `/v1/isolation/sync`    |
| [异步人声分离](/api-reference/endpoint/voice-isolation/async)     | POST | `/v1/isolation/async`   |
| [查询人声分离任务](/api-reference/endpoint/voice-isolation/pending) | GET  | `/v1/isolation/pending` |

### 文本生成

| 接口                                                          | 方法   | 路径                     |
| ----------------------------------------------------------- | ---- | ---------------------- |
| [对话（Chat）API](/api-reference/endpoint/llm/chat)             | POST | `/v1/chat/completions` |
| [消息（Messages）](/api-reference/endpoint/llm/messages)        | POST | `/v1/messages`         |
| [模型响应（Responses）API](/api-reference/endpoint/llm/responses) | POST | `/v1/responses`        |

### 图片生成

| 接口                                              | 方法   | 路径                  |
| ----------------------------------------------- | ---- | ------------------- |
| [同步图片生成](/api-reference/endpoint/image/sync)    | POST | `/v1/image/sync`    |
| [异步图片生成](/api-reference/endpoint/image/async)   | POST | `/v1/image/async`   |
| [查询图片任务](/api-reference/endpoint/image/pending) | GET  | `/v1/image/pending` |

### 音乐生成

| 接口                                                   | 方法   | 路径                                 |
| ---------------------------------------------------- | ---- | ---------------------------------- |
| [歌词生成](/api-reference/endpoint/music/lyrics-create)  | POST | `/v1/music/lyrics/create`          |
| [歌曲生成](/api-reference/endpoint/music/song-create)    | POST | `/v1/music/song/create`            |
| [查询歌曲任务](/api-reference/endpoint/music/song-pending) | GET  | `/v1/music/song/pending/{task_id}` |

### 视频生成

| 接口                                               | 方法   | 路径                    |
| ------------------------------------------------ | ---- | --------------------- |
| [创建视频生成任务](/api-reference/endpoint/video/create) | POST | `/v1/video/create`    |
| [查询视频生成状态](/api-reference/endpoint/video/status) | GET  | `/v1/video/{task_id}` |

### 实时智能体

| 接口                                                     | 方法   | 路径                    |
| ------------------------------------------------------ | ---- | --------------------- |
| [获取 Agent 列表](/api-reference/endpoint/realtime/agents) | GET  | `/v1/realtime/agents` |
| [创建实时会话](/api-reference/endpoint/realtime/invoke)      | POST | `/v1/realtime/invoke` |
| [查询 Agent 状态](/api-reference/endpoint/realtime/status) | GET  | `/v1/realtime/status` |
| [停止实时会话](/api-reference/endpoint/realtime/leave)       | POST | `/v1/realtime/leave`  |

### 自定义智能体

| 接口                                                          | 方法     | 路径                     |
| ----------------------------------------------------------- | ------ | ---------------------- |
| [创建自定义 Agent](/api-reference/endpoint/custom-agent/create)  | POST   | `/v1/agent`            |
| [更新自定义 Agent](/api-reference/endpoint/custom-agent/update)  | PUT    | `/v1/agent/{agent_id}` |
| [获取自定义 Agent 列表](/api-reference/endpoint/custom-agent/list) | GET    | `/v1/agents`           |
| [删除自定义 Agent](/api-reference/endpoint/custom-agent/delete)  | DELETE | `/v1/agent/{agent_id}` |

## 通用约定

* **请求格式**：除文件上传外，均使用 `application/json` 作为请求体格式
* **响应格式**：所有响应均为 `application/json`，UTF-8 编码
* **幂等与重试**：对于耗时较长的生成类任务（图片异步、视频、音乐），创建接口会返回 `task_id`，请通过对应的状态查询接口轮询结果
* **错误码**：HTTP 状态码遵循标准语义；响应体中包含 `code` 与 `message` 字段描述错误详情

## 相关资源

<CardGroup cols={2}>
  <Card title="快速接入" icon="rocket" href="/guides/account/quick-access">
    获取 API Key 并完成首个请求。
  </Card>

  <Card title="模型列表" icon="list" href="/guides/account/model-list">
    浏览全部可调用模型与能力概览。
  </Card>

  <Card title="API 计费" icon="credit-card" href="/guides/account/billing">
    查看各项 API 的积分消耗规则。
  </Card>

  <Card title="常见问题" icon="circle-question" href="/guides/faq/overview">
    接入过程中的常见问题解答。
  </Card>
</CardGroup>
