/minimalist/api/**/doc.html)/api/**)都需要通过API Key进行鉴权认证。76caed4ead074de39d6b6a4d9b41f6d9(用于测试和演示)AgentResponse 基类,确保统一的响应结构。{
"errorMessage": "成功",
"code": 0,
"aboutUrl": "https://framefuture.com/",
"traceId": "1234567890abcdef",
// ... 其他业务字段
}errorMessage:错误信息,成功时为"成功"code:业务状态码,0表示成功,非0表示失败aboutUrl:帮助链接,指向官网traceId:链路追踪ID,用 于日志追踪和问题排查{
"errorMessage": "成功",
"code": 0,
"aboutUrl": "https://framefuture.com/",
"traceId": "a1b2c3d4e5f6",
"images": [
{
"url": "https://cdn.example.com/processed/image1.jpg",
"width": 800,
"height": 600,
"format": "jpg",
"size": 102400
}
],
"processingTime": 1500
}{
"errorMessage": "参数错误:图片URL不能为空",
"code": 400,
"aboutUrl": "https://framefuture.com/",
"traceId": "a1b2c3d4e5f6"
}{
"errorMessage": "成功",
"code": 0,
"aboutUrl": "https://framefuture.com/",
"traceId": "a1b2c3d4e5f6",
"total": 100,
"size": 10,
"current": 1,
"records": [
// 数据列表
]
}total:总记录数size:每页大小current:当前页码records:当前页数据列表| 错误码 | 说明 | 描述 |
|---|---|---|
| 200 | SUCCESS | 操作成功 |
| 400 | PARAM_ERROR | 参数错误 |
| 401 | REQUEST_UNAUTH | 用户认证失败,请重新登录 |
| 403 | NO_OPERATION_PERMISSION | 暂无操作权限 |
| 500 | FAILED | 系统异常,请稍后再试 |
| 503 | RESUBMIT_ERROR | 请求已提交,请稍后重试 |
| 错误码 | 说明 | 描述 |
|---|---|---|
| 400 | PARAM_XSS_ERROR | 存在敏感数据,不能提交 |
| 400 | TAMPER_WITH_DATA | 请勿篡改数据 |
BusinessException 抛出:IllegalArgumentException:非法参数MethodArgumentNotValidException:请求体参数验证失败ConstraintViolationException:方法参数验证失败MissingServletRequestParameterException:缺少必需的请求参数{
"code": 400,
"errorMessage": "images: 图片列表不能为空,width: 宽度必须大于0",
"aboutUrl": "https://framefuture.com/",
"traceId": "a1b2c3d4e5f6"
}{
"code": 401,
"errorMessage": "用户认证失败,请重新登录",
"aboutUrl": "https://framefuture.com/",
"traceId": "a1b2c3d4e5f6"
}BusinessException:自定义业务异常{
"code": 500,
"errorMessage": "文件处理失败:不支持的文件格式",
"aboutUrl": "https://framefuture.com/",
"traceId": "a1b2c3d4e5f6"
}{
"code": 400,
"errorMessage": "存在敏感数据,不能提交",
"aboutUrl": "https://framefuture.com/",
"traceId": "a1b2c3d4e5f6"
}{
"code": 500,
"errorMessage": "系统异常,请稍后再试",
"aboutUrl": "https://framefuture.com/",
"traceId": "a1b2c3d4e5f6"
}{
"code": 400,
"errorMessage": "images: 图片列表不能为空,width: 宽度必须大于0",
"aboutUrl": "https://framefuture.com/",
"traceId": "a1b2c3d4e5f6"
}PARAM_XSS_ERROR 错误{
"code": 500,
"errorMessage": "请求过于频繁,该接口每APIKEY每秒请求不能超过10次,请稍后再试",
"aboutUrl": "https://framefuture.com/",
"traceId": "a1b2c3d4e5f6"
}a1b2c3d4e5f6g7h8){
"errorMessage": "成功",
"code": 0,
"traceId": "a1b2c3d4e5f6",
...
}POST /api/image/process{
"errorMessage": "成功",
"code": 0,
"aboutUrl": "https://framefuture.com/",
"traceId": "a1b2c3d4e5f6",
"images": [
{
"url": "https://cdn.example.com/processed/image1.jpg",
"width": 800,
"height": 600,
"format": "jpg",
"size": 102400
},
{
"url": "https://cdn.example.com/processed/image2.jpg",
"width": 800,
"height": 600,
"format": "jpg",
"size": 98304
}
],
"processingTime": 1500
}POST /api/subtitle/generate{
"errorMessage": "成功",
"code": 0,
"aboutUrl": "https://framefuture.com/",
"traceId": "b2c3d4e5f6g7",
"subtitleUrl": "https://cdn.example.com/subtitle.srt",
"duration": 120.5,
"wordCount": 256
}GET /api/random/generate{
"errorMessage": "成功",
"code": 0,
"aboutUrl": "https://framefuture.com/",
"traceId": "c3d4e5f6g7h8",
"randomNumber": 42.68,
"max": 100,
"min": 0,
"scale": 2
}code 字段判断成功/失败errorMessage 给用户traceId 便于问题反馈/doc.html{base_url}/doc.html{base_url}/v3/api-docs| 版本 | 日期 | 说明 |
|---|---|---|
| 1.0.0 | 2025-11-25 | 初始版本,包含基础API规范说明 |