Add docs for api backend
This commit is contained in:
66
api/docs/index.md
Normal file
66
api/docs/index.md
Normal file
@@ -0,0 +1,66 @@
|
||||
# API 文档索引
|
||||
|
||||
本文档描述 AI-VideoAssistant 项目的后端 API 接口规范。
|
||||
|
||||
## 目录
|
||||
|
||||
| 模块 | 文件 | 说明 |
|
||||
|------|------|------|
|
||||
| 小助手 | [assistant.md](./assistant.md) | AI 助手管理 |
|
||||
| 模型接入 | [model-access.md](./model-access.md) | LLM/ASR/TTS 模型配置 |
|
||||
| 语音识别 | [speech-recognition.md](./speech-recognition.md) | ASR 模型配置 |
|
||||
| 声音资源 | [voice-resources.md](./voice-resources.md) | TTS 声音库管理 |
|
||||
| 历史记录 | [history-records.md](./history-records.md) | 通话记录和转写 |
|
||||
|
||||
---
|
||||
|
||||
## 基础信息
|
||||
|
||||
- **Base URL**: `http://localhost:8000/api/v1`
|
||||
- **认证方式**: Bearer Token (预留)
|
||||
- **Content-Type**: application/json
|
||||
|
||||
---
|
||||
|
||||
## 状态码说明
|
||||
|
||||
| 状态码 | 说明 |
|
||||
|--------|------|
|
||||
| 200 | 成功 |
|
||||
| 201 | 创建成功 |
|
||||
| 400 | 请求参数错误 |
|
||||
| 401 | 未认证 |
|
||||
| 403 | 无权限 |
|
||||
| 404 | 资源不存在 |
|
||||
| 500 | 服务器错误 |
|
||||
|
||||
---
|
||||
|
||||
## 通用响应格式
|
||||
|
||||
### 成功响应
|
||||
|
||||
```json
|
||||
{
|
||||
"data": { ... }
|
||||
}
|
||||
```
|
||||
|
||||
### 错误响应
|
||||
|
||||
```json
|
||||
{
|
||||
"detail": "错误描述"
|
||||
}
|
||||
```
|
||||
|
||||
### 列表响应
|
||||
|
||||
```json
|
||||
{
|
||||
"total": 100,
|
||||
"page": 1,
|
||||
"limit": 20,
|
||||
"list": [ ... ]
|
||||
}
|
||||
```
|
||||
Reference in New Issue
Block a user