阅读时间:1 分钟
0 字

模型 API

模型 API 用于在服务商之下创建具体模型配置。

常见接口

  • GET /ai/model
  • POST /ai/model
  • GET /ai/model/{id}
  • PUT /ai/model/{id}
  • GET /ai/model/options
  • GET /ai/model/functionOptions

字段表

字段是否必填说明
provider_id所属服务商 ID
name模型名称
model远端模型名
type模型类型
code模型标识
active是否启用
description说明
dimensionsEmbedding 维度
options扩展配置
supports_structured_output是否支持结构化输出
quota_type配额类型
quota_tokens配额 Token

常见类型

类型用途
chat智能体主对话模型
embedding知识库向量模型
image图片生成模型
video视频生成模型

创建请求示例

json
{
  "provider_id": 1,
  "name": "主聊天模型",
  "code": "chat_main",
  "model": "deepseek-chat",
  "type": "chat",
  "active": true,
  "description": "默认聊天模型"
}

成功响应示例

json
{
  "id": 1,
  "name": "主聊天模型",
  "code": "chat_main",
  "type": "chat",
  "model": "deepseek-chat",
  "provider_id": 1,
  "active": true
}