9027 lines
307 KiB
JSON
9027 lines
307 KiB
JSON
{
|
||
"schemes": [
|
||
"http",
|
||
"https"
|
||
],
|
||
"swagger": "2.0",
|
||
"info": {
|
||
"description": "EasyAI AI Gateway 的本地鉴权、平台模型管理、定价、运行策略、钱包和 AI 任务接口。\n受保护接口使用 Authorization: Bearer \u003cJWT 或 API Key\u003e,管理接口只接受 JWT 用户凭证。",
|
||
"title": "EasyAI AI Gateway API",
|
||
"contact": {},
|
||
"version": "0.1.0"
|
||
},
|
||
"basePath": "/",
|
||
"paths": {
|
||
"/api/admin/access-rules": {
|
||
"get": {
|
||
"security": [
|
||
{
|
||
"BearerAuth": []
|
||
}
|
||
],
|
||
"description": "管理端返回用户组、租户、用户或 API Key 到平台、平台模型、基础模型的访问规则。",
|
||
"produces": [
|
||
"application/json"
|
||
],
|
||
"tags": [
|
||
"access-rules"
|
||
],
|
||
"summary": "列出访问规则",
|
||
"responses": {
|
||
"200": {
|
||
"description": "OK",
|
||
"schema": {
|
||
"$ref": "#/definitions/httpapi.AccessRuleListResponse"
|
||
}
|
||
},
|
||
"401": {
|
||
"description": "Unauthorized",
|
||
"schema": {
|
||
"$ref": "#/definitions/httpapi.ErrorEnvelope"
|
||
}
|
||
},
|
||
"403": {
|
||
"description": "Forbidden",
|
||
"schema": {
|
||
"$ref": "#/definitions/httpapi.ErrorEnvelope"
|
||
}
|
||
},
|
||
"500": {
|
||
"description": "Internal Server Error",
|
||
"schema": {
|
||
"$ref": "#/definitions/httpapi.ErrorEnvelope"
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"post": {
|
||
"security": [
|
||
{
|
||
"BearerAuth": []
|
||
}
|
||
],
|
||
"description": "管理端创建一条访问控制规则。",
|
||
"consumes": [
|
||
"application/json"
|
||
],
|
||
"produces": [
|
||
"application/json"
|
||
],
|
||
"tags": [
|
||
"access-rules"
|
||
],
|
||
"summary": "创建访问规则",
|
||
"parameters": [
|
||
{
|
||
"description": "访问规则请求",
|
||
"name": "input",
|
||
"in": "body",
|
||
"required": true,
|
||
"schema": {
|
||
"$ref": "#/definitions/store.AccessRuleInput"
|
||
}
|
||
}
|
||
],
|
||
"responses": {
|
||
"201": {
|
||
"description": "Created",
|
||
"schema": {
|
||
"$ref": "#/definitions/store.AccessRule"
|
||
}
|
||
},
|
||
"400": {
|
||
"description": "Bad Request",
|
||
"schema": {
|
||
"$ref": "#/definitions/httpapi.ErrorEnvelope"
|
||
}
|
||
},
|
||
"401": {
|
||
"description": "Unauthorized",
|
||
"schema": {
|
||
"$ref": "#/definitions/httpapi.ErrorEnvelope"
|
||
}
|
||
},
|
||
"403": {
|
||
"description": "Forbidden",
|
||
"schema": {
|
||
"$ref": "#/definitions/httpapi.ErrorEnvelope"
|
||
}
|
||
},
|
||
"409": {
|
||
"description": "Conflict",
|
||
"schema": {
|
||
"$ref": "#/definitions/httpapi.ErrorEnvelope"
|
||
}
|
||
},
|
||
"500": {
|
||
"description": "Internal Server Error",
|
||
"schema": {
|
||
"$ref": "#/definitions/httpapi.ErrorEnvelope"
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/api/admin/access-rules/batch": {
|
||
"post": {
|
||
"security": [
|
||
{
|
||
"BearerAuth": []
|
||
}
|
||
],
|
||
"description": "管理端为同一主体批量新增、更新或删除资源访问规则。",
|
||
"consumes": [
|
||
"application/json"
|
||
],
|
||
"produces": [
|
||
"application/json"
|
||
],
|
||
"tags": [
|
||
"access-rules"
|
||
],
|
||
"summary": "批量写入访问规则",
|
||
"parameters": [
|
||
{
|
||
"description": "访问规则批量请求",
|
||
"name": "input",
|
||
"in": "body",
|
||
"required": true,
|
||
"schema": {
|
||
"$ref": "#/definitions/store.AccessRuleBatchInput"
|
||
}
|
||
}
|
||
],
|
||
"responses": {
|
||
"200": {
|
||
"description": "OK",
|
||
"schema": {
|
||
"$ref": "#/definitions/httpapi.AccessRuleListResponse"
|
||
}
|
||
},
|
||
"400": {
|
||
"description": "Bad Request",
|
||
"schema": {
|
||
"$ref": "#/definitions/httpapi.ErrorEnvelope"
|
||
}
|
||
},
|
||
"401": {
|
||
"description": "Unauthorized",
|
||
"schema": {
|
||
"$ref": "#/definitions/httpapi.ErrorEnvelope"
|
||
}
|
||
},
|
||
"403": {
|
||
"description": "Forbidden",
|
||
"schema": {
|
||
"$ref": "#/definitions/httpapi.ErrorEnvelope"
|
||
}
|
||
},
|
||
"500": {
|
||
"description": "Internal Server Error",
|
||
"schema": {
|
||
"$ref": "#/definitions/httpapi.ErrorEnvelope"
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/api/admin/access-rules/{ruleID}": {
|
||
"delete": {
|
||
"security": [
|
||
{
|
||
"BearerAuth": []
|
||
}
|
||
],
|
||
"description": "管理端删除一条访问控制规则。",
|
||
"produces": [
|
||
"application/json"
|
||
],
|
||
"tags": [
|
||
"access-rules"
|
||
],
|
||
"summary": "删除访问规则",
|
||
"parameters": [
|
||
{
|
||
"type": "string",
|
||
"description": "访问规则 ID",
|
||
"name": "ruleID",
|
||
"in": "path",
|
||
"required": true
|
||
}
|
||
],
|
||
"responses": {
|
||
"204": {
|
||
"description": "No Content"
|
||
},
|
||
"401": {
|
||
"description": "Unauthorized",
|
||
"schema": {
|
||
"$ref": "#/definitions/httpapi.ErrorEnvelope"
|
||
}
|
||
},
|
||
"403": {
|
||
"description": "Forbidden",
|
||
"schema": {
|
||
"$ref": "#/definitions/httpapi.ErrorEnvelope"
|
||
}
|
||
},
|
||
"404": {
|
||
"description": "Not Found",
|
||
"schema": {
|
||
"$ref": "#/definitions/httpapi.ErrorEnvelope"
|
||
}
|
||
},
|
||
"500": {
|
||
"description": "Internal Server Error",
|
||
"schema": {
|
||
"$ref": "#/definitions/httpapi.ErrorEnvelope"
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"patch": {
|
||
"security": [
|
||
{
|
||
"BearerAuth": []
|
||
}
|
||
],
|
||
"description": "管理端更新一条访问控制规则。",
|
||
"consumes": [
|
||
"application/json"
|
||
],
|
||
"produces": [
|
||
"application/json"
|
||
],
|
||
"tags": [
|
||
"access-rules"
|
||
],
|
||
"summary": "更新访问规则",
|
||
"parameters": [
|
||
{
|
||
"type": "string",
|
||
"description": "访问规则 ID",
|
||
"name": "ruleID",
|
||
"in": "path",
|
||
"required": true
|
||
},
|
||
{
|
||
"description": "访问规则请求",
|
||
"name": "input",
|
||
"in": "body",
|
||
"required": true,
|
||
"schema": {
|
||
"$ref": "#/definitions/store.AccessRuleInput"
|
||
}
|
||
}
|
||
],
|
||
"responses": {
|
||
"200": {
|
||
"description": "OK",
|
||
"schema": {
|
||
"$ref": "#/definitions/store.AccessRule"
|
||
}
|
||
},
|
||
"400": {
|
||
"description": "Bad Request",
|
||
"schema": {
|
||
"$ref": "#/definitions/httpapi.ErrorEnvelope"
|
||
}
|
||
},
|
||
"401": {
|
||
"description": "Unauthorized",
|
||
"schema": {
|
||
"$ref": "#/definitions/httpapi.ErrorEnvelope"
|
||
}
|
||
},
|
||
"403": {
|
||
"description": "Forbidden",
|
||
"schema": {
|
||
"$ref": "#/definitions/httpapi.ErrorEnvelope"
|
||
}
|
||
},
|
||
"404": {
|
||
"description": "Not Found",
|
||
"schema": {
|
||
"$ref": "#/definitions/httpapi.ErrorEnvelope"
|
||
}
|
||
},
|
||
"409": {
|
||
"description": "Conflict",
|
||
"schema": {
|
||
"$ref": "#/definitions/httpapi.ErrorEnvelope"
|
||
}
|
||
},
|
||
"500": {
|
||
"description": "Internal Server Error",
|
||
"schema": {
|
||
"$ref": "#/definitions/httpapi.ErrorEnvelope"
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/api/admin/audit-logs": {
|
||
"get": {
|
||
"security": [
|
||
{
|
||
"BearerAuth": []
|
||
}
|
||
],
|
||
"description": "管理端按分类、动作、目标类型和目标 ID 查询审计日志。",
|
||
"produces": [
|
||
"application/json"
|
||
],
|
||
"tags": [
|
||
"billing"
|
||
],
|
||
"summary": "列出审计日志",
|
||
"parameters": [
|
||
{
|
||
"type": "string",
|
||
"description": "审计分类",
|
||
"name": "category",
|
||
"in": "query"
|
||
},
|
||
{
|
||
"type": "string",
|
||
"description": "审计动作",
|
||
"name": "action",
|
||
"in": "query"
|
||
},
|
||
{
|
||
"type": "string",
|
||
"description": "目标类型",
|
||
"name": "targetType",
|
||
"in": "query"
|
||
},
|
||
{
|
||
"type": "string",
|
||
"description": "目标 ID",
|
||
"name": "targetId",
|
||
"in": "query"
|
||
},
|
||
{
|
||
"type": "integer",
|
||
"default": 100,
|
||
"description": "返回数量",
|
||
"name": "limit",
|
||
"in": "query"
|
||
}
|
||
],
|
||
"responses": {
|
||
"200": {
|
||
"description": "OK",
|
||
"schema": {
|
||
"$ref": "#/definitions/httpapi.AuditLogListResponse"
|
||
}
|
||
},
|
||
"400": {
|
||
"description": "Bad Request",
|
||
"schema": {
|
||
"$ref": "#/definitions/httpapi.ErrorEnvelope"
|
||
}
|
||
},
|
||
"401": {
|
||
"description": "Unauthorized",
|
||
"schema": {
|
||
"$ref": "#/definitions/httpapi.ErrorEnvelope"
|
||
}
|
||
},
|
||
"403": {
|
||
"description": "Forbidden",
|
||
"schema": {
|
||
"$ref": "#/definitions/httpapi.ErrorEnvelope"
|
||
}
|
||
},
|
||
"500": {
|
||
"description": "Internal Server Error",
|
||
"schema": {
|
||
"$ref": "#/definitions/httpapi.ErrorEnvelope"
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/api/admin/catalog/base-models": {
|
||
"get": {
|
||
"description": "返回基础模型目录;公共路径和管理路径返回同一结构。",
|
||
"produces": [
|
||
"application/json"
|
||
],
|
||
"tags": [
|
||
"catalog"
|
||
],
|
||
"summary": "列出基础模型",
|
||
"responses": {
|
||
"200": {
|
||
"description": "OK",
|
||
"schema": {
|
||
"$ref": "#/definitions/httpapi.BaseModelListResponse"
|
||
}
|
||
},
|
||
"500": {
|
||
"description": "Internal Server Error",
|
||
"schema": {
|
||
"$ref": "#/definitions/httpapi.ErrorEnvelope"
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"post": {
|
||
"security": [
|
||
{
|
||
"BearerAuth": []
|
||
}
|
||
],
|
||
"description": "管理端新增基础模型目录项,providerKey、providerModelName 和 modelType 必填。",
|
||
"consumes": [
|
||
"application/json"
|
||
],
|
||
"produces": [
|
||
"application/json"
|
||
],
|
||
"tags": [
|
||
"catalog"
|
||
],
|
||
"summary": "创建基础模型",
|
||
"parameters": [
|
||
{
|
||
"description": "基础模型请求",
|
||
"name": "input",
|
||
"in": "body",
|
||
"required": true,
|
||
"schema": {
|
||
"$ref": "#/definitions/store.BaseModelInput"
|
||
}
|
||
}
|
||
],
|
||
"responses": {
|
||
"201": {
|
||
"description": "Created",
|
||
"schema": {
|
||
"$ref": "#/definitions/store.BaseModel"
|
||
}
|
||
},
|
||
"400": {
|
||
"description": "Bad Request",
|
||
"schema": {
|
||
"$ref": "#/definitions/httpapi.ErrorEnvelope"
|
||
}
|
||
},
|
||
"401": {
|
||
"description": "Unauthorized",
|
||
"schema": {
|
||
"$ref": "#/definitions/httpapi.ErrorEnvelope"
|
||
}
|
||
},
|
||
"403": {
|
||
"description": "Forbidden",
|
||
"schema": {
|
||
"$ref": "#/definitions/httpapi.ErrorEnvelope"
|
||
}
|
||
},
|
||
"409": {
|
||
"description": "Conflict",
|
||
"schema": {
|
||
"$ref": "#/definitions/httpapi.ErrorEnvelope"
|
||
}
|
||
},
|
||
"500": {
|
||
"description": "Internal Server Error",
|
||
"schema": {
|
||
"$ref": "#/definitions/httpapi.ErrorEnvelope"
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/api/admin/catalog/base-models/reset-all": {
|
||
"post": {
|
||
"security": [
|
||
{
|
||
"BearerAuth": []
|
||
}
|
||
],
|
||
"description": "将所有具备系统默认快照的基础模型恢复为默认配置。",
|
||
"produces": [
|
||
"application/json"
|
||
],
|
||
"tags": [
|
||
"catalog"
|
||
],
|
||
"summary": "重置全部基础模型",
|
||
"responses": {
|
||
"200": {
|
||
"description": "OK",
|
||
"schema": {
|
||
"$ref": "#/definitions/httpapi.BaseModelListResponse"
|
||
}
|
||
},
|
||
"401": {
|
||
"description": "Unauthorized",
|
||
"schema": {
|
||
"$ref": "#/definitions/httpapi.ErrorEnvelope"
|
||
}
|
||
},
|
||
"403": {
|
||
"description": "Forbidden",
|
||
"schema": {
|
||
"$ref": "#/definitions/httpapi.ErrorEnvelope"
|
||
}
|
||
},
|
||
"500": {
|
||
"description": "Internal Server Error",
|
||
"schema": {
|
||
"$ref": "#/definitions/httpapi.ErrorEnvelope"
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/api/admin/catalog/base-models/{baseModelID}": {
|
||
"delete": {
|
||
"security": [
|
||
{
|
||
"BearerAuth": []
|
||
}
|
||
],
|
||
"description": "管理端删除基础模型目录项。",
|
||
"produces": [
|
||
"application/json"
|
||
],
|
||
"tags": [
|
||
"catalog"
|
||
],
|
||
"summary": "删除基础模型",
|
||
"parameters": [
|
||
{
|
||
"type": "string",
|
||
"description": "基础模型 ID",
|
||
"name": "baseModelID",
|
||
"in": "path",
|
||
"required": true
|
||
}
|
||
],
|
||
"responses": {
|
||
"204": {
|
||
"description": "No Content"
|
||
},
|
||
"401": {
|
||
"description": "Unauthorized",
|
||
"schema": {
|
||
"$ref": "#/definitions/httpapi.ErrorEnvelope"
|
||
}
|
||
},
|
||
"403": {
|
||
"description": "Forbidden",
|
||
"schema": {
|
||
"$ref": "#/definitions/httpapi.ErrorEnvelope"
|
||
}
|
||
},
|
||
"404": {
|
||
"description": "Not Found",
|
||
"schema": {
|
||
"$ref": "#/definitions/httpapi.ErrorEnvelope"
|
||
}
|
||
},
|
||
"500": {
|
||
"description": "Internal Server Error",
|
||
"schema": {
|
||
"$ref": "#/definitions/httpapi.ErrorEnvelope"
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"patch": {
|
||
"security": [
|
||
{
|
||
"BearerAuth": []
|
||
}
|
||
],
|
||
"description": "管理端更新基础模型目录项及能力、图标、默认快照等元数据。",
|
||
"consumes": [
|
||
"application/json"
|
||
],
|
||
"produces": [
|
||
"application/json"
|
||
],
|
||
"tags": [
|
||
"catalog"
|
||
],
|
||
"summary": "更新基础模型",
|
||
"parameters": [
|
||
{
|
||
"type": "string",
|
||
"description": "基础模型 ID",
|
||
"name": "baseModelID",
|
||
"in": "path",
|
||
"required": true
|
||
},
|
||
{
|
||
"description": "基础模型请求",
|
||
"name": "input",
|
||
"in": "body",
|
||
"required": true,
|
||
"schema": {
|
||
"$ref": "#/definitions/store.BaseModelInput"
|
||
}
|
||
}
|
||
],
|
||
"responses": {
|
||
"200": {
|
||
"description": "OK",
|
||
"schema": {
|
||
"$ref": "#/definitions/store.BaseModel"
|
||
}
|
||
},
|
||
"400": {
|
||
"description": "Bad Request",
|
||
"schema": {
|
||
"$ref": "#/definitions/httpapi.ErrorEnvelope"
|
||
}
|
||
},
|
||
"401": {
|
||
"description": "Unauthorized",
|
||
"schema": {
|
||
"$ref": "#/definitions/httpapi.ErrorEnvelope"
|
||
}
|
||
},
|
||
"403": {
|
||
"description": "Forbidden",
|
||
"schema": {
|
||
"$ref": "#/definitions/httpapi.ErrorEnvelope"
|
||
}
|
||
},
|
||
"404": {
|
||
"description": "Not Found",
|
||
"schema": {
|
||
"$ref": "#/definitions/httpapi.ErrorEnvelope"
|
||
}
|
||
},
|
||
"409": {
|
||
"description": "Conflict",
|
||
"schema": {
|
||
"$ref": "#/definitions/httpapi.ErrorEnvelope"
|
||
}
|
||
},
|
||
"500": {
|
||
"description": "Internal Server Error",
|
||
"schema": {
|
||
"$ref": "#/definitions/httpapi.ErrorEnvelope"
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/api/admin/catalog/base-models/{baseModelID}/reset": {
|
||
"post": {
|
||
"security": [
|
||
{
|
||
"BearerAuth": []
|
||
}
|
||
],
|
||
"description": "将指定基础模型恢复为系统默认快照;无默认快照时返回 409。",
|
||
"produces": [
|
||
"application/json"
|
||
],
|
||
"tags": [
|
||
"catalog"
|
||
],
|
||
"summary": "重置基础模型",
|
||
"parameters": [
|
||
{
|
||
"type": "string",
|
||
"description": "基础模型 ID",
|
||
"name": "baseModelID",
|
||
"in": "path",
|
||
"required": true
|
||
}
|
||
],
|
||
"responses": {
|
||
"200": {
|
||
"description": "OK",
|
||
"schema": {
|
||
"$ref": "#/definitions/store.BaseModel"
|
||
}
|
||
},
|
||
"401": {
|
||
"description": "Unauthorized",
|
||
"schema": {
|
||
"$ref": "#/definitions/httpapi.ErrorEnvelope"
|
||
}
|
||
},
|
||
"403": {
|
||
"description": "Forbidden",
|
||
"schema": {
|
||
"$ref": "#/definitions/httpapi.ErrorEnvelope"
|
||
}
|
||
},
|
||
"404": {
|
||
"description": "Not Found",
|
||
"schema": {
|
||
"$ref": "#/definitions/httpapi.ErrorEnvelope"
|
||
}
|
||
},
|
||
"409": {
|
||
"description": "Conflict",
|
||
"schema": {
|
||
"$ref": "#/definitions/httpapi.ErrorEnvelope"
|
||
}
|
||
},
|
||
"500": {
|
||
"description": "Internal Server Error",
|
||
"schema": {
|
||
"$ref": "#/definitions/httpapi.ErrorEnvelope"
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/api/admin/catalog/providers": {
|
||
"get": {
|
||
"description": "返回模型目录使用的供应商元数据;公共路径和管理路径返回同一结构。",
|
||
"produces": [
|
||
"application/json"
|
||
],
|
||
"tags": [
|
||
"catalog"
|
||
],
|
||
"summary": "列出目录供应商",
|
||
"responses": {
|
||
"200": {
|
||
"description": "OK",
|
||
"schema": {
|
||
"$ref": "#/definitions/httpapi.CatalogProviderListResponse"
|
||
}
|
||
},
|
||
"500": {
|
||
"description": "Internal Server Error",
|
||
"schema": {
|
||
"$ref": "#/definitions/httpapi.ErrorEnvelope"
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"post": {
|
||
"security": [
|
||
{
|
||
"BearerAuth": []
|
||
}
|
||
],
|
||
"description": "管理端新增模型目录供应商,providerKey 和 displayName 必填。",
|
||
"consumes": [
|
||
"application/json"
|
||
],
|
||
"produces": [
|
||
"application/json"
|
||
],
|
||
"tags": [
|
||
"catalog"
|
||
],
|
||
"summary": "创建目录供应商",
|
||
"parameters": [
|
||
{
|
||
"description": "目录供应商请求",
|
||
"name": "input",
|
||
"in": "body",
|
||
"required": true,
|
||
"schema": {
|
||
"$ref": "#/definitions/store.CatalogProviderInput"
|
||
}
|
||
}
|
||
],
|
||
"responses": {
|
||
"201": {
|
||
"description": "Created",
|
||
"schema": {
|
||
"$ref": "#/definitions/store.CatalogProvider"
|
||
}
|
||
},
|
||
"400": {
|
||
"description": "Bad Request",
|
||
"schema": {
|
||
"$ref": "#/definitions/httpapi.ErrorEnvelope"
|
||
}
|
||
},
|
||
"401": {
|
||
"description": "Unauthorized",
|
||
"schema": {
|
||
"$ref": "#/definitions/httpapi.ErrorEnvelope"
|
||
}
|
||
},
|
||
"403": {
|
||
"description": "Forbidden",
|
||
"schema": {
|
||
"$ref": "#/definitions/httpapi.ErrorEnvelope"
|
||
}
|
||
},
|
||
"409": {
|
||
"description": "Conflict",
|
||
"schema": {
|
||
"$ref": "#/definitions/httpapi.ErrorEnvelope"
|
||
}
|
||
},
|
||
"500": {
|
||
"description": "Internal Server Error",
|
||
"schema": {
|
||
"$ref": "#/definitions/httpapi.ErrorEnvelope"
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/api/admin/catalog/providers/{providerID}": {
|
||
"delete": {
|
||
"security": [
|
||
{
|
||
"BearerAuth": []
|
||
}
|
||
],
|
||
"description": "管理端删除目录供应商。",
|
||
"produces": [
|
||
"application/json"
|
||
],
|
||
"tags": [
|
||
"catalog"
|
||
],
|
||
"summary": "删除目录供应商",
|
||
"parameters": [
|
||
{
|
||
"type": "string",
|
||
"description": "目录供应商 ID",
|
||
"name": "providerID",
|
||
"in": "path",
|
||
"required": true
|
||
}
|
||
],
|
||
"responses": {
|
||
"204": {
|
||
"description": "No Content"
|
||
},
|
||
"401": {
|
||
"description": "Unauthorized",
|
||
"schema": {
|
||
"$ref": "#/definitions/httpapi.ErrorEnvelope"
|
||
}
|
||
},
|
||
"403": {
|
||
"description": "Forbidden",
|
||
"schema": {
|
||
"$ref": "#/definitions/httpapi.ErrorEnvelope"
|
||
}
|
||
},
|
||
"404": {
|
||
"description": "Not Found",
|
||
"schema": {
|
||
"$ref": "#/definitions/httpapi.ErrorEnvelope"
|
||
}
|
||
},
|
||
"500": {
|
||
"description": "Internal Server Error",
|
||
"schema": {
|
||
"$ref": "#/definitions/httpapi.ErrorEnvelope"
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"patch": {
|
||
"security": [
|
||
{
|
||
"BearerAuth": []
|
||
}
|
||
],
|
||
"description": "管理端更新目录供应商展示信息、图标和元数据。",
|
||
"consumes": [
|
||
"application/json"
|
||
],
|
||
"produces": [
|
||
"application/json"
|
||
],
|
||
"tags": [
|
||
"catalog"
|
||
],
|
||
"summary": "更新目录供应商",
|
||
"parameters": [
|
||
{
|
||
"type": "string",
|
||
"description": "目录供应商 ID",
|
||
"name": "providerID",
|
||
"in": "path",
|
||
"required": true
|
||
},
|
||
{
|
||
"description": "目录供应商请求",
|
||
"name": "input",
|
||
"in": "body",
|
||
"required": true,
|
||
"schema": {
|
||
"$ref": "#/definitions/store.CatalogProviderInput"
|
||
}
|
||
}
|
||
],
|
||
"responses": {
|
||
"200": {
|
||
"description": "OK",
|
||
"schema": {
|
||
"$ref": "#/definitions/store.CatalogProvider"
|
||
}
|
||
},
|
||
"400": {
|
||
"description": "Bad Request",
|
||
"schema": {
|
||
"$ref": "#/definitions/httpapi.ErrorEnvelope"
|
||
}
|
||
},
|
||
"401": {
|
||
"description": "Unauthorized",
|
||
"schema": {
|
||
"$ref": "#/definitions/httpapi.ErrorEnvelope"
|
||
}
|
||
},
|
||
"403": {
|
||
"description": "Forbidden",
|
||
"schema": {
|
||
"$ref": "#/definitions/httpapi.ErrorEnvelope"
|
||
}
|
||
},
|
||
"404": {
|
||
"description": "Not Found",
|
||
"schema": {
|
||
"$ref": "#/definitions/httpapi.ErrorEnvelope"
|
||
}
|
||
},
|
||
"409": {
|
||
"description": "Conflict",
|
||
"schema": {
|
||
"$ref": "#/definitions/httpapi.ErrorEnvelope"
|
||
}
|
||
},
|
||
"500": {
|
||
"description": "Internal Server Error",
|
||
"schema": {
|
||
"$ref": "#/definitions/httpapi.ErrorEnvelope"
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/api/admin/config/network-proxy": {
|
||
"get": {
|
||
"security": [
|
||
{
|
||
"BearerAuth": []
|
||
}
|
||
],
|
||
"description": "管理端查看服务当前使用的全局 HTTP 代理配置及来源。",
|
||
"produces": [
|
||
"application/json"
|
||
],
|
||
"tags": [
|
||
"config"
|
||
],
|
||
"summary": "获取网络代理配置",
|
||
"responses": {
|
||
"200": {
|
||
"description": "OK",
|
||
"schema": {
|
||
"$ref": "#/definitions/httpapi.NetworkProxyConfigResponse"
|
||
}
|
||
},
|
||
"401": {
|
||
"description": "Unauthorized",
|
||
"schema": {
|
||
"$ref": "#/definitions/httpapi.ErrorEnvelope"
|
||
}
|
||
},
|
||
"403": {
|
||
"description": "Forbidden",
|
||
"schema": {
|
||
"$ref": "#/definitions/httpapi.ErrorEnvelope"
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/api/admin/models": {
|
||
"get": {
|
||
"security": [
|
||
{
|
||
"BearerAuth": []
|
||
}
|
||
],
|
||
"description": "管理端返回所有平台模型,并补齐有效计费配置。",
|
||
"produces": [
|
||
"application/json"
|
||
],
|
||
"tags": [
|
||
"platform-models"
|
||
],
|
||
"summary": "列出平台模型",
|
||
"responses": {
|
||
"200": {
|
||
"description": "OK",
|
||
"schema": {
|
||
"$ref": "#/definitions/httpapi.PlatformModelListResponse"
|
||
}
|
||
},
|
||
"401": {
|
||
"description": "Unauthorized",
|
||
"schema": {
|
||
"$ref": "#/definitions/httpapi.ErrorEnvelope"
|
||
}
|
||
},
|
||
"403": {
|
||
"description": "Forbidden",
|
||
"schema": {
|
||
"$ref": "#/definitions/httpapi.ErrorEnvelope"
|
||
}
|
||
},
|
||
"500": {
|
||
"description": "Internal Server Error",
|
||
"schema": {
|
||
"$ref": "#/definitions/httpapi.ErrorEnvelope"
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/api/admin/platform-models": {
|
||
"post": {
|
||
"security": [
|
||
{
|
||
"BearerAuth": []
|
||
}
|
||
],
|
||
"description": "为平台新增一个可路由模型;路径中的 platformID 会覆盖请求体 platformId。",
|
||
"consumes": [
|
||
"application/json"
|
||
],
|
||
"produces": [
|
||
"application/json"
|
||
],
|
||
"tags": [
|
||
"platform-models"
|
||
],
|
||
"summary": "创建平台模型",
|
||
"parameters": [
|
||
{
|
||
"description": "平台模型配置请求",
|
||
"name": "input",
|
||
"in": "body",
|
||
"required": true,
|
||
"schema": {
|
||
"$ref": "#/definitions/store.CreatePlatformModelInput"
|
||
}
|
||
}
|
||
],
|
||
"responses": {
|
||
"201": {
|
||
"description": "Created",
|
||
"schema": {
|
||
"$ref": "#/definitions/store.PlatformModel"
|
||
}
|
||
},
|
||
"400": {
|
||
"description": "Bad Request",
|
||
"schema": {
|
||
"$ref": "#/definitions/httpapi.ErrorEnvelope"
|
||
}
|
||
},
|
||
"401": {
|
||
"description": "Unauthorized",
|
||
"schema": {
|
||
"$ref": "#/definitions/httpapi.ErrorEnvelope"
|
||
}
|
||
},
|
||
"403": {
|
||
"description": "Forbidden",
|
||
"schema": {
|
||
"$ref": "#/definitions/httpapi.ErrorEnvelope"
|
||
}
|
||
},
|
||
"404": {
|
||
"description": "Not Found",
|
||
"schema": {
|
||
"$ref": "#/definitions/httpapi.ErrorEnvelope"
|
||
}
|
||
},
|
||
"500": {
|
||
"description": "Internal Server Error",
|
||
"schema": {
|
||
"$ref": "#/definitions/httpapi.ErrorEnvelope"
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/api/admin/platform-models/{modelID}": {
|
||
"delete": {
|
||
"security": [
|
||
{
|
||
"BearerAuth": []
|
||
}
|
||
],
|
||
"description": "删除指定平台模型路由配置。",
|
||
"produces": [
|
||
"application/json"
|
||
],
|
||
"tags": [
|
||
"platform-models"
|
||
],
|
||
"summary": "删除平台模型",
|
||
"parameters": [
|
||
{
|
||
"type": "string",
|
||
"description": "平台模型 ID",
|
||
"name": "modelID",
|
||
"in": "path",
|
||
"required": true
|
||
}
|
||
],
|
||
"responses": {
|
||
"204": {
|
||
"description": "No Content"
|
||
},
|
||
"401": {
|
||
"description": "Unauthorized",
|
||
"schema": {
|
||
"$ref": "#/definitions/httpapi.ErrorEnvelope"
|
||
}
|
||
},
|
||
"403": {
|
||
"description": "Forbidden",
|
||
"schema": {
|
||
"$ref": "#/definitions/httpapi.ErrorEnvelope"
|
||
}
|
||
},
|
||
"404": {
|
||
"description": "Not Found",
|
||
"schema": {
|
||
"$ref": "#/definitions/httpapi.ErrorEnvelope"
|
||
}
|
||
},
|
||
"500": {
|
||
"description": "Internal Server Error",
|
||
"schema": {
|
||
"$ref": "#/definitions/httpapi.ErrorEnvelope"
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/api/admin/platforms": {
|
||
"get": {
|
||
"security": [
|
||
{
|
||
"BearerAuth": []
|
||
}
|
||
],
|
||
"description": "管理端返回所有接入平台及其优先级、定价和运行策略摘要。",
|
||
"produces": [
|
||
"application/json"
|
||
],
|
||
"tags": [
|
||
"platforms"
|
||
],
|
||
"summary": "列出平台",
|
||
"responses": {
|
||
"200": {
|
||
"description": "OK",
|
||
"schema": {
|
||
"$ref": "#/definitions/httpapi.PlatformListResponse"
|
||
}
|
||
},
|
||
"401": {
|
||
"description": "Unauthorized",
|
||
"schema": {
|
||
"$ref": "#/definitions/httpapi.ErrorEnvelope"
|
||
}
|
||
},
|
||
"403": {
|
||
"description": "Forbidden",
|
||
"schema": {
|
||
"$ref": "#/definitions/httpapi.ErrorEnvelope"
|
||
}
|
||
},
|
||
"500": {
|
||
"description": "Internal Server Error",
|
||
"schema": {
|
||
"$ref": "#/definitions/httpapi.ErrorEnvelope"
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"post": {
|
||
"security": [
|
||
{
|
||
"BearerAuth": []
|
||
}
|
||
],
|
||
"description": "新增模型供应商平台配置;credentials 会被服务端保存并在返回值中脱敏。",
|
||
"consumes": [
|
||
"application/json"
|
||
],
|
||
"produces": [
|
||
"application/json"
|
||
],
|
||
"tags": [
|
||
"platforms"
|
||
],
|
||
"summary": "创建平台",
|
||
"parameters": [
|
||
{
|
||
"description": "平台配置请求",
|
||
"name": "input",
|
||
"in": "body",
|
||
"required": true,
|
||
"schema": {
|
||
"$ref": "#/definitions/store.CreatePlatformInput"
|
||
}
|
||
}
|
||
],
|
||
"responses": {
|
||
"201": {
|
||
"description": "Created",
|
||
"schema": {
|
||
"$ref": "#/definitions/store.Platform"
|
||
}
|
||
},
|
||
"400": {
|
||
"description": "Bad Request",
|
||
"schema": {
|
||
"$ref": "#/definitions/httpapi.ErrorEnvelope"
|
||
}
|
||
},
|
||
"401": {
|
||
"description": "Unauthorized",
|
||
"schema": {
|
||
"$ref": "#/definitions/httpapi.ErrorEnvelope"
|
||
}
|
||
},
|
||
"403": {
|
||
"description": "Forbidden",
|
||
"schema": {
|
||
"$ref": "#/definitions/httpapi.ErrorEnvelope"
|
||
}
|
||
},
|
||
"500": {
|
||
"description": "Internal Server Error",
|
||
"schema": {
|
||
"$ref": "#/definitions/httpapi.ErrorEnvelope"
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/api/admin/platforms/{platformID}": {
|
||
"delete": {
|
||
"security": [
|
||
{
|
||
"BearerAuth": []
|
||
}
|
||
],
|
||
"description": "删除指定平台及关联配置;不存在时返回 404。",
|
||
"produces": [
|
||
"application/json"
|
||
],
|
||
"tags": [
|
||
"platforms"
|
||
],
|
||
"summary": "删除平台",
|
||
"parameters": [
|
||
{
|
||
"type": "string",
|
||
"description": "平台 ID",
|
||
"name": "platformID",
|
||
"in": "path",
|
||
"required": true
|
||
}
|
||
],
|
||
"responses": {
|
||
"204": {
|
||
"description": "No Content"
|
||
},
|
||
"401": {
|
||
"description": "Unauthorized",
|
||
"schema": {
|
||
"$ref": "#/definitions/httpapi.ErrorEnvelope"
|
||
}
|
||
},
|
||
"403": {
|
||
"description": "Forbidden",
|
||
"schema": {
|
||
"$ref": "#/definitions/httpapi.ErrorEnvelope"
|
||
}
|
||
},
|
||
"404": {
|
||
"description": "Not Found",
|
||
"schema": {
|
||
"$ref": "#/definitions/httpapi.ErrorEnvelope"
|
||
}
|
||
},
|
||
"500": {
|
||
"description": "Internal Server Error",
|
||
"schema": {
|
||
"$ref": "#/definitions/httpapi.ErrorEnvelope"
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"patch": {
|
||
"security": [
|
||
{
|
||
"BearerAuth": []
|
||
}
|
||
],
|
||
"description": "覆盖指定平台的基础配置、凭证、优先级、定价和运行策略。",
|
||
"consumes": [
|
||
"application/json"
|
||
],
|
||
"produces": [
|
||
"application/json"
|
||
],
|
||
"tags": [
|
||
"platforms"
|
||
],
|
||
"summary": "更新平台",
|
||
"parameters": [
|
||
{
|
||
"type": "string",
|
||
"description": "平台 ID",
|
||
"name": "platformID",
|
||
"in": "path",
|
||
"required": true
|
||
},
|
||
{
|
||
"description": "平台配置请求",
|
||
"name": "input",
|
||
"in": "body",
|
||
"required": true,
|
||
"schema": {
|
||
"$ref": "#/definitions/store.CreatePlatformInput"
|
||
}
|
||
}
|
||
],
|
||
"responses": {
|
||
"200": {
|
||
"description": "OK",
|
||
"schema": {
|
||
"$ref": "#/definitions/store.Platform"
|
||
}
|
||
},
|
||
"400": {
|
||
"description": "Bad Request",
|
||
"schema": {
|
||
"$ref": "#/definitions/httpapi.ErrorEnvelope"
|
||
}
|
||
},
|
||
"401": {
|
||
"description": "Unauthorized",
|
||
"schema": {
|
||
"$ref": "#/definitions/httpapi.ErrorEnvelope"
|
||
}
|
||
},
|
||
"403": {
|
||
"description": "Forbidden",
|
||
"schema": {
|
||
"$ref": "#/definitions/httpapi.ErrorEnvelope"
|
||
}
|
||
},
|
||
"404": {
|
||
"description": "Not Found",
|
||
"schema": {
|
||
"$ref": "#/definitions/httpapi.ErrorEnvelope"
|
||
}
|
||
},
|
||
"409": {
|
||
"description": "Conflict",
|
||
"schema": {
|
||
"$ref": "#/definitions/httpapi.ErrorEnvelope"
|
||
}
|
||
},
|
||
"500": {
|
||
"description": "Internal Server Error",
|
||
"schema": {
|
||
"$ref": "#/definitions/httpapi.ErrorEnvelope"
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/api/admin/platforms/{platformID}/dynamic-priority": {
|
||
"patch": {
|
||
"security": [
|
||
{
|
||
"BearerAuth": []
|
||
}
|
||
],
|
||
"description": "管理端调整平台运行时动态优先级;reset 为 true 时清空动态值。",
|
||
"consumes": [
|
||
"application/json"
|
||
],
|
||
"produces": [
|
||
"application/json"
|
||
],
|
||
"tags": [
|
||
"runtime"
|
||
],
|
||
"summary": "更新平台动态优先级",
|
||
"parameters": [
|
||
{
|
||
"type": "string",
|
||
"description": "平台 ID",
|
||
"name": "platformID",
|
||
"in": "path",
|
||
"required": true
|
||
},
|
||
{
|
||
"description": "动态优先级请求",
|
||
"name": "input",
|
||
"in": "body",
|
||
"required": true,
|
||
"schema": {
|
||
"$ref": "#/definitions/httpapi.updatePlatformDynamicPriorityRequest"
|
||
}
|
||
}
|
||
],
|
||
"responses": {
|
||
"200": {
|
||
"description": "OK",
|
||
"schema": {
|
||
"$ref": "#/definitions/store.Platform"
|
||
}
|
||
},
|
||
"400": {
|
||
"description": "Bad Request",
|
||
"schema": {
|
||
"$ref": "#/definitions/httpapi.ErrorEnvelope"
|
||
}
|
||
},
|
||
"401": {
|
||
"description": "Unauthorized",
|
||
"schema": {
|
||
"$ref": "#/definitions/httpapi.ErrorEnvelope"
|
||
}
|
||
},
|
||
"403": {
|
||
"description": "Forbidden",
|
||
"schema": {
|
||
"$ref": "#/definitions/httpapi.ErrorEnvelope"
|
||
}
|
||
},
|
||
"404": {
|
||
"description": "Not Found",
|
||
"schema": {
|
||
"$ref": "#/definitions/httpapi.ErrorEnvelope"
|
||
}
|
||
},
|
||
"500": {
|
||
"description": "Internal Server Error",
|
||
"schema": {
|
||
"$ref": "#/definitions/httpapi.ErrorEnvelope"
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/api/admin/platforms/{platformID}/models": {
|
||
"put": {
|
||
"security": [
|
||
{
|
||
"BearerAuth": []
|
||
}
|
||
],
|
||
"description": "用请求体中的 models 列表整体替换指定平台下的模型配置。",
|
||
"consumes": [
|
||
"application/json"
|
||
],
|
||
"produces": [
|
||
"application/json"
|
||
],
|
||
"tags": [
|
||
"platform-models"
|
||
],
|
||
"summary": "替换平台模型",
|
||
"parameters": [
|
||
{
|
||
"type": "string",
|
||
"description": "平台 ID",
|
||
"name": "platformID",
|
||
"in": "path",
|
||
"required": true
|
||
},
|
||
{
|
||
"description": "模型列表请求",
|
||
"name": "input",
|
||
"in": "body",
|
||
"required": true,
|
||
"schema": {
|
||
"$ref": "#/definitions/httpapi.ReplacePlatformModelsRequest"
|
||
}
|
||
}
|
||
],
|
||
"responses": {
|
||
"200": {
|
||
"description": "OK",
|
||
"schema": {
|
||
"$ref": "#/definitions/httpapi.PlatformModelListResponse"
|
||
}
|
||
},
|
||
"400": {
|
||
"description": "Bad Request",
|
||
"schema": {
|
||
"$ref": "#/definitions/httpapi.ErrorEnvelope"
|
||
}
|
||
},
|
||
"401": {
|
||
"description": "Unauthorized",
|
||
"schema": {
|
||
"$ref": "#/definitions/httpapi.ErrorEnvelope"
|
||
}
|
||
},
|
||
"403": {
|
||
"description": "Forbidden",
|
||
"schema": {
|
||
"$ref": "#/definitions/httpapi.ErrorEnvelope"
|
||
}
|
||
},
|
||
"404": {
|
||
"description": "Not Found",
|
||
"schema": {
|
||
"$ref": "#/definitions/httpapi.ErrorEnvelope"
|
||
}
|
||
},
|
||
"500": {
|
||
"description": "Internal Server Error",
|
||
"schema": {
|
||
"$ref": "#/definitions/httpapi.ErrorEnvelope"
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"post": {
|
||
"security": [
|
||
{
|
||
"BearerAuth": []
|
||
}
|
||
],
|
||
"description": "为平台新增一个可路由模型;路径中的 platformID 会覆盖请求体 platformId。",
|
||
"consumes": [
|
||
"application/json"
|
||
],
|
||
"produces": [
|
||
"application/json"
|
||
],
|
||
"tags": [
|
||
"platform-models"
|
||
],
|
||
"summary": "创建平台模型",
|
||
"parameters": [
|
||
{
|
||
"type": "string",
|
||
"description": "平台 ID,使用 /api/admin/platforms/{platformID}/models 时由路径提供",
|
||
"name": "platformID",
|
||
"in": "path",
|
||
"required": true
|
||
},
|
||
{
|
||
"description": "平台模型配置请求",
|
||
"name": "input",
|
||
"in": "body",
|
||
"required": true,
|
||
"schema": {
|
||
"$ref": "#/definitions/store.CreatePlatformModelInput"
|
||
}
|
||
}
|
||
],
|
||
"responses": {
|
||
"201": {
|
||
"description": "Created",
|
||
"schema": {
|
||
"$ref": "#/definitions/store.PlatformModel"
|
||
}
|
||
},
|
||
"400": {
|
||
"description": "Bad Request",
|
||
"schema": {
|
||
"$ref": "#/definitions/httpapi.ErrorEnvelope"
|
||
}
|
||
},
|
||
"401": {
|
||
"description": "Unauthorized",
|
||
"schema": {
|
||
"$ref": "#/definitions/httpapi.ErrorEnvelope"
|
||
}
|
||
},
|
||
"403": {
|
||
"description": "Forbidden",
|
||
"schema": {
|
||
"$ref": "#/definitions/httpapi.ErrorEnvelope"
|
||
}
|
||
},
|
||
"404": {
|
||
"description": "Not Found",
|
||
"schema": {
|
||
"$ref": "#/definitions/httpapi.ErrorEnvelope"
|
||
}
|
||
},
|
||
"500": {
|
||
"description": "Internal Server Error",
|
||
"schema": {
|
||
"$ref": "#/definitions/httpapi.ErrorEnvelope"
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/api/admin/pricing/rule-sets": {
|
||
"get": {
|
||
"security": [
|
||
{
|
||
"BearerAuth": []
|
||
}
|
||
],
|
||
"description": "管理端返回可分配给平台、模型、租户或用户组的定价规则集。",
|
||
"produces": [
|
||
"application/json"
|
||
],
|
||
"tags": [
|
||
"pricing"
|
||
],
|
||
"summary": "列出定价规则集",
|
||
"responses": {
|
||
"200": {
|
||
"description": "OK",
|
||
"schema": {
|
||
"$ref": "#/definitions/httpapi.PricingRuleSetListResponse"
|
||
}
|
||
},
|
||
"401": {
|
||
"description": "Unauthorized",
|
||
"schema": {
|
||
"$ref": "#/definitions/httpapi.ErrorEnvelope"
|
||
}
|
||
},
|
||
"403": {
|
||
"description": "Forbidden",
|
||
"schema": {
|
||
"$ref": "#/definitions/httpapi.ErrorEnvelope"
|
||
}
|
||
},
|
||
"500": {
|
||
"description": "Internal Server Error",
|
||
"schema": {
|
||
"$ref": "#/definitions/httpapi.ErrorEnvelope"
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"post": {
|
||
"security": [
|
||
{
|
||
"BearerAuth": []
|
||
}
|
||
],
|
||
"description": "管理端创建定价规则集,ruleSetKey、name 和至少一条 rule 必填。",
|
||
"consumes": [
|
||
"application/json"
|
||
],
|
||
"produces": [
|
||
"application/json"
|
||
],
|
||
"tags": [
|
||
"pricing"
|
||
],
|
||
"summary": "创建定价规则集",
|
||
"parameters": [
|
||
{
|
||
"description": "定价规则集请求",
|
||
"name": "input",
|
||
"in": "body",
|
||
"required": true,
|
||
"schema": {
|
||
"$ref": "#/definitions/store.PricingRuleSetInput"
|
||
}
|
||
}
|
||
],
|
||
"responses": {
|
||
"201": {
|
||
"description": "Created",
|
||
"schema": {
|
||
"$ref": "#/definitions/store.PricingRuleSet"
|
||
}
|
||
},
|
||
"400": {
|
||
"description": "Bad Request",
|
||
"schema": {
|
||
"$ref": "#/definitions/httpapi.ErrorEnvelope"
|
||
}
|
||
},
|
||
"401": {
|
||
"description": "Unauthorized",
|
||
"schema": {
|
||
"$ref": "#/definitions/httpapi.ErrorEnvelope"
|
||
}
|
||
},
|
||
"403": {
|
||
"description": "Forbidden",
|
||
"schema": {
|
||
"$ref": "#/definitions/httpapi.ErrorEnvelope"
|
||
}
|
||
},
|
||
"409": {
|
||
"description": "Conflict",
|
||
"schema": {
|
||
"$ref": "#/definitions/httpapi.ErrorEnvelope"
|
||
}
|
||
},
|
||
"500": {
|
||
"description": "Internal Server Error",
|
||
"schema": {
|
||
"$ref": "#/definitions/httpapi.ErrorEnvelope"
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/api/admin/pricing/rule-sets/{ruleSetID}": {
|
||
"delete": {
|
||
"security": [
|
||
{
|
||
"BearerAuth": []
|
||
}
|
||
],
|
||
"description": "管理端删除非默认定价规则集;默认规则集受保护。",
|
||
"produces": [
|
||
"application/json"
|
||
],
|
||
"tags": [
|
||
"pricing"
|
||
],
|
||
"summary": "删除定价规则集",
|
||
"parameters": [
|
||
{
|
||
"type": "string",
|
||
"description": "定价规则集 ID",
|
||
"name": "ruleSetID",
|
||
"in": "path",
|
||
"required": true
|
||
}
|
||
],
|
||
"responses": {
|
||
"204": {
|
||
"description": "No Content"
|
||
},
|
||
"401": {
|
||
"description": "Unauthorized",
|
||
"schema": {
|
||
"$ref": "#/definitions/httpapi.ErrorEnvelope"
|
||
}
|
||
},
|
||
"403": {
|
||
"description": "Forbidden",
|
||
"schema": {
|
||
"$ref": "#/definitions/httpapi.ErrorEnvelope"
|
||
}
|
||
},
|
||
"404": {
|
||
"description": "Not Found",
|
||
"schema": {
|
||
"$ref": "#/definitions/httpapi.ErrorEnvelope"
|
||
}
|
||
},
|
||
"500": {
|
||
"description": "Internal Server Error",
|
||
"schema": {
|
||
"$ref": "#/definitions/httpapi.ErrorEnvelope"
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"patch": {
|
||
"security": [
|
||
{
|
||
"BearerAuth": []
|
||
}
|
||
],
|
||
"description": "管理端更新定价规则集及其规则列表。",
|
||
"consumes": [
|
||
"application/json"
|
||
],
|
||
"produces": [
|
||
"application/json"
|
||
],
|
||
"tags": [
|
||
"pricing"
|
||
],
|
||
"summary": "更新定价规则集",
|
||
"parameters": [
|
||
{
|
||
"type": "string",
|
||
"description": "定价规则集 ID",
|
||
"name": "ruleSetID",
|
||
"in": "path",
|
||
"required": true
|
||
},
|
||
{
|
||
"description": "定价规则集请求",
|
||
"name": "input",
|
||
"in": "body",
|
||
"required": true,
|
||
"schema": {
|
||
"$ref": "#/definitions/store.PricingRuleSetInput"
|
||
}
|
||
}
|
||
],
|
||
"responses": {
|
||
"200": {
|
||
"description": "OK",
|
||
"schema": {
|
||
"$ref": "#/definitions/store.PricingRuleSet"
|
||
}
|
||
},
|
||
"400": {
|
||
"description": "Bad Request",
|
||
"schema": {
|
||
"$ref": "#/definitions/httpapi.ErrorEnvelope"
|
||
}
|
||
},
|
||
"401": {
|
||
"description": "Unauthorized",
|
||
"schema": {
|
||
"$ref": "#/definitions/httpapi.ErrorEnvelope"
|
||
}
|
||
},
|
||
"403": {
|
||
"description": "Forbidden",
|
||
"schema": {
|
||
"$ref": "#/definitions/httpapi.ErrorEnvelope"
|
||
}
|
||
},
|
||
"404": {
|
||
"description": "Not Found",
|
||
"schema": {
|
||
"$ref": "#/definitions/httpapi.ErrorEnvelope"
|
||
}
|
||
},
|
||
"409": {
|
||
"description": "Conflict",
|
||
"schema": {
|
||
"$ref": "#/definitions/httpapi.ErrorEnvelope"
|
||
}
|
||
},
|
||
"500": {
|
||
"description": "Internal Server Error",
|
||
"schema": {
|
||
"$ref": "#/definitions/httpapi.ErrorEnvelope"
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/api/admin/pricing/rules": {
|
||
"get": {
|
||
"security": [
|
||
{
|
||
"BearerAuth": []
|
||
}
|
||
],
|
||
"description": "返回所有定价规则明细,便于管理端排查有效价格。",
|
||
"produces": [
|
||
"application/json"
|
||
],
|
||
"tags": [
|
||
"pricing"
|
||
],
|
||
"summary": "列出定价规则",
|
||
"responses": {
|
||
"200": {
|
||
"description": "OK",
|
||
"schema": {
|
||
"$ref": "#/definitions/httpapi.PricingRuleListResponse"
|
||
}
|
||
},
|
||
"401": {
|
||
"description": "Unauthorized",
|
||
"schema": {
|
||
"$ref": "#/definitions/httpapi.ErrorEnvelope"
|
||
}
|
||
},
|
||
"403": {
|
||
"description": "Forbidden",
|
||
"schema": {
|
||
"$ref": "#/definitions/httpapi.ErrorEnvelope"
|
||
}
|
||
},
|
||
"500": {
|
||
"description": "Internal Server Error",
|
||
"schema": {
|
||
"$ref": "#/definitions/httpapi.ErrorEnvelope"
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/api/admin/runtime/model-rate-limits": {
|
||
"get": {
|
||
"security": [
|
||
{
|
||
"BearerAuth": []
|
||
}
|
||
],
|
||
"description": "管理端查看平台模型维度的限流和冷却状态。",
|
||
"produces": [
|
||
"application/json"
|
||
],
|
||
"tags": [
|
||
"runtime"
|
||
],
|
||
"summary": "列出模型限流状态",
|
||
"responses": {
|
||
"200": {
|
||
"description": "OK",
|
||
"schema": {
|
||
"$ref": "#/definitions/httpapi.ModelRateLimitStatusListResponse"
|
||
}
|
||
},
|
||
"401": {
|
||
"description": "Unauthorized",
|
||
"schema": {
|
||
"$ref": "#/definitions/httpapi.ErrorEnvelope"
|
||
}
|
||
},
|
||
"403": {
|
||
"description": "Forbidden",
|
||
"schema": {
|
||
"$ref": "#/definitions/httpapi.ErrorEnvelope"
|
||
}
|
||
},
|
||
"500": {
|
||
"description": "Internal Server Error",
|
||
"schema": {
|
||
"$ref": "#/definitions/httpapi.ErrorEnvelope"
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/api/admin/runtime/policy-sets": {
|
||
"get": {
|
||
"security": [
|
||
{
|
||
"BearerAuth": []
|
||
}
|
||
],
|
||
"description": "管理端返回可分配给平台、模型或用户组的运行策略集。",
|
||
"produces": [
|
||
"application/json"
|
||
],
|
||
"tags": [
|
||
"runtime"
|
||
],
|
||
"summary": "列出运行策略集",
|
||
"responses": {
|
||
"200": {
|
||
"description": "OK",
|
||
"schema": {
|
||
"$ref": "#/definitions/httpapi.RuntimePolicySetListResponse"
|
||
}
|
||
},
|
||
"401": {
|
||
"description": "Unauthorized",
|
||
"schema": {
|
||
"$ref": "#/definitions/httpapi.ErrorEnvelope"
|
||
}
|
||
},
|
||
"403": {
|
||
"description": "Forbidden",
|
||
"schema": {
|
||
"$ref": "#/definitions/httpapi.ErrorEnvelope"
|
||
}
|
||
},
|
||
"500": {
|
||
"description": "Internal Server Error",
|
||
"schema": {
|
||
"$ref": "#/definitions/httpapi.ErrorEnvelope"
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"post": {
|
||
"security": [
|
||
{
|
||
"BearerAuth": []
|
||
}
|
||
],
|
||
"description": "管理端创建运行策略集,policyKey 和 name 必填。",
|
||
"consumes": [
|
||
"application/json"
|
||
],
|
||
"produces": [
|
||
"application/json"
|
||
],
|
||
"tags": [
|
||
"runtime"
|
||
],
|
||
"summary": "创建运行策略集",
|
||
"parameters": [
|
||
{
|
||
"description": "运行策略集请求",
|
||
"name": "input",
|
||
"in": "body",
|
||
"required": true,
|
||
"schema": {
|
||
"$ref": "#/definitions/store.RuntimePolicySetInput"
|
||
}
|
||
}
|
||
],
|
||
"responses": {
|
||
"201": {
|
||
"description": "Created",
|
||
"schema": {
|
||
"$ref": "#/definitions/store.RuntimePolicySet"
|
||
}
|
||
},
|
||
"400": {
|
||
"description": "Bad Request",
|
||
"schema": {
|
||
"$ref": "#/definitions/httpapi.ErrorEnvelope"
|
||
}
|
||
},
|
||
"401": {
|
||
"description": "Unauthorized",
|
||
"schema": {
|
||
"$ref": "#/definitions/httpapi.ErrorEnvelope"
|
||
}
|
||
},
|
||
"403": {
|
||
"description": "Forbidden",
|
||
"schema": {
|
||
"$ref": "#/definitions/httpapi.ErrorEnvelope"
|
||
}
|
||
},
|
||
"409": {
|
||
"description": "Conflict",
|
||
"schema": {
|
||
"$ref": "#/definitions/httpapi.ErrorEnvelope"
|
||
}
|
||
},
|
||
"500": {
|
||
"description": "Internal Server Error",
|
||
"schema": {
|
||
"$ref": "#/definitions/httpapi.ErrorEnvelope"
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/api/admin/runtime/policy-sets/{policySetID}": {
|
||
"delete": {
|
||
"security": [
|
||
{
|
||
"BearerAuth": []
|
||
}
|
||
],
|
||
"description": "管理端删除非默认运行策略集;默认策略集受保护。",
|
||
"produces": [
|
||
"application/json"
|
||
],
|
||
"tags": [
|
||
"runtime"
|
||
],
|
||
"summary": "删除运行策略集",
|
||
"parameters": [
|
||
{
|
||
"type": "string",
|
||
"description": "运行策略集 ID",
|
||
"name": "policySetID",
|
||
"in": "path",
|
||
"required": true
|
||
}
|
||
],
|
||
"responses": {
|
||
"204": {
|
||
"description": "No Content"
|
||
},
|
||
"401": {
|
||
"description": "Unauthorized",
|
||
"schema": {
|
||
"$ref": "#/definitions/httpapi.ErrorEnvelope"
|
||
}
|
||
},
|
||
"403": {
|
||
"description": "Forbidden",
|
||
"schema": {
|
||
"$ref": "#/definitions/httpapi.ErrorEnvelope"
|
||
}
|
||
},
|
||
"404": {
|
||
"description": "Not Found",
|
||
"schema": {
|
||
"$ref": "#/definitions/httpapi.ErrorEnvelope"
|
||
}
|
||
},
|
||
"500": {
|
||
"description": "Internal Server Error",
|
||
"schema": {
|
||
"$ref": "#/definitions/httpapi.ErrorEnvelope"
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"patch": {
|
||
"security": [
|
||
{
|
||
"BearerAuth": []
|
||
}
|
||
],
|
||
"description": "管理端更新运行策略集及其限流、重试、超时等策略配置。",
|
||
"consumes": [
|
||
"application/json"
|
||
],
|
||
"produces": [
|
||
"application/json"
|
||
],
|
||
"tags": [
|
||
"runtime"
|
||
],
|
||
"summary": "更新运行策略集",
|
||
"parameters": [
|
||
{
|
||
"type": "string",
|
||
"description": "运行策略集 ID",
|
||
"name": "policySetID",
|
||
"in": "path",
|
||
"required": true
|
||
},
|
||
{
|
||
"description": "运行策略集请求",
|
||
"name": "input",
|
||
"in": "body",
|
||
"required": true,
|
||
"schema": {
|
||
"$ref": "#/definitions/store.RuntimePolicySetInput"
|
||
}
|
||
}
|
||
],
|
||
"responses": {
|
||
"200": {
|
||
"description": "OK",
|
||
"schema": {
|
||
"$ref": "#/definitions/store.RuntimePolicySet"
|
||
}
|
||
},
|
||
"400": {
|
||
"description": "Bad Request",
|
||
"schema": {
|
||
"$ref": "#/definitions/httpapi.ErrorEnvelope"
|
||
}
|
||
},
|
||
"401": {
|
||
"description": "Unauthorized",
|
||
"schema": {
|
||
"$ref": "#/definitions/httpapi.ErrorEnvelope"
|
||
}
|
||
},
|
||
"403": {
|
||
"description": "Forbidden",
|
||
"schema": {
|
||
"$ref": "#/definitions/httpapi.ErrorEnvelope"
|
||
}
|
||
},
|
||
"404": {
|
||
"description": "Not Found",
|
||
"schema": {
|
||
"$ref": "#/definitions/httpapi.ErrorEnvelope"
|
||
}
|
||
},
|
||
"409": {
|
||
"description": "Conflict",
|
||
"schema": {
|
||
"$ref": "#/definitions/httpapi.ErrorEnvelope"
|
||
}
|
||
},
|
||
"500": {
|
||
"description": "Internal Server Error",
|
||
"schema": {
|
||
"$ref": "#/definitions/httpapi.ErrorEnvelope"
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/api/admin/runtime/rate-limit-windows": {
|
||
"get": {
|
||
"security": [
|
||
{
|
||
"BearerAuth": []
|
||
}
|
||
],
|
||
"description": "管理端查看当前运行时限流窗口状态。",
|
||
"produces": [
|
||
"application/json"
|
||
],
|
||
"tags": [
|
||
"runtime"
|
||
],
|
||
"summary": "列出限流窗口",
|
||
"responses": {
|
||
"200": {
|
||
"description": "OK",
|
||
"schema": {
|
||
"$ref": "#/definitions/httpapi.RateLimitWindowListResponse"
|
||
}
|
||
},
|
||
"401": {
|
||
"description": "Unauthorized",
|
||
"schema": {
|
||
"$ref": "#/definitions/httpapi.ErrorEnvelope"
|
||
}
|
||
},
|
||
"403": {
|
||
"description": "Forbidden",
|
||
"schema": {
|
||
"$ref": "#/definitions/httpapi.ErrorEnvelope"
|
||
}
|
||
},
|
||
"500": {
|
||
"description": "Internal Server Error",
|
||
"schema": {
|
||
"$ref": "#/definitions/httpapi.ErrorEnvelope"
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/api/admin/runtime/runner-policy": {
|
||
"get": {
|
||
"security": [
|
||
{
|
||
"BearerAuth": []
|
||
}
|
||
],
|
||
"description": "管理端获取当前生效的默认 Runner 调度策略。",
|
||
"produces": [
|
||
"application/json"
|
||
],
|
||
"tags": [
|
||
"runtime"
|
||
],
|
||
"summary": "获取 Runner 策略",
|
||
"responses": {
|
||
"200": {
|
||
"description": "OK",
|
||
"schema": {
|
||
"$ref": "#/definitions/store.RunnerPolicy"
|
||
}
|
||
},
|
||
"401": {
|
||
"description": "Unauthorized",
|
||
"schema": {
|
||
"$ref": "#/definitions/httpapi.ErrorEnvelope"
|
||
}
|
||
},
|
||
"403": {
|
||
"description": "Forbidden",
|
||
"schema": {
|
||
"$ref": "#/definitions/httpapi.ErrorEnvelope"
|
||
}
|
||
},
|
||
"500": {
|
||
"description": "Internal Server Error",
|
||
"schema": {
|
||
"$ref": "#/definitions/httpapi.ErrorEnvelope"
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"patch": {
|
||
"security": [
|
||
{
|
||
"BearerAuth": []
|
||
}
|
||
],
|
||
"description": "管理端写入默认 Runner 调度策略。",
|
||
"consumes": [
|
||
"application/json"
|
||
],
|
||
"produces": [
|
||
"application/json"
|
||
],
|
||
"tags": [
|
||
"runtime"
|
||
],
|
||
"summary": "更新 Runner 策略",
|
||
"parameters": [
|
||
{
|
||
"description": "Runner 策略请求",
|
||
"name": "input",
|
||
"in": "body",
|
||
"required": true,
|
||
"schema": {
|
||
"$ref": "#/definitions/store.RunnerPolicyInput"
|
||
}
|
||
}
|
||
],
|
||
"responses": {
|
||
"200": {
|
||
"description": "OK",
|
||
"schema": {
|
||
"$ref": "#/definitions/store.RunnerPolicy"
|
||
}
|
||
},
|
||
"400": {
|
||
"description": "Bad Request",
|
||
"schema": {
|
||
"$ref": "#/definitions/httpapi.ErrorEnvelope"
|
||
}
|
||
},
|
||
"401": {
|
||
"description": "Unauthorized",
|
||
"schema": {
|
||
"$ref": "#/definitions/httpapi.ErrorEnvelope"
|
||
}
|
||
},
|
||
"403": {
|
||
"description": "Forbidden",
|
||
"schema": {
|
||
"$ref": "#/definitions/httpapi.ErrorEnvelope"
|
||
}
|
||
},
|
||
"500": {
|
||
"description": "Internal Server Error",
|
||
"schema": {
|
||
"$ref": "#/definitions/httpapi.ErrorEnvelope"
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/api/admin/tenants": {
|
||
"get": {
|
||
"security": [
|
||
{
|
||
"BearerAuth": []
|
||
}
|
||
],
|
||
"description": "管理端返回网关租户列表。",
|
||
"produces": [
|
||
"application/json"
|
||
],
|
||
"tags": [
|
||
"identity"
|
||
],
|
||
"summary": "列出租户",
|
||
"responses": {
|
||
"200": {
|
||
"description": "OK",
|
||
"schema": {
|
||
"$ref": "#/definitions/httpapi.TenantListResponse"
|
||
}
|
||
},
|
||
"401": {
|
||
"description": "Unauthorized",
|
||
"schema": {
|
||
"$ref": "#/definitions/httpapi.ErrorEnvelope"
|
||
}
|
||
},
|
||
"403": {
|
||
"description": "Forbidden",
|
||
"schema": {
|
||
"$ref": "#/definitions/httpapi.ErrorEnvelope"
|
||
}
|
||
},
|
||
"500": {
|
||
"description": "Internal Server Error",
|
||
"schema": {
|
||
"$ref": "#/definitions/httpapi.ErrorEnvelope"
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"post": {
|
||
"security": [
|
||
{
|
||
"BearerAuth": []
|
||
}
|
||
],
|
||
"description": "管理端创建网关租户,tenantKey 和 name 必填。",
|
||
"consumes": [
|
||
"application/json"
|
||
],
|
||
"produces": [
|
||
"application/json"
|
||
],
|
||
"tags": [
|
||
"identity"
|
||
],
|
||
"summary": "创建租户",
|
||
"parameters": [
|
||
{
|
||
"description": "租户请求",
|
||
"name": "input",
|
||
"in": "body",
|
||
"required": true,
|
||
"schema": {
|
||
"$ref": "#/definitions/store.GatewayTenantInput"
|
||
}
|
||
}
|
||
],
|
||
"responses": {
|
||
"201": {
|
||
"description": "Created",
|
||
"schema": {
|
||
"$ref": "#/definitions/store.GatewayTenant"
|
||
}
|
||
},
|
||
"400": {
|
||
"description": "Bad Request",
|
||
"schema": {
|
||
"$ref": "#/definitions/httpapi.ErrorEnvelope"
|
||
}
|
||
},
|
||
"401": {
|
||
"description": "Unauthorized",
|
||
"schema": {
|
||
"$ref": "#/definitions/httpapi.ErrorEnvelope"
|
||
}
|
||
},
|
||
"403": {
|
||
"description": "Forbidden",
|
||
"schema": {
|
||
"$ref": "#/definitions/httpapi.ErrorEnvelope"
|
||
}
|
||
},
|
||
"409": {
|
||
"description": "Conflict",
|
||
"schema": {
|
||
"$ref": "#/definitions/httpapi.ErrorEnvelope"
|
||
}
|
||
},
|
||
"500": {
|
||
"description": "Internal Server Error",
|
||
"schema": {
|
||
"$ref": "#/definitions/httpapi.ErrorEnvelope"
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/api/admin/tenants/{tenantID}": {
|
||
"delete": {
|
||
"security": [
|
||
{
|
||
"BearerAuth": []
|
||
}
|
||
],
|
||
"description": "管理端删除网关租户。",
|
||
"produces": [
|
||
"application/json"
|
||
],
|
||
"tags": [
|
||
"identity"
|
||
],
|
||
"summary": "删除租户",
|
||
"parameters": [
|
||
{
|
||
"type": "string",
|
||
"description": "租户 ID",
|
||
"name": "tenantID",
|
||
"in": "path",
|
||
"required": true
|
||
}
|
||
],
|
||
"responses": {
|
||
"204": {
|
||
"description": "No Content"
|
||
},
|
||
"401": {
|
||
"description": "Unauthorized",
|
||
"schema": {
|
||
"$ref": "#/definitions/httpapi.ErrorEnvelope"
|
||
}
|
||
},
|
||
"403": {
|
||
"description": "Forbidden",
|
||
"schema": {
|
||
"$ref": "#/definitions/httpapi.ErrorEnvelope"
|
||
}
|
||
},
|
||
"404": {
|
||
"description": "Not Found",
|
||
"schema": {
|
||
"$ref": "#/definitions/httpapi.ErrorEnvelope"
|
||
}
|
||
},
|
||
"500": {
|
||
"description": "Internal Server Error",
|
||
"schema": {
|
||
"$ref": "#/definitions/httpapi.ErrorEnvelope"
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"patch": {
|
||
"security": [
|
||
{
|
||
"BearerAuth": []
|
||
}
|
||
],
|
||
"description": "管理端更新网关租户信息。",
|
||
"consumes": [
|
||
"application/json"
|
||
],
|
||
"produces": [
|
||
"application/json"
|
||
],
|
||
"tags": [
|
||
"identity"
|
||
],
|
||
"summary": "更新租户",
|
||
"parameters": [
|
||
{
|
||
"type": "string",
|
||
"description": "租户 ID",
|
||
"name": "tenantID",
|
||
"in": "path",
|
||
"required": true
|
||
},
|
||
{
|
||
"description": "租户请求",
|
||
"name": "input",
|
||
"in": "body",
|
||
"required": true,
|
||
"schema": {
|
||
"$ref": "#/definitions/store.GatewayTenantInput"
|
||
}
|
||
}
|
||
],
|
||
"responses": {
|
||
"200": {
|
||
"description": "OK",
|
||
"schema": {
|
||
"$ref": "#/definitions/store.GatewayTenant"
|
||
}
|
||
},
|
||
"400": {
|
||
"description": "Bad Request",
|
||
"schema": {
|
||
"$ref": "#/definitions/httpapi.ErrorEnvelope"
|
||
}
|
||
},
|
||
"401": {
|
||
"description": "Unauthorized",
|
||
"schema": {
|
||
"$ref": "#/definitions/httpapi.ErrorEnvelope"
|
||
}
|
||
},
|
||
"403": {
|
||
"description": "Forbidden",
|
||
"schema": {
|
||
"$ref": "#/definitions/httpapi.ErrorEnvelope"
|
||
}
|
||
},
|
||
"404": {
|
||
"description": "Not Found",
|
||
"schema": {
|
||
"$ref": "#/definitions/httpapi.ErrorEnvelope"
|
||
}
|
||
},
|
||
"409": {
|
||
"description": "Conflict",
|
||
"schema": {
|
||
"$ref": "#/definitions/httpapi.ErrorEnvelope"
|
||
}
|
||
},
|
||
"500": {
|
||
"description": "Internal Server Error",
|
||
"schema": {
|
||
"$ref": "#/definitions/httpapi.ErrorEnvelope"
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/api/admin/user-groups": {
|
||
"get": {
|
||
"security": [
|
||
{
|
||
"BearerAuth": []
|
||
}
|
||
],
|
||
"description": "管理端返回用户组及其计费、限流和配额策略。",
|
||
"produces": [
|
||
"application/json"
|
||
],
|
||
"tags": [
|
||
"identity"
|
||
],
|
||
"summary": "列出用户组",
|
||
"responses": {
|
||
"200": {
|
||
"description": "OK",
|
||
"schema": {
|
||
"$ref": "#/definitions/httpapi.UserGroupListResponse"
|
||
}
|
||
},
|
||
"401": {
|
||
"description": "Unauthorized",
|
||
"schema": {
|
||
"$ref": "#/definitions/httpapi.ErrorEnvelope"
|
||
}
|
||
},
|
||
"403": {
|
||
"description": "Forbidden",
|
||
"schema": {
|
||
"$ref": "#/definitions/httpapi.ErrorEnvelope"
|
||
}
|
||
},
|
||
"500": {
|
||
"description": "Internal Server Error",
|
||
"schema": {
|
||
"$ref": "#/definitions/httpapi.ErrorEnvelope"
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"post": {
|
||
"security": [
|
||
{
|
||
"BearerAuth": []
|
||
}
|
||
],
|
||
"description": "管理端创建用户组,可配置默认定价、运行策略、限流和配额策略。",
|
||
"consumes": [
|
||
"application/json"
|
||
],
|
||
"produces": [
|
||
"application/json"
|
||
],
|
||
"tags": [
|
||
"identity"
|
||
],
|
||
"summary": "创建用户组",
|
||
"parameters": [
|
||
{
|
||
"description": "用户组请求",
|
||
"name": "input",
|
||
"in": "body",
|
||
"required": true,
|
||
"schema": {
|
||
"$ref": "#/definitions/store.UserGroupInput"
|
||
}
|
||
}
|
||
],
|
||
"responses": {
|
||
"201": {
|
||
"description": "Created",
|
||
"schema": {
|
||
"$ref": "#/definitions/store.UserGroup"
|
||
}
|
||
},
|
||
"400": {
|
||
"description": "Bad Request",
|
||
"schema": {
|
||
"$ref": "#/definitions/httpapi.ErrorEnvelope"
|
||
}
|
||
},
|
||
"401": {
|
||
"description": "Unauthorized",
|
||
"schema": {
|
||
"$ref": "#/definitions/httpapi.ErrorEnvelope"
|
||
}
|
||
},
|
||
"403": {
|
||
"description": "Forbidden",
|
||
"schema": {
|
||
"$ref": "#/definitions/httpapi.ErrorEnvelope"
|
||
}
|
||
},
|
||
"409": {
|
||
"description": "Conflict",
|
||
"schema": {
|
||
"$ref": "#/definitions/httpapi.ErrorEnvelope"
|
||
}
|
||
},
|
||
"500": {
|
||
"description": "Internal Server Error",
|
||
"schema": {
|
||
"$ref": "#/definitions/httpapi.ErrorEnvelope"
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/api/admin/user-groups/{groupID}": {
|
||
"delete": {
|
||
"security": [
|
||
{
|
||
"BearerAuth": []
|
||
}
|
||
],
|
||
"description": "管理端删除用户组。",
|
||
"produces": [
|
||
"application/json"
|
||
],
|
||
"tags": [
|
||
"identity"
|
||
],
|
||
"summary": "删除用户组",
|
||
"parameters": [
|
||
{
|
||
"type": "string",
|
||
"description": "用户组 ID",
|
||
"name": "groupID",
|
||
"in": "path",
|
||
"required": true
|
||
}
|
||
],
|
||
"responses": {
|
||
"204": {
|
||
"description": "No Content"
|
||
},
|
||
"401": {
|
||
"description": "Unauthorized",
|
||
"schema": {
|
||
"$ref": "#/definitions/httpapi.ErrorEnvelope"
|
||
}
|
||
},
|
||
"403": {
|
||
"description": "Forbidden",
|
||
"schema": {
|
||
"$ref": "#/definitions/httpapi.ErrorEnvelope"
|
||
}
|
||
},
|
||
"404": {
|
||
"description": "Not Found",
|
||
"schema": {
|
||
"$ref": "#/definitions/httpapi.ErrorEnvelope"
|
||
}
|
||
},
|
||
"500": {
|
||
"description": "Internal Server Error",
|
||
"schema": {
|
||
"$ref": "#/definitions/httpapi.ErrorEnvelope"
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"patch": {
|
||
"security": [
|
||
{
|
||
"BearerAuth": []
|
||
}
|
||
],
|
||
"description": "管理端更新用户组基础信息和策略配置。",
|
||
"consumes": [
|
||
"application/json"
|
||
],
|
||
"produces": [
|
||
"application/json"
|
||
],
|
||
"tags": [
|
||
"identity"
|
||
],
|
||
"summary": "更新用户组",
|
||
"parameters": [
|
||
{
|
||
"type": "string",
|
||
"description": "用户组 ID",
|
||
"name": "groupID",
|
||
"in": "path",
|
||
"required": true
|
||
},
|
||
{
|
||
"description": "用户组请求",
|
||
"name": "input",
|
||
"in": "body",
|
||
"required": true,
|
||
"schema": {
|
||
"$ref": "#/definitions/store.UserGroupInput"
|
||
}
|
||
}
|
||
],
|
||
"responses": {
|
||
"200": {
|
||
"description": "OK",
|
||
"schema": {
|
||
"$ref": "#/definitions/store.UserGroup"
|
||
}
|
||
},
|
||
"400": {
|
||
"description": "Bad Request",
|
||
"schema": {
|
||
"$ref": "#/definitions/httpapi.ErrorEnvelope"
|
||
}
|
||
},
|
||
"401": {
|
||
"description": "Unauthorized",
|
||
"schema": {
|
||
"$ref": "#/definitions/httpapi.ErrorEnvelope"
|
||
}
|
||
},
|
||
"403": {
|
||
"description": "Forbidden",
|
||
"schema": {
|
||
"$ref": "#/definitions/httpapi.ErrorEnvelope"
|
||
}
|
||
},
|
||
"404": {
|
||
"description": "Not Found",
|
||
"schema": {
|
||
"$ref": "#/definitions/httpapi.ErrorEnvelope"
|
||
}
|
||
},
|
||
"409": {
|
||
"description": "Conflict",
|
||
"schema": {
|
||
"$ref": "#/definitions/httpapi.ErrorEnvelope"
|
||
}
|
||
},
|
||
"500": {
|
||
"description": "Internal Server Error",
|
||
"schema": {
|
||
"$ref": "#/definitions/httpapi.ErrorEnvelope"
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/api/admin/users": {
|
||
"get": {
|
||
"security": [
|
||
{
|
||
"BearerAuth": []
|
||
}
|
||
],
|
||
"description": "管理端返回网关用户列表及钱包摘要。",
|
||
"produces": [
|
||
"application/json"
|
||
],
|
||
"tags": [
|
||
"identity"
|
||
],
|
||
"summary": "列出用户",
|
||
"responses": {
|
||
"200": {
|
||
"description": "OK",
|
||
"schema": {
|
||
"$ref": "#/definitions/httpapi.UserListResponse"
|
||
}
|
||
},
|
||
"401": {
|
||
"description": "Unauthorized",
|
||
"schema": {
|
||
"$ref": "#/definitions/httpapi.ErrorEnvelope"
|
||
}
|
||
},
|
||
"403": {
|
||
"description": "Forbidden",
|
||
"schema": {
|
||
"$ref": "#/definitions/httpapi.ErrorEnvelope"
|
||
}
|
||
},
|
||
"500": {
|
||
"description": "Internal Server Error",
|
||
"schema": {
|
||
"$ref": "#/definitions/httpapi.ErrorEnvelope"
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"post": {
|
||
"security": [
|
||
{
|
||
"BearerAuth": []
|
||
}
|
||
],
|
||
"description": "管理端创建网关用户;password 为空时不设置本地密码,非空时至少 8 位。",
|
||
"consumes": [
|
||
"application/json"
|
||
],
|
||
"produces": [
|
||
"application/json"
|
||
],
|
||
"tags": [
|
||
"identity"
|
||
],
|
||
"summary": "创建用户",
|
||
"parameters": [
|
||
{
|
||
"description": "用户请求",
|
||
"name": "input",
|
||
"in": "body",
|
||
"required": true,
|
||
"schema": {
|
||
"$ref": "#/definitions/store.GatewayUserInput"
|
||
}
|
||
}
|
||
],
|
||
"responses": {
|
||
"201": {
|
||
"description": "Created",
|
||
"schema": {
|
||
"$ref": "#/definitions/store.GatewayUser"
|
||
}
|
||
},
|
||
"400": {
|
||
"description": "Bad Request",
|
||
"schema": {
|
||
"$ref": "#/definitions/httpapi.ErrorEnvelope"
|
||
}
|
||
},
|
||
"401": {
|
||
"description": "Unauthorized",
|
||
"schema": {
|
||
"$ref": "#/definitions/httpapi.ErrorEnvelope"
|
||
}
|
||
},
|
||
"403": {
|
||
"description": "Forbidden",
|
||
"schema": {
|
||
"$ref": "#/definitions/httpapi.ErrorEnvelope"
|
||
}
|
||
},
|
||
"409": {
|
||
"description": "Conflict",
|
||
"schema": {
|
||
"$ref": "#/definitions/httpapi.ErrorEnvelope"
|
||
}
|
||
},
|
||
"500": {
|
||
"description": "Internal Server Error",
|
||
"schema": {
|
||
"$ref": "#/definitions/httpapi.ErrorEnvelope"
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/api/admin/users/{userID}": {
|
||
"delete": {
|
||
"security": [
|
||
{
|
||
"BearerAuth": []
|
||
}
|
||
],
|
||
"description": "管理端删除网关用户。",
|
||
"produces": [
|
||
"application/json"
|
||
],
|
||
"tags": [
|
||
"identity"
|
||
],
|
||
"summary": "删除用户",
|
||
"parameters": [
|
||
{
|
||
"type": "string",
|
||
"description": "用户 ID",
|
||
"name": "userID",
|
||
"in": "path",
|
||
"required": true
|
||
}
|
||
],
|
||
"responses": {
|
||
"204": {
|
||
"description": "No Content"
|
||
},
|
||
"401": {
|
||
"description": "Unauthorized",
|
||
"schema": {
|
||
"$ref": "#/definitions/httpapi.ErrorEnvelope"
|
||
}
|
||
},
|
||
"403": {
|
||
"description": "Forbidden",
|
||
"schema": {
|
||
"$ref": "#/definitions/httpapi.ErrorEnvelope"
|
||
}
|
||
},
|
||
"404": {
|
||
"description": "Not Found",
|
||
"schema": {
|
||
"$ref": "#/definitions/httpapi.ErrorEnvelope"
|
||
}
|
||
},
|
||
"500": {
|
||
"description": "Internal Server Error",
|
||
"schema": {
|
||
"$ref": "#/definitions/httpapi.ErrorEnvelope"
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"patch": {
|
||
"security": [
|
||
{
|
||
"BearerAuth": []
|
||
}
|
||
],
|
||
"description": "管理端更新网关用户资料、角色、默认用户组和可选本地密码。",
|
||
"consumes": [
|
||
"application/json"
|
||
],
|
||
"produces": [
|
||
"application/json"
|
||
],
|
||
"tags": [
|
||
"identity"
|
||
],
|
||
"summary": "更新用户",
|
||
"parameters": [
|
||
{
|
||
"type": "string",
|
||
"description": "用户 ID",
|
||
"name": "userID",
|
||
"in": "path",
|
||
"required": true
|
||
},
|
||
{
|
||
"description": "用户请求",
|
||
"name": "input",
|
||
"in": "body",
|
||
"required": true,
|
||
"schema": {
|
||
"$ref": "#/definitions/store.GatewayUserInput"
|
||
}
|
||
}
|
||
],
|
||
"responses": {
|
||
"200": {
|
||
"description": "OK",
|
||
"schema": {
|
||
"$ref": "#/definitions/store.GatewayUser"
|
||
}
|
||
},
|
||
"400": {
|
||
"description": "Bad Request",
|
||
"schema": {
|
||
"$ref": "#/definitions/httpapi.ErrorEnvelope"
|
||
}
|
||
},
|
||
"401": {
|
||
"description": "Unauthorized",
|
||
"schema": {
|
||
"$ref": "#/definitions/httpapi.ErrorEnvelope"
|
||
}
|
||
},
|
||
"403": {
|
||
"description": "Forbidden",
|
||
"schema": {
|
||
"$ref": "#/definitions/httpapi.ErrorEnvelope"
|
||
}
|
||
},
|
||
"404": {
|
||
"description": "Not Found",
|
||
"schema": {
|
||
"$ref": "#/definitions/httpapi.ErrorEnvelope"
|
||
}
|
||
},
|
||
"409": {
|
||
"description": "Conflict",
|
||
"schema": {
|
||
"$ref": "#/definitions/httpapi.ErrorEnvelope"
|
||
}
|
||
},
|
||
"500": {
|
||
"description": "Internal Server Error",
|
||
"schema": {
|
||
"$ref": "#/definitions/httpapi.ErrorEnvelope"
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/api/admin/users/{userID}/wallet": {
|
||
"patch": {
|
||
"security": [
|
||
{
|
||
"BearerAuth": []
|
||
}
|
||
],
|
||
"description": "管理端把指定用户钱包余额调整到目标值,并记录审计日志;balance 不允许为负数。",
|
||
"consumes": [
|
||
"application/json"
|
||
],
|
||
"produces": [
|
||
"application/json"
|
||
],
|
||
"tags": [
|
||
"billing"
|
||
],
|
||
"summary": "设置用户钱包余额",
|
||
"parameters": [
|
||
{
|
||
"type": "string",
|
||
"description": "用户 ID",
|
||
"name": "userID",
|
||
"in": "path",
|
||
"required": true
|
||
},
|
||
{
|
||
"description": "钱包余额设置请求",
|
||
"name": "input",
|
||
"in": "body",
|
||
"required": true,
|
||
"schema": {
|
||
"$ref": "#/definitions/httpapi.walletBalanceRequest"
|
||
}
|
||
}
|
||
],
|
||
"responses": {
|
||
"200": {
|
||
"description": "OK",
|
||
"schema": {
|
||
"$ref": "#/definitions/httpapi.WalletAdjustmentResponse"
|
||
}
|
||
},
|
||
"400": {
|
||
"description": "Bad Request",
|
||
"schema": {
|
||
"$ref": "#/definitions/httpapi.ErrorEnvelope"
|
||
}
|
||
},
|
||
"401": {
|
||
"description": "Unauthorized",
|
||
"schema": {
|
||
"$ref": "#/definitions/httpapi.ErrorEnvelope"
|
||
}
|
||
},
|
||
"403": {
|
||
"description": "Forbidden",
|
||
"schema": {
|
||
"$ref": "#/definitions/httpapi.ErrorEnvelope"
|
||
}
|
||
},
|
||
"404": {
|
||
"description": "Not Found",
|
||
"schema": {
|
||
"$ref": "#/definitions/httpapi.ErrorEnvelope"
|
||
}
|
||
},
|
||
"500": {
|
||
"description": "Internal Server Error",
|
||
"schema": {
|
||
"$ref": "#/definitions/httpapi.ErrorEnvelope"
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/api/playground/api-keys": {
|
||
"get": {
|
||
"security": [
|
||
{
|
||
"BearerAuth": []
|
||
}
|
||
],
|
||
"description": "返回当前本地用户可在 Playground 中直接使用的 API Key 和 secret。",
|
||
"produces": [
|
||
"application/json"
|
||
],
|
||
"tags": [
|
||
"playground"
|
||
],
|
||
"summary": "列出 Playground API Key",
|
||
"responses": {
|
||
"200": {
|
||
"description": "OK",
|
||
"schema": {
|
||
"$ref": "#/definitions/httpapi.PlayableAPIKeyListResponse"
|
||
}
|
||
},
|
||
"400": {
|
||
"description": "Bad Request",
|
||
"schema": {
|
||
"$ref": "#/definitions/httpapi.ErrorEnvelope"
|
||
}
|
||
},
|
||
"401": {
|
||
"description": "Unauthorized",
|
||
"schema": {
|
||
"$ref": "#/definitions/httpapi.ErrorEnvelope"
|
||
}
|
||
},
|
||
"500": {
|
||
"description": "Internal Server Error",
|
||
"schema": {
|
||
"$ref": "#/definitions/httpapi.ErrorEnvelope"
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/api/v1/api-keys": {
|
||
"get": {
|
||
"security": [
|
||
{
|
||
"BearerAuth": []
|
||
}
|
||
],
|
||
"description": "返回当前用户创建的 API Key 元数据,secret 只在创建时返回。",
|
||
"produces": [
|
||
"application/json"
|
||
],
|
||
"tags": [
|
||
"api-keys"
|
||
],
|
||
"summary": "列出 API Key",
|
||
"responses": {
|
||
"200": {
|
||
"description": "OK",
|
||
"schema": {
|
||
"$ref": "#/definitions/httpapi.APIKeyListResponse"
|
||
}
|
||
},
|
||
"401": {
|
||
"description": "Unauthorized",
|
||
"schema": {
|
||
"$ref": "#/definitions/httpapi.ErrorEnvelope"
|
||
}
|
||
},
|
||
"500": {
|
||
"description": "Internal Server Error",
|
||
"schema": {
|
||
"$ref": "#/definitions/httpapi.ErrorEnvelope"
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"post": {
|
||
"security": [
|
||
{
|
||
"BearerAuth": []
|
||
}
|
||
],
|
||
"description": "为当前本地用户创建 API Key;secret 仅在本次响应中返回。",
|
||
"consumes": [
|
||
"application/json"
|
||
],
|
||
"produces": [
|
||
"application/json"
|
||
],
|
||
"tags": [
|
||
"api-keys"
|
||
],
|
||
"summary": "创建 API Key",
|
||
"parameters": [
|
||
{
|
||
"description": "API Key 创建请求",
|
||
"name": "input",
|
||
"in": "body",
|
||
"required": true,
|
||
"schema": {
|
||
"$ref": "#/definitions/store.CreateAPIKeyInput"
|
||
}
|
||
}
|
||
],
|
||
"responses": {
|
||
"201": {
|
||
"description": "Created",
|
||
"schema": {
|
||
"$ref": "#/definitions/store.CreatedAPIKey"
|
||
}
|
||
},
|
||
"400": {
|
||
"description": "Bad Request",
|
||
"schema": {
|
||
"$ref": "#/definitions/httpapi.ErrorEnvelope"
|
||
}
|
||
},
|
||
"401": {
|
||
"description": "Unauthorized",
|
||
"schema": {
|
||
"$ref": "#/definitions/httpapi.ErrorEnvelope"
|
||
}
|
||
},
|
||
"500": {
|
||
"description": "Internal Server Error",
|
||
"schema": {
|
||
"$ref": "#/definitions/httpapi.ErrorEnvelope"
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/api/v1/api-keys/access-rules": {
|
||
"get": {
|
||
"security": [
|
||
{
|
||
"BearerAuth": []
|
||
}
|
||
],
|
||
"description": "返回当前本地用户可管理的 API Key 访问规则。",
|
||
"produces": [
|
||
"application/json"
|
||
],
|
||
"tags": [
|
||
"api-keys"
|
||
],
|
||
"summary": "列出 API Key 访问规则",
|
||
"responses": {
|
||
"200": {
|
||
"description": "OK",
|
||
"schema": {
|
||
"$ref": "#/definitions/httpapi.AccessRuleListResponse"
|
||
}
|
||
},
|
||
"400": {
|
||
"description": "Bad Request",
|
||
"schema": {
|
||
"$ref": "#/definitions/httpapi.ErrorEnvelope"
|
||
}
|
||
},
|
||
"401": {
|
||
"description": "Unauthorized",
|
||
"schema": {
|
||
"$ref": "#/definitions/httpapi.ErrorEnvelope"
|
||
}
|
||
},
|
||
"500": {
|
||
"description": "Internal Server Error",
|
||
"schema": {
|
||
"$ref": "#/definitions/httpapi.ErrorEnvelope"
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/api/v1/api-keys/access-rules/batch": {
|
||
"post": {
|
||
"security": [
|
||
{
|
||
"BearerAuth": []
|
||
}
|
||
],
|
||
"description": "当前本地用户为自己的 API Key 批量新增、更新或删除可访问资源。",
|
||
"consumes": [
|
||
"application/json"
|
||
],
|
||
"produces": [
|
||
"application/json"
|
||
],
|
||
"tags": [
|
||
"api-keys"
|
||
],
|
||
"summary": "批量写入 API Key 访问规则",
|
||
"parameters": [
|
||
{
|
||
"description": "API Key 访问规则批量请求,subjectType 必须为 api_key",
|
||
"name": "input",
|
||
"in": "body",
|
||
"required": true,
|
||
"schema": {
|
||
"$ref": "#/definitions/store.AccessRuleBatchInput"
|
||
}
|
||
}
|
||
],
|
||
"responses": {
|
||
"200": {
|
||
"description": "OK",
|
||
"schema": {
|
||
"$ref": "#/definitions/httpapi.AccessRuleListResponse"
|
||
}
|
||
},
|
||
"400": {
|
||
"description": "Bad Request",
|
||
"schema": {
|
||
"$ref": "#/definitions/httpapi.ErrorEnvelope"
|
||
}
|
||
},
|
||
"401": {
|
||
"description": "Unauthorized",
|
||
"schema": {
|
||
"$ref": "#/definitions/httpapi.ErrorEnvelope"
|
||
}
|
||
},
|
||
"403": {
|
||
"description": "Forbidden",
|
||
"schema": {
|
||
"$ref": "#/definitions/httpapi.ErrorEnvelope"
|
||
}
|
||
},
|
||
"404": {
|
||
"description": "Not Found",
|
||
"schema": {
|
||
"$ref": "#/definitions/httpapi.ErrorEnvelope"
|
||
}
|
||
},
|
||
"500": {
|
||
"description": "Internal Server Error",
|
||
"schema": {
|
||
"$ref": "#/definitions/httpapi.ErrorEnvelope"
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/api/v1/api-keys/{apiKeyID}": {
|
||
"delete": {
|
||
"security": [
|
||
{
|
||
"BearerAuth": []
|
||
}
|
||
],
|
||
"description": "删除当前用户拥有的 API Key。",
|
||
"produces": [
|
||
"application/json"
|
||
],
|
||
"tags": [
|
||
"api-keys"
|
||
],
|
||
"summary": "删除 API Key",
|
||
"parameters": [
|
||
{
|
||
"type": "string",
|
||
"description": "API Key ID",
|
||
"name": "apiKeyID",
|
||
"in": "path",
|
||
"required": true
|
||
}
|
||
],
|
||
"responses": {
|
||
"204": {
|
||
"description": "No Content"
|
||
},
|
||
"400": {
|
||
"description": "Bad Request",
|
||
"schema": {
|
||
"$ref": "#/definitions/httpapi.ErrorEnvelope"
|
||
}
|
||
},
|
||
"401": {
|
||
"description": "Unauthorized",
|
||
"schema": {
|
||
"$ref": "#/definitions/httpapi.ErrorEnvelope"
|
||
}
|
||
},
|
||
"404": {
|
||
"description": "Not Found",
|
||
"schema": {
|
||
"$ref": "#/definitions/httpapi.ErrorEnvelope"
|
||
}
|
||
},
|
||
"500": {
|
||
"description": "Internal Server Error",
|
||
"schema": {
|
||
"$ref": "#/definitions/httpapi.ErrorEnvelope"
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/api/v1/api-keys/{apiKeyID}/disable": {
|
||
"patch": {
|
||
"security": [
|
||
{
|
||
"BearerAuth": []
|
||
}
|
||
],
|
||
"description": "禁用当前用户拥有的 API Key,保留记录但不再允许调用。",
|
||
"produces": [
|
||
"application/json"
|
||
],
|
||
"tags": [
|
||
"api-keys"
|
||
],
|
||
"summary": "禁用 API Key",
|
||
"parameters": [
|
||
{
|
||
"type": "string",
|
||
"description": "API Key ID",
|
||
"name": "apiKeyID",
|
||
"in": "path",
|
||
"required": true
|
||
}
|
||
],
|
||
"responses": {
|
||
"200": {
|
||
"description": "OK",
|
||
"schema": {
|
||
"$ref": "#/definitions/store.APIKey"
|
||
}
|
||
},
|
||
"400": {
|
||
"description": "Bad Request",
|
||
"schema": {
|
||
"$ref": "#/definitions/httpapi.ErrorEnvelope"
|
||
}
|
||
},
|
||
"401": {
|
||
"description": "Unauthorized",
|
||
"schema": {
|
||
"$ref": "#/definitions/httpapi.ErrorEnvelope"
|
||
}
|
||
},
|
||
"404": {
|
||
"description": "Not Found",
|
||
"schema": {
|
||
"$ref": "#/definitions/httpapi.ErrorEnvelope"
|
||
}
|
||
},
|
||
"500": {
|
||
"description": "Internal Server Error",
|
||
"schema": {
|
||
"$ref": "#/definitions/httpapi.ErrorEnvelope"
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/api/v1/auth/login": {
|
||
"post": {
|
||
"description": "使用用户名或邮箱登录本地账号,并返回 24 小时 JWT。",
|
||
"consumes": [
|
||
"application/json"
|
||
],
|
||
"produces": [
|
||
"application/json"
|
||
],
|
||
"tags": [
|
||
"auth"
|
||
],
|
||
"summary": "本地登录",
|
||
"parameters": [
|
||
{
|
||
"description": "登录请求,account 可为用户名或邮箱",
|
||
"name": "input",
|
||
"in": "body",
|
||
"required": true,
|
||
"schema": {
|
||
"$ref": "#/definitions/store.LocalLoginInput"
|
||
}
|
||
}
|
||
],
|
||
"responses": {
|
||
"200": {
|
||
"description": "OK",
|
||
"schema": {
|
||
"$ref": "#/definitions/httpapi.AuthResponse"
|
||
}
|
||
},
|
||
"400": {
|
||
"description": "Bad Request",
|
||
"schema": {
|
||
"$ref": "#/definitions/httpapi.ErrorEnvelope"
|
||
}
|
||
},
|
||
"401": {
|
||
"description": "Unauthorized",
|
||
"schema": {
|
||
"$ref": "#/definitions/httpapi.ErrorEnvelope"
|
||
}
|
||
},
|
||
"403": {
|
||
"description": "Forbidden",
|
||
"schema": {
|
||
"$ref": "#/definitions/httpapi.ErrorEnvelope"
|
||
}
|
||
},
|
||
"500": {
|
||
"description": "Internal Server Error",
|
||
"schema": {
|
||
"$ref": "#/definitions/httpapi.ErrorEnvelope"
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/api/v1/auth/register": {
|
||
"post": {
|
||
"description": "在 standalone 或 hybrid 身份模式下创建本地用户,并返回 24 小时 JWT。",
|
||
"consumes": [
|
||
"application/json"
|
||
],
|
||
"produces": [
|
||
"application/json"
|
||
],
|
||
"tags": [
|
||
"auth"
|
||
],
|
||
"summary": "本地注册",
|
||
"parameters": [
|
||
{
|
||
"description": "注册请求,password 至少 8 位,invitationCode 取决于部署策略",
|
||
"name": "input",
|
||
"in": "body",
|
||
"required": true,
|
||
"schema": {
|
||
"$ref": "#/definitions/store.LocalRegisterInput"
|
||
}
|
||
}
|
||
],
|
||
"responses": {
|
||
"201": {
|
||
"description": "Created",
|
||
"schema": {
|
||
"$ref": "#/definitions/httpapi.AuthResponse"
|
||
}
|
||
},
|
||
"400": {
|
||
"description": "Bad Request",
|
||
"schema": {
|
||
"$ref": "#/definitions/httpapi.ErrorEnvelope"
|
||
}
|
||
},
|
||
"403": {
|
||
"description": "Forbidden",
|
||
"schema": {
|
||
"$ref": "#/definitions/httpapi.ErrorEnvelope"
|
||
}
|
||
},
|
||
"409": {
|
||
"description": "Conflict",
|
||
"schema": {
|
||
"$ref": "#/definitions/httpapi.ErrorEnvelope"
|
||
}
|
||
},
|
||
"500": {
|
||
"description": "Internal Server Error",
|
||
"schema": {
|
||
"$ref": "#/definitions/httpapi.ErrorEnvelope"
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/api/v1/chat/completions": {
|
||
"post": {
|
||
"security": [
|
||
{
|
||
"BearerAuth": []
|
||
}
|
||
],
|
||
"description": "网关任务接口按 model 选择平台模型;/api/v1 路径返回任务受理结果,OpenAI-compatible 路径同步返回兼容响应或 SSE 流。",
|
||
"consumes": [
|
||
"application/json"
|
||
],
|
||
"produces": [
|
||
"application/json"
|
||
],
|
||
"tags": [
|
||
"tasks"
|
||
],
|
||
"summary": "创建或执行 AI 任务",
|
||
"parameters": [
|
||
{
|
||
"type": "boolean",
|
||
"description": "true 时异步创建任务并返回 202",
|
||
"name": "X-Async",
|
||
"in": "header"
|
||
},
|
||
{
|
||
"description": "AI 任务请求,字段随任务类型变化",
|
||
"name": "input",
|
||
"in": "body",
|
||
"required": true,
|
||
"schema": {
|
||
"$ref": "#/definitions/httpapi.TaskRequest"
|
||
}
|
||
}
|
||
],
|
||
"responses": {
|
||
"200": {
|
||
"description": "OK",
|
||
"schema": {
|
||
"$ref": "#/definitions/httpapi.CompatibleResponse"
|
||
}
|
||
},
|
||
"202": {
|
||
"description": "Accepted",
|
||
"schema": {
|
||
"$ref": "#/definitions/httpapi.TaskAcceptedResponse"
|
||
}
|
||
},
|
||
"400": {
|
||
"description": "Bad Request",
|
||
"schema": {
|
||
"$ref": "#/definitions/httpapi.ErrorEnvelope"
|
||
}
|
||
},
|
||
"401": {
|
||
"description": "Unauthorized",
|
||
"schema": {
|
||
"$ref": "#/definitions/httpapi.ErrorEnvelope"
|
||
}
|
||
},
|
||
"402": {
|
||
"description": "Payment Required",
|
||
"schema": {
|
||
"$ref": "#/definitions/httpapi.ErrorEnvelope"
|
||
}
|
||
},
|
||
"403": {
|
||
"description": "Forbidden",
|
||
"schema": {
|
||
"$ref": "#/definitions/httpapi.ErrorEnvelope"
|
||
}
|
||
},
|
||
"404": {
|
||
"description": "Not Found",
|
||
"schema": {
|
||
"$ref": "#/definitions/httpapi.ErrorEnvelope"
|
||
}
|
||
},
|
||
"429": {
|
||
"description": "Too Many Requests",
|
||
"schema": {
|
||
"$ref": "#/definitions/httpapi.ErrorEnvelope"
|
||
}
|
||
},
|
||
"502": {
|
||
"description": "Bad Gateway",
|
||
"schema": {
|
||
"$ref": "#/definitions/httpapi.ErrorEnvelope"
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/api/v1/images/edits": {
|
||
"post": {
|
||
"security": [
|
||
{
|
||
"BearerAuth": []
|
||
}
|
||
],
|
||
"description": "网关任务接口按 model 选择平台模型;/api/v1 路径返回任务受理结果,OpenAI-compatible 路径同步返回兼容响应或 SSE 流。",
|
||
"consumes": [
|
||
"application/json"
|
||
],
|
||
"produces": [
|
||
"application/json"
|
||
],
|
||
"tags": [
|
||
"tasks"
|
||
],
|
||
"summary": "创建或执行 AI 任务",
|
||
"parameters": [
|
||
{
|
||
"type": "boolean",
|
||
"description": "true 时异步创建任务并返回 202",
|
||
"name": "X-Async",
|
||
"in": "header"
|
||
},
|
||
{
|
||
"description": "AI 任务请求,字段随任务类型变化",
|
||
"name": "input",
|
||
"in": "body",
|
||
"required": true,
|
||
"schema": {
|
||
"$ref": "#/definitions/httpapi.TaskRequest"
|
||
}
|
||
}
|
||
],
|
||
"responses": {
|
||
"200": {
|
||
"description": "OK",
|
||
"schema": {
|
||
"$ref": "#/definitions/httpapi.CompatibleResponse"
|
||
}
|
||
},
|
||
"202": {
|
||
"description": "Accepted",
|
||
"schema": {
|
||
"$ref": "#/definitions/httpapi.TaskAcceptedResponse"
|
||
}
|
||
},
|
||
"400": {
|
||
"description": "Bad Request",
|
||
"schema": {
|
||
"$ref": "#/definitions/httpapi.ErrorEnvelope"
|
||
}
|
||
},
|
||
"401": {
|
||
"description": "Unauthorized",
|
||
"schema": {
|
||
"$ref": "#/definitions/httpapi.ErrorEnvelope"
|
||
}
|
||
},
|
||
"402": {
|
||
"description": "Payment Required",
|
||
"schema": {
|
||
"$ref": "#/definitions/httpapi.ErrorEnvelope"
|
||
}
|
||
},
|
||
"403": {
|
||
"description": "Forbidden",
|
||
"schema": {
|
||
"$ref": "#/definitions/httpapi.ErrorEnvelope"
|
||
}
|
||
},
|
||
"404": {
|
||
"description": "Not Found",
|
||
"schema": {
|
||
"$ref": "#/definitions/httpapi.ErrorEnvelope"
|
||
}
|
||
},
|
||
"429": {
|
||
"description": "Too Many Requests",
|
||
"schema": {
|
||
"$ref": "#/definitions/httpapi.ErrorEnvelope"
|
||
}
|
||
},
|
||
"502": {
|
||
"description": "Bad Gateway",
|
||
"schema": {
|
||
"$ref": "#/definitions/httpapi.ErrorEnvelope"
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/api/v1/images/generations": {
|
||
"post": {
|
||
"security": [
|
||
{
|
||
"BearerAuth": []
|
||
}
|
||
],
|
||
"description": "网关任务接口按 model 选择平台模型;/api/v1 路径返回任务受理结果,OpenAI-compatible 路径同步返回兼容响应或 SSE 流。",
|
||
"consumes": [
|
||
"application/json"
|
||
],
|
||
"produces": [
|
||
"application/json"
|
||
],
|
||
"tags": [
|
||
"tasks"
|
||
],
|
||
"summary": "创建或执行 AI 任务",
|
||
"parameters": [
|
||
{
|
||
"type": "boolean",
|
||
"description": "true 时异步创建任务并返回 202",
|
||
"name": "X-Async",
|
||
"in": "header"
|
||
},
|
||
{
|
||
"description": "AI 任务请求,字段随任务类型变化",
|
||
"name": "input",
|
||
"in": "body",
|
||
"required": true,
|
||
"schema": {
|
||
"$ref": "#/definitions/httpapi.TaskRequest"
|
||
}
|
||
}
|
||
],
|
||
"responses": {
|
||
"200": {
|
||
"description": "OK",
|
||
"schema": {
|
||
"$ref": "#/definitions/httpapi.CompatibleResponse"
|
||
}
|
||
},
|
||
"202": {
|
||
"description": "Accepted",
|
||
"schema": {
|
||
"$ref": "#/definitions/httpapi.TaskAcceptedResponse"
|
||
}
|
||
},
|
||
"400": {
|
||
"description": "Bad Request",
|
||
"schema": {
|
||
"$ref": "#/definitions/httpapi.ErrorEnvelope"
|
||
}
|
||
},
|
||
"401": {
|
||
"description": "Unauthorized",
|
||
"schema": {
|
||
"$ref": "#/definitions/httpapi.ErrorEnvelope"
|
||
}
|
||
},
|
||
"402": {
|
||
"description": "Payment Required",
|
||
"schema": {
|
||
"$ref": "#/definitions/httpapi.ErrorEnvelope"
|
||
}
|
||
},
|
||
"403": {
|
||
"description": "Forbidden",
|
||
"schema": {
|
||
"$ref": "#/definitions/httpapi.ErrorEnvelope"
|
||
}
|
||
},
|
||
"404": {
|
||
"description": "Not Found",
|
||
"schema": {
|
||
"$ref": "#/definitions/httpapi.ErrorEnvelope"
|
||
}
|
||
},
|
||
"429": {
|
||
"description": "Too Many Requests",
|
||
"schema": {
|
||
"$ref": "#/definitions/httpapi.ErrorEnvelope"
|
||
}
|
||
},
|
||
"502": {
|
||
"description": "Bad Gateway",
|
||
"schema": {
|
||
"$ref": "#/definitions/httpapi.ErrorEnvelope"
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/api/v1/me": {
|
||
"get": {
|
||
"security": [
|
||
{
|
||
"BearerAuth": []
|
||
}
|
||
],
|
||
"description": "返回鉴权中解析出的用户、租户、用户组和 API Key 上下文。",
|
||
"produces": [
|
||
"application/json"
|
||
],
|
||
"tags": [
|
||
"auth"
|
||
],
|
||
"summary": "获取当前用户",
|
||
"responses": {
|
||
"200": {
|
||
"description": "OK",
|
||
"schema": {
|
||
"$ref": "#/definitions/auth.User"
|
||
}
|
||
},
|
||
"401": {
|
||
"description": "Unauthorized",
|
||
"schema": {
|
||
"$ref": "#/definitions/httpapi.ErrorEnvelope"
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/api/v1/model-catalog": {
|
||
"get": {
|
||
"security": [
|
||
{
|
||
"BearerAuth": []
|
||
}
|
||
],
|
||
"description": "聚合平台模型、基础模型、供应商、运行策略和访问规则,返回前端模型目录所需的过滤器、摘要和展示字段。",
|
||
"produces": [
|
||
"application/json"
|
||
],
|
||
"tags": [
|
||
"model-catalog"
|
||
],
|
||
"summary": "列出模型目录",
|
||
"responses": {
|
||
"200": {
|
||
"description": "OK",
|
||
"schema": {
|
||
"$ref": "#/definitions/httpapi.ModelCatalogResponse"
|
||
}
|
||
},
|
||
"401": {
|
||
"description": "Unauthorized",
|
||
"schema": {
|
||
"$ref": "#/definitions/httpapi.ErrorEnvelope"
|
||
}
|
||
},
|
||
"500": {
|
||
"description": "Internal Server Error",
|
||
"schema": {
|
||
"$ref": "#/definitions/httpapi.ErrorEnvelope"
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/api/v1/models": {
|
||
"get": {
|
||
"security": [
|
||
{
|
||
"BearerAuth": []
|
||
}
|
||
],
|
||
"description": "按当前用户权限返回可用于 Playground 或 API 调用的模型列表。",
|
||
"produces": [
|
||
"application/json"
|
||
],
|
||
"tags": [
|
||
"playground"
|
||
],
|
||
"summary": "列出可调用模型",
|
||
"responses": {
|
||
"200": {
|
||
"description": "OK",
|
||
"schema": {
|
||
"$ref": "#/definitions/httpapi.PlatformModelListResponse"
|
||
}
|
||
},
|
||
"401": {
|
||
"description": "Unauthorized",
|
||
"schema": {
|
||
"$ref": "#/definitions/httpapi.ErrorEnvelope"
|
||
}
|
||
},
|
||
"500": {
|
||
"description": "Internal Server Error",
|
||
"schema": {
|
||
"$ref": "#/definitions/httpapi.ErrorEnvelope"
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/api/v1/platforms": {
|
||
"get": {
|
||
"security": [
|
||
{
|
||
"BearerAuth": []
|
||
}
|
||
],
|
||
"description": "按当前用户可访问模型过滤平台,仅返回启用且存在可访问模型的平台。",
|
||
"produces": [
|
||
"application/json"
|
||
],
|
||
"tags": [
|
||
"playground"
|
||
],
|
||
"summary": "列出可用平台",
|
||
"responses": {
|
||
"200": {
|
||
"description": "OK",
|
||
"schema": {
|
||
"$ref": "#/definitions/httpapi.PlatformListResponse"
|
||
}
|
||
},
|
||
"401": {
|
||
"description": "Unauthorized",
|
||
"schema": {
|
||
"$ref": "#/definitions/httpapi.ErrorEnvelope"
|
||
}
|
||
},
|
||
"500": {
|
||
"description": "Internal Server Error",
|
||
"schema": {
|
||
"$ref": "#/definitions/httpapi.ErrorEnvelope"
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/api/v1/playground/models": {
|
||
"get": {
|
||
"security": [
|
||
{
|
||
"BearerAuth": []
|
||
}
|
||
],
|
||
"description": "按当前用户权限返回可用于 Playground 或 API 调用的模型列表。",
|
||
"produces": [
|
||
"application/json"
|
||
],
|
||
"tags": [
|
||
"playground"
|
||
],
|
||
"summary": "列出可调用模型",
|
||
"responses": {
|
||
"200": {
|
||
"description": "OK",
|
||
"schema": {
|
||
"$ref": "#/definitions/httpapi.PlatformModelListResponse"
|
||
}
|
||
},
|
||
"401": {
|
||
"description": "Unauthorized",
|
||
"schema": {
|
||
"$ref": "#/definitions/httpapi.ErrorEnvelope"
|
||
}
|
||
},
|
||
"500": {
|
||
"description": "Internal Server Error",
|
||
"schema": {
|
||
"$ref": "#/definitions/httpapi.ErrorEnvelope"
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/api/v1/pricing/estimate": {
|
||
"post": {
|
||
"security": [
|
||
{
|
||
"BearerAuth": []
|
||
}
|
||
],
|
||
"description": "按当前用户、模型候选、任务类型和请求参数估算计费条目。",
|
||
"consumes": [
|
||
"application/json"
|
||
],
|
||
"produces": [
|
||
"application/json"
|
||
],
|
||
"tags": [
|
||
"pricing"
|
||
],
|
||
"summary": "估算请求价格",
|
||
"parameters": [
|
||
{
|
||
"description": "计费估算请求,kind 默认为 chat.completions",
|
||
"name": "input",
|
||
"in": "body",
|
||
"required": true,
|
||
"schema": {
|
||
"$ref": "#/definitions/httpapi.PricingEstimateRequest"
|
||
}
|
||
}
|
||
],
|
||
"responses": {
|
||
"200": {
|
||
"description": "OK",
|
||
"schema": {
|
||
"$ref": "#/definitions/httpapi.PricingEstimateResponse"
|
||
}
|
||
},
|
||
"400": {
|
||
"description": "Bad Request",
|
||
"schema": {
|
||
"$ref": "#/definitions/httpapi.ErrorEnvelope"
|
||
}
|
||
},
|
||
"401": {
|
||
"description": "Unauthorized",
|
||
"schema": {
|
||
"$ref": "#/definitions/httpapi.ErrorEnvelope"
|
||
}
|
||
},
|
||
"403": {
|
||
"description": "Forbidden",
|
||
"schema": {
|
||
"$ref": "#/definitions/httpapi.ErrorEnvelope"
|
||
}
|
||
},
|
||
"404": {
|
||
"description": "Not Found",
|
||
"schema": {
|
||
"$ref": "#/definitions/httpapi.ErrorEnvelope"
|
||
}
|
||
},
|
||
"429": {
|
||
"description": "Too Many Requests",
|
||
"schema": {
|
||
"$ref": "#/definitions/httpapi.ErrorEnvelope"
|
||
}
|
||
},
|
||
"500": {
|
||
"description": "Internal Server Error",
|
||
"schema": {
|
||
"$ref": "#/definitions/httpapi.ErrorEnvelope"
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/api/v1/public/catalog/base-models": {
|
||
"get": {
|
||
"description": "返回基础模型目录;公共路径和管理路径返回同一结构。",
|
||
"produces": [
|
||
"application/json"
|
||
],
|
||
"tags": [
|
||
"catalog"
|
||
],
|
||
"summary": "列出基础模型",
|
||
"responses": {
|
||
"200": {
|
||
"description": "OK",
|
||
"schema": {
|
||
"$ref": "#/definitions/httpapi.BaseModelListResponse"
|
||
}
|
||
},
|
||
"500": {
|
||
"description": "Internal Server Error",
|
||
"schema": {
|
||
"$ref": "#/definitions/httpapi.ErrorEnvelope"
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/api/v1/public/catalog/providers": {
|
||
"get": {
|
||
"description": "返回模型目录使用的供应商元数据;公共路径和管理路径返回同一结构。",
|
||
"produces": [
|
||
"application/json"
|
||
],
|
||
"tags": [
|
||
"catalog"
|
||
],
|
||
"summary": "列出目录供应商",
|
||
"responses": {
|
||
"200": {
|
||
"description": "OK",
|
||
"schema": {
|
||
"$ref": "#/definitions/httpapi.CatalogProviderListResponse"
|
||
}
|
||
},
|
||
"500": {
|
||
"description": "Internal Server Error",
|
||
"schema": {
|
||
"$ref": "#/definitions/httpapi.ErrorEnvelope"
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/api/v1/responses": {
|
||
"post": {
|
||
"security": [
|
||
{
|
||
"BearerAuth": []
|
||
}
|
||
],
|
||
"description": "网关任务接口按 model 选择平台模型;/api/v1 路径返回任务受理结果,OpenAI-compatible 路径同步返回兼容响应或 SSE 流。",
|
||
"consumes": [
|
||
"application/json"
|
||
],
|
||
"produces": [
|
||
"application/json"
|
||
],
|
||
"tags": [
|
||
"tasks"
|
||
],
|
||
"summary": "创建或执行 AI 任务",
|
||
"parameters": [
|
||
{
|
||
"type": "boolean",
|
||
"description": "true 时异步创建任务并返回 202",
|
||
"name": "X-Async",
|
||
"in": "header"
|
||
},
|
||
{
|
||
"description": "AI 任务请求,字段随任务类型变化",
|
||
"name": "input",
|
||
"in": "body",
|
||
"required": true,
|
||
"schema": {
|
||
"$ref": "#/definitions/httpapi.TaskRequest"
|
||
}
|
||
}
|
||
],
|
||
"responses": {
|
||
"200": {
|
||
"description": "OK",
|
||
"schema": {
|
||
"$ref": "#/definitions/httpapi.CompatibleResponse"
|
||
}
|
||
},
|
||
"202": {
|
||
"description": "Accepted",
|
||
"schema": {
|
||
"$ref": "#/definitions/httpapi.TaskAcceptedResponse"
|
||
}
|
||
},
|
||
"400": {
|
||
"description": "Bad Request",
|
||
"schema": {
|
||
"$ref": "#/definitions/httpapi.ErrorEnvelope"
|
||
}
|
||
},
|
||
"401": {
|
||
"description": "Unauthorized",
|
||
"schema": {
|
||
"$ref": "#/definitions/httpapi.ErrorEnvelope"
|
||
}
|
||
},
|
||
"402": {
|
||
"description": "Payment Required",
|
||
"schema": {
|
||
"$ref": "#/definitions/httpapi.ErrorEnvelope"
|
||
}
|
||
},
|
||
"403": {
|
||
"description": "Forbidden",
|
||
"schema": {
|
||
"$ref": "#/definitions/httpapi.ErrorEnvelope"
|
||
}
|
||
},
|
||
"404": {
|
||
"description": "Not Found",
|
||
"schema": {
|
||
"$ref": "#/definitions/httpapi.ErrorEnvelope"
|
||
}
|
||
},
|
||
"429": {
|
||
"description": "Too Many Requests",
|
||
"schema": {
|
||
"$ref": "#/definitions/httpapi.ErrorEnvelope"
|
||
}
|
||
},
|
||
"502": {
|
||
"description": "Bad Gateway",
|
||
"schema": {
|
||
"$ref": "#/definitions/httpapi.ErrorEnvelope"
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/api/v1/tasks": {
|
||
"get": {
|
||
"security": [
|
||
{
|
||
"BearerAuth": []
|
||
}
|
||
],
|
||
"description": "按当前用户列出任务,支持关键字、模型类型、时间范围和分页过滤。",
|
||
"produces": [
|
||
"application/json"
|
||
],
|
||
"tags": [
|
||
"tasks"
|
||
],
|
||
"summary": "列出任务",
|
||
"parameters": [
|
||
{
|
||
"type": "string",
|
||
"description": "搜索关键字,别名 query",
|
||
"name": "q",
|
||
"in": "query"
|
||
},
|
||
{
|
||
"type": "string",
|
||
"description": "模型类型,别名 type",
|
||
"name": "modelType",
|
||
"in": "query"
|
||
},
|
||
{
|
||
"type": "string",
|
||
"description": "创建时间起点,支持 RFC3339 或日期格式,别名 from",
|
||
"name": "createdFrom",
|
||
"in": "query"
|
||
},
|
||
{
|
||
"type": "string",
|
||
"description": "创建时间终点,支持 RFC3339 或日期格式,别名 to",
|
||
"name": "createdTo",
|
||
"in": "query"
|
||
},
|
||
{
|
||
"type": "integer",
|
||
"default": 1,
|
||
"description": "页码",
|
||
"name": "page",
|
||
"in": "query"
|
||
},
|
||
{
|
||
"type": "integer",
|
||
"default": 50,
|
||
"description": "每页数量,别名 limit",
|
||
"name": "pageSize",
|
||
"in": "query"
|
||
}
|
||
],
|
||
"responses": {
|
||
"200": {
|
||
"description": "OK",
|
||
"schema": {
|
||
"$ref": "#/definitions/httpapi.TaskListResponse"
|
||
}
|
||
},
|
||
"400": {
|
||
"description": "Bad Request",
|
||
"schema": {
|
||
"$ref": "#/definitions/httpapi.ErrorEnvelope"
|
||
}
|
||
},
|
||
"401": {
|
||
"description": "Unauthorized",
|
||
"schema": {
|
||
"$ref": "#/definitions/httpapi.ErrorEnvelope"
|
||
}
|
||
},
|
||
"500": {
|
||
"description": "Internal Server Error",
|
||
"schema": {
|
||
"$ref": "#/definitions/httpapi.ErrorEnvelope"
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/api/v1/tasks/{taskID}": {
|
||
"get": {
|
||
"security": [
|
||
{
|
||
"BearerAuth": []
|
||
}
|
||
],
|
||
"description": "返回指定任务的请求、状态、输出和执行摘要。",
|
||
"produces": [
|
||
"application/json"
|
||
],
|
||
"tags": [
|
||
"tasks"
|
||
],
|
||
"summary": "获取任务详情",
|
||
"parameters": [
|
||
{
|
||
"type": "string",
|
||
"description": "任务 ID",
|
||
"name": "taskID",
|
||
"in": "path",
|
||
"required": true
|
||
}
|
||
],
|
||
"responses": {
|
||
"200": {
|
||
"description": "OK",
|
||
"schema": {
|
||
"$ref": "#/definitions/store.GatewayTask"
|
||
}
|
||
},
|
||
"401": {
|
||
"description": "Unauthorized",
|
||
"schema": {
|
||
"$ref": "#/definitions/httpapi.ErrorEnvelope"
|
||
}
|
||
},
|
||
"404": {
|
||
"description": "Not Found",
|
||
"schema": {
|
||
"$ref": "#/definitions/httpapi.ErrorEnvelope"
|
||
}
|
||
},
|
||
"500": {
|
||
"description": "Internal Server Error",
|
||
"schema": {
|
||
"$ref": "#/definitions/httpapi.ErrorEnvelope"
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/api/v1/tasks/{taskID}/events": {
|
||
"get": {
|
||
"security": [
|
||
{
|
||
"BearerAuth": []
|
||
}
|
||
],
|
||
"description": "以 text/event-stream 返回指定任务的历史事件;无事件时返回 task.accepted 占位事件。",
|
||
"produces": [
|
||
"text/event-stream"
|
||
],
|
||
"tags": [
|
||
"tasks"
|
||
],
|
||
"summary": "订阅任务事件",
|
||
"parameters": [
|
||
{
|
||
"type": "string",
|
||
"description": "任务 ID",
|
||
"name": "taskID",
|
||
"in": "path",
|
||
"required": true
|
||
}
|
||
],
|
||
"responses": {
|
||
"200": {
|
||
"description": "Server-Sent Events,data 为 store.TaskEvent 或 TaskAcceptedEvent",
|
||
"schema": {
|
||
"type": "string"
|
||
}
|
||
},
|
||
"401": {
|
||
"description": "Unauthorized",
|
||
"schema": {
|
||
"$ref": "#/definitions/httpapi.ErrorEnvelope"
|
||
}
|
||
},
|
||
"404": {
|
||
"description": "Not Found",
|
||
"schema": {
|
||
"$ref": "#/definitions/httpapi.ErrorEnvelope"
|
||
}
|
||
},
|
||
"500": {
|
||
"description": "Internal Server Error",
|
||
"schema": {
|
||
"$ref": "#/definitions/httpapi.ErrorEnvelope"
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/api/v1/tasks/{taskID}/param-preprocessing": {
|
||
"get": {
|
||
"security": [
|
||
{
|
||
"BearerAuth": []
|
||
}
|
||
],
|
||
"description": "返回指定任务在执行前的参数改写、校验或模板处理日志。",
|
||
"produces": [
|
||
"application/json"
|
||
],
|
||
"tags": [
|
||
"tasks"
|
||
],
|
||
"summary": "获取任务参数预处理日志",
|
||
"parameters": [
|
||
{
|
||
"type": "string",
|
||
"description": "任务 ID",
|
||
"name": "taskID",
|
||
"in": "path",
|
||
"required": true
|
||
}
|
||
],
|
||
"responses": {
|
||
"200": {
|
||
"description": "OK",
|
||
"schema": {
|
||
"$ref": "#/definitions/httpapi.TaskParamPreprocessingLogListResponse"
|
||
}
|
||
},
|
||
"401": {
|
||
"description": "Unauthorized",
|
||
"schema": {
|
||
"$ref": "#/definitions/httpapi.ErrorEnvelope"
|
||
}
|
||
},
|
||
"404": {
|
||
"description": "Not Found",
|
||
"schema": {
|
||
"$ref": "#/definitions/httpapi.ErrorEnvelope"
|
||
}
|
||
},
|
||
"500": {
|
||
"description": "Internal Server Error",
|
||
"schema": {
|
||
"$ref": "#/definitions/httpapi.ErrorEnvelope"
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/api/v1/videos/generations": {
|
||
"post": {
|
||
"security": [
|
||
{
|
||
"BearerAuth": []
|
||
}
|
||
],
|
||
"description": "网关任务接口按 model 选择平台模型;/api/v1 路径返回任务受理结果,OpenAI-compatible 路径同步返回兼容响应或 SSE 流。",
|
||
"consumes": [
|
||
"application/json"
|
||
],
|
||
"produces": [
|
||
"application/json"
|
||
],
|
||
"tags": [
|
||
"tasks"
|
||
],
|
||
"summary": "创建或执行 AI 任务",
|
||
"parameters": [
|
||
{
|
||
"type": "boolean",
|
||
"description": "true 时异步创建任务并返回 202",
|
||
"name": "X-Async",
|
||
"in": "header"
|
||
},
|
||
{
|
||
"description": "AI 任务请求,字段随任务类型变化",
|
||
"name": "input",
|
||
"in": "body",
|
||
"required": true,
|
||
"schema": {
|
||
"$ref": "#/definitions/httpapi.TaskRequest"
|
||
}
|
||
}
|
||
],
|
||
"responses": {
|
||
"200": {
|
||
"description": "OK",
|
||
"schema": {
|
||
"$ref": "#/definitions/httpapi.CompatibleResponse"
|
||
}
|
||
},
|
||
"202": {
|
||
"description": "Accepted",
|
||
"schema": {
|
||
"$ref": "#/definitions/httpapi.TaskAcceptedResponse"
|
||
}
|
||
},
|
||
"400": {
|
||
"description": "Bad Request",
|
||
"schema": {
|
||
"$ref": "#/definitions/httpapi.ErrorEnvelope"
|
||
}
|
||
},
|
||
"401": {
|
||
"description": "Unauthorized",
|
||
"schema": {
|
||
"$ref": "#/definitions/httpapi.ErrorEnvelope"
|
||
}
|
||
},
|
||
"402": {
|
||
"description": "Payment Required",
|
||
"schema": {
|
||
"$ref": "#/definitions/httpapi.ErrorEnvelope"
|
||
}
|
||
},
|
||
"403": {
|
||
"description": "Forbidden",
|
||
"schema": {
|
||
"$ref": "#/definitions/httpapi.ErrorEnvelope"
|
||
}
|
||
},
|
||
"404": {
|
||
"description": "Not Found",
|
||
"schema": {
|
||
"$ref": "#/definitions/httpapi.ErrorEnvelope"
|
||
}
|
||
},
|
||
"429": {
|
||
"description": "Too Many Requests",
|
||
"schema": {
|
||
"$ref": "#/definitions/httpapi.ErrorEnvelope"
|
||
}
|
||
},
|
||
"502": {
|
||
"description": "Bad Gateway",
|
||
"schema": {
|
||
"$ref": "#/definitions/httpapi.ErrorEnvelope"
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/api/workspace/tasks": {
|
||
"get": {
|
||
"security": [
|
||
{
|
||
"BearerAuth": []
|
||
}
|
||
],
|
||
"description": "按当前用户列出任务,支持关键字、模型类型、时间范围和分页过滤。",
|
||
"produces": [
|
||
"application/json"
|
||
],
|
||
"tags": [
|
||
"tasks"
|
||
],
|
||
"summary": "列出任务",
|
||
"parameters": [
|
||
{
|
||
"type": "string",
|
||
"description": "搜索关键字,别名 query",
|
||
"name": "q",
|
||
"in": "query"
|
||
},
|
||
{
|
||
"type": "string",
|
||
"description": "模型类型,别名 type",
|
||
"name": "modelType",
|
||
"in": "query"
|
||
},
|
||
{
|
||
"type": "string",
|
||
"description": "创建时间起点,支持 RFC3339 或日期格式,别名 from",
|
||
"name": "createdFrom",
|
||
"in": "query"
|
||
},
|
||
{
|
||
"type": "string",
|
||
"description": "创建时间终点,支持 RFC3339 或日期格式,别名 to",
|
||
"name": "createdTo",
|
||
"in": "query"
|
||
},
|
||
{
|
||
"type": "integer",
|
||
"default": 1,
|
||
"description": "页码",
|
||
"name": "page",
|
||
"in": "query"
|
||
},
|
||
{
|
||
"type": "integer",
|
||
"default": 50,
|
||
"description": "每页数量,别名 limit",
|
||
"name": "pageSize",
|
||
"in": "query"
|
||
}
|
||
],
|
||
"responses": {
|
||
"200": {
|
||
"description": "OK",
|
||
"schema": {
|
||
"$ref": "#/definitions/httpapi.TaskListResponse"
|
||
}
|
||
},
|
||
"400": {
|
||
"description": "Bad Request",
|
||
"schema": {
|
||
"$ref": "#/definitions/httpapi.ErrorEnvelope"
|
||
}
|
||
},
|
||
"401": {
|
||
"description": "Unauthorized",
|
||
"schema": {
|
||
"$ref": "#/definitions/httpapi.ErrorEnvelope"
|
||
}
|
||
},
|
||
"500": {
|
||
"description": "Internal Server Error",
|
||
"schema": {
|
||
"$ref": "#/definitions/httpapi.ErrorEnvelope"
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/api/workspace/tasks/{taskID}": {
|
||
"get": {
|
||
"security": [
|
||
{
|
||
"BearerAuth": []
|
||
}
|
||
],
|
||
"description": "返回指定任务的请求、状态、输出和执行摘要。",
|
||
"produces": [
|
||
"application/json"
|
||
],
|
||
"tags": [
|
||
"tasks"
|
||
],
|
||
"summary": "获取任务详情",
|
||
"parameters": [
|
||
{
|
||
"type": "string",
|
||
"description": "任务 ID",
|
||
"name": "taskID",
|
||
"in": "path",
|
||
"required": true
|
||
}
|
||
],
|
||
"responses": {
|
||
"200": {
|
||
"description": "OK",
|
||
"schema": {
|
||
"$ref": "#/definitions/store.GatewayTask"
|
||
}
|
||
},
|
||
"401": {
|
||
"description": "Unauthorized",
|
||
"schema": {
|
||
"$ref": "#/definitions/httpapi.ErrorEnvelope"
|
||
}
|
||
},
|
||
"404": {
|
||
"description": "Not Found",
|
||
"schema": {
|
||
"$ref": "#/definitions/httpapi.ErrorEnvelope"
|
||
}
|
||
},
|
||
"500": {
|
||
"description": "Internal Server Error",
|
||
"schema": {
|
||
"$ref": "#/definitions/httpapi.ErrorEnvelope"
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/api/workspace/tasks/{taskID}/events": {
|
||
"get": {
|
||
"security": [
|
||
{
|
||
"BearerAuth": []
|
||
}
|
||
],
|
||
"description": "以 text/event-stream 返回指定任务的历史事件;无事件时返回 task.accepted 占位事件。",
|
||
"produces": [
|
||
"text/event-stream"
|
||
],
|
||
"tags": [
|
||
"tasks"
|
||
],
|
||
"summary": "订阅任务事件",
|
||
"parameters": [
|
||
{
|
||
"type": "string",
|
||
"description": "任务 ID",
|
||
"name": "taskID",
|
||
"in": "path",
|
||
"required": true
|
||
}
|
||
],
|
||
"responses": {
|
||
"200": {
|
||
"description": "Server-Sent Events,data 为 store.TaskEvent 或 TaskAcceptedEvent",
|
||
"schema": {
|
||
"type": "string"
|
||
}
|
||
},
|
||
"401": {
|
||
"description": "Unauthorized",
|
||
"schema": {
|
||
"$ref": "#/definitions/httpapi.ErrorEnvelope"
|
||
}
|
||
},
|
||
"404": {
|
||
"description": "Not Found",
|
||
"schema": {
|
||
"$ref": "#/definitions/httpapi.ErrorEnvelope"
|
||
}
|
||
},
|
||
"500": {
|
||
"description": "Internal Server Error",
|
||
"schema": {
|
||
"$ref": "#/definitions/httpapi.ErrorEnvelope"
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/api/workspace/tasks/{taskID}/param-preprocessing": {
|
||
"get": {
|
||
"security": [
|
||
{
|
||
"BearerAuth": []
|
||
}
|
||
],
|
||
"description": "返回指定任务在执行前的参数改写、校验或模板处理日志。",
|
||
"produces": [
|
||
"application/json"
|
||
],
|
||
"tags": [
|
||
"tasks"
|
||
],
|
||
"summary": "获取任务参数预处理日志",
|
||
"parameters": [
|
||
{
|
||
"type": "string",
|
||
"description": "任务 ID",
|
||
"name": "taskID",
|
||
"in": "path",
|
||
"required": true
|
||
}
|
||
],
|
||
"responses": {
|
||
"200": {
|
||
"description": "OK",
|
||
"schema": {
|
||
"$ref": "#/definitions/httpapi.TaskParamPreprocessingLogListResponse"
|
||
}
|
||
},
|
||
"401": {
|
||
"description": "Unauthorized",
|
||
"schema": {
|
||
"$ref": "#/definitions/httpapi.ErrorEnvelope"
|
||
}
|
||
},
|
||
"404": {
|
||
"description": "Not Found",
|
||
"schema": {
|
||
"$ref": "#/definitions/httpapi.ErrorEnvelope"
|
||
}
|
||
},
|
||
"500": {
|
||
"description": "Internal Server Error",
|
||
"schema": {
|
||
"$ref": "#/definitions/httpapi.ErrorEnvelope"
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/api/workspace/wallet": {
|
||
"get": {
|
||
"security": [
|
||
{
|
||
"BearerAuth": []
|
||
}
|
||
],
|
||
"description": "返回当前用户的钱包账户、余额和最近消费摘要,可按 currency 过滤。",
|
||
"produces": [
|
||
"application/json"
|
||
],
|
||
"tags": [
|
||
"wallet"
|
||
],
|
||
"summary": "获取钱包摘要",
|
||
"parameters": [
|
||
{
|
||
"type": "string",
|
||
"default": "USD",
|
||
"description": "币种",
|
||
"name": "currency",
|
||
"in": "query"
|
||
}
|
||
],
|
||
"responses": {
|
||
"200": {
|
||
"description": "OK",
|
||
"schema": {
|
||
"$ref": "#/definitions/store.WalletSummary"
|
||
}
|
||
},
|
||
"401": {
|
||
"description": "Unauthorized",
|
||
"schema": {
|
||
"$ref": "#/definitions/httpapi.ErrorEnvelope"
|
||
}
|
||
},
|
||
"500": {
|
||
"description": "Internal Server Error",
|
||
"schema": {
|
||
"$ref": "#/definitions/httpapi.ErrorEnvelope"
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/api/workspace/wallet/transactions": {
|
||
"get": {
|
||
"security": [
|
||
{
|
||
"BearerAuth": []
|
||
}
|
||
],
|
||
"description": "返回当前用户的钱包交易流水,支持关键字、方向、交易类型、时间范围和分页过滤。",
|
||
"produces": [
|
||
"application/json"
|
||
],
|
||
"tags": [
|
||
"wallet"
|
||
],
|
||
"summary": "列出钱包交易",
|
||
"parameters": [
|
||
{
|
||
"type": "string",
|
||
"description": "搜索关键字,别名 query",
|
||
"name": "q",
|
||
"in": "query"
|
||
},
|
||
{
|
||
"type": "string",
|
||
"description": "交易方向",
|
||
"name": "direction",
|
||
"in": "query"
|
||
},
|
||
{
|
||
"type": "string",
|
||
"description": "交易类型",
|
||
"name": "transactionType",
|
||
"in": "query"
|
||
},
|
||
{
|
||
"type": "string",
|
||
"description": "创建时间起点,别名 from",
|
||
"name": "createdFrom",
|
||
"in": "query"
|
||
},
|
||
{
|
||
"type": "string",
|
||
"description": "创建时间终点,别名 to",
|
||
"name": "createdTo",
|
||
"in": "query"
|
||
},
|
||
{
|
||
"type": "integer",
|
||
"default": 1,
|
||
"description": "页码",
|
||
"name": "page",
|
||
"in": "query"
|
||
},
|
||
{
|
||
"type": "integer",
|
||
"default": 50,
|
||
"description": "每页数量,别名 limit",
|
||
"name": "pageSize",
|
||
"in": "query"
|
||
}
|
||
],
|
||
"responses": {
|
||
"200": {
|
||
"description": "OK",
|
||
"schema": {
|
||
"$ref": "#/definitions/httpapi.WalletTransactionListResponse"
|
||
}
|
||
},
|
||
"400": {
|
||
"description": "Bad Request",
|
||
"schema": {
|
||
"$ref": "#/definitions/httpapi.ErrorEnvelope"
|
||
}
|
||
},
|
||
"401": {
|
||
"description": "Unauthorized",
|
||
"schema": {
|
||
"$ref": "#/definitions/httpapi.ErrorEnvelope"
|
||
}
|
||
},
|
||
"500": {
|
||
"description": "Internal Server Error",
|
||
"schema": {
|
||
"$ref": "#/definitions/httpapi.ErrorEnvelope"
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/chat/completions": {
|
||
"post": {
|
||
"security": [
|
||
{
|
||
"BearerAuth": []
|
||
}
|
||
],
|
||
"description": "网关任务接口按 model 选择平台模型;/api/v1 路径返回任务受理结果,OpenAI-compatible 路径同步返回兼容响应或 SSE 流。",
|
||
"consumes": [
|
||
"application/json"
|
||
],
|
||
"produces": [
|
||
"application/json"
|
||
],
|
||
"tags": [
|
||
"tasks"
|
||
],
|
||
"summary": "创建或执行 AI 任务",
|
||
"parameters": [
|
||
{
|
||
"type": "boolean",
|
||
"description": "true 时异步创建任务并返回 202",
|
||
"name": "X-Async",
|
||
"in": "header"
|
||
},
|
||
{
|
||
"description": "AI 任务请求,字段随任务类型变化",
|
||
"name": "input",
|
||
"in": "body",
|
||
"required": true,
|
||
"schema": {
|
||
"$ref": "#/definitions/httpapi.TaskRequest"
|
||
}
|
||
}
|
||
],
|
||
"responses": {
|
||
"200": {
|
||
"description": "OK",
|
||
"schema": {
|
||
"$ref": "#/definitions/httpapi.CompatibleResponse"
|
||
}
|
||
},
|
||
"202": {
|
||
"description": "Accepted",
|
||
"schema": {
|
||
"$ref": "#/definitions/httpapi.TaskAcceptedResponse"
|
||
}
|
||
},
|
||
"400": {
|
||
"description": "Bad Request",
|
||
"schema": {
|
||
"$ref": "#/definitions/httpapi.ErrorEnvelope"
|
||
}
|
||
},
|
||
"401": {
|
||
"description": "Unauthorized",
|
||
"schema": {
|
||
"$ref": "#/definitions/httpapi.ErrorEnvelope"
|
||
}
|
||
},
|
||
"402": {
|
||
"description": "Payment Required",
|
||
"schema": {
|
||
"$ref": "#/definitions/httpapi.ErrorEnvelope"
|
||
}
|
||
},
|
||
"403": {
|
||
"description": "Forbidden",
|
||
"schema": {
|
||
"$ref": "#/definitions/httpapi.ErrorEnvelope"
|
||
}
|
||
},
|
||
"404": {
|
||
"description": "Not Found",
|
||
"schema": {
|
||
"$ref": "#/definitions/httpapi.ErrorEnvelope"
|
||
}
|
||
},
|
||
"429": {
|
||
"description": "Too Many Requests",
|
||
"schema": {
|
||
"$ref": "#/definitions/httpapi.ErrorEnvelope"
|
||
}
|
||
},
|
||
"502": {
|
||
"description": "Bad Gateway",
|
||
"schema": {
|
||
"$ref": "#/definitions/httpapi.ErrorEnvelope"
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/healthz": {
|
||
"get": {
|
||
"description": "返回服务进程、运行环境和身份模式,供负载均衡或人工排障使用。",
|
||
"produces": [
|
||
"application/json"
|
||
],
|
||
"tags": [
|
||
"system"
|
||
],
|
||
"summary": "健康检查",
|
||
"responses": {
|
||
"200": {
|
||
"description": "OK",
|
||
"schema": {
|
||
"$ref": "#/definitions/httpapi.HealthResponse"
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/images/edits": {
|
||
"post": {
|
||
"security": [
|
||
{
|
||
"BearerAuth": []
|
||
}
|
||
],
|
||
"description": "网关任务接口按 model 选择平台模型;/api/v1 路径返回任务受理结果,OpenAI-compatible 路径同步返回兼容响应或 SSE 流。",
|
||
"consumes": [
|
||
"application/json"
|
||
],
|
||
"produces": [
|
||
"application/json"
|
||
],
|
||
"tags": [
|
||
"tasks"
|
||
],
|
||
"summary": "创建或执行 AI 任务",
|
||
"parameters": [
|
||
{
|
||
"type": "boolean",
|
||
"description": "true 时异步创建任务并返回 202",
|
||
"name": "X-Async",
|
||
"in": "header"
|
||
},
|
||
{
|
||
"description": "AI 任务请求,字段随任务类型变化",
|
||
"name": "input",
|
||
"in": "body",
|
||
"required": true,
|
||
"schema": {
|
||
"$ref": "#/definitions/httpapi.TaskRequest"
|
||
}
|
||
}
|
||
],
|
||
"responses": {
|
||
"200": {
|
||
"description": "OK",
|
||
"schema": {
|
||
"$ref": "#/definitions/httpapi.CompatibleResponse"
|
||
}
|
||
},
|
||
"202": {
|
||
"description": "Accepted",
|
||
"schema": {
|
||
"$ref": "#/definitions/httpapi.TaskAcceptedResponse"
|
||
}
|
||
},
|
||
"400": {
|
||
"description": "Bad Request",
|
||
"schema": {
|
||
"$ref": "#/definitions/httpapi.ErrorEnvelope"
|
||
}
|
||
},
|
||
"401": {
|
||
"description": "Unauthorized",
|
||
"schema": {
|
||
"$ref": "#/definitions/httpapi.ErrorEnvelope"
|
||
}
|
||
},
|
||
"402": {
|
||
"description": "Payment Required",
|
||
"schema": {
|
||
"$ref": "#/definitions/httpapi.ErrorEnvelope"
|
||
}
|
||
},
|
||
"403": {
|
||
"description": "Forbidden",
|
||
"schema": {
|
||
"$ref": "#/definitions/httpapi.ErrorEnvelope"
|
||
}
|
||
},
|
||
"404": {
|
||
"description": "Not Found",
|
||
"schema": {
|
||
"$ref": "#/definitions/httpapi.ErrorEnvelope"
|
||
}
|
||
},
|
||
"429": {
|
||
"description": "Too Many Requests",
|
||
"schema": {
|
||
"$ref": "#/definitions/httpapi.ErrorEnvelope"
|
||
}
|
||
},
|
||
"502": {
|
||
"description": "Bad Gateway",
|
||
"schema": {
|
||
"$ref": "#/definitions/httpapi.ErrorEnvelope"
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/images/generations": {
|
||
"post": {
|
||
"security": [
|
||
{
|
||
"BearerAuth": []
|
||
}
|
||
],
|
||
"description": "网关任务接口按 model 选择平台模型;/api/v1 路径返回任务受理结果,OpenAI-compatible 路径同步返回兼容响应或 SSE 流。",
|
||
"consumes": [
|
||
"application/json"
|
||
],
|
||
"produces": [
|
||
"application/json"
|
||
],
|
||
"tags": [
|
||
"tasks"
|
||
],
|
||
"summary": "创建或执行 AI 任务",
|
||
"parameters": [
|
||
{
|
||
"type": "boolean",
|
||
"description": "true 时异步创建任务并返回 202",
|
||
"name": "X-Async",
|
||
"in": "header"
|
||
},
|
||
{
|
||
"description": "AI 任务请求,字段随任务类型变化",
|
||
"name": "input",
|
||
"in": "body",
|
||
"required": true,
|
||
"schema": {
|
||
"$ref": "#/definitions/httpapi.TaskRequest"
|
||
}
|
||
}
|
||
],
|
||
"responses": {
|
||
"200": {
|
||
"description": "OK",
|
||
"schema": {
|
||
"$ref": "#/definitions/httpapi.CompatibleResponse"
|
||
}
|
||
},
|
||
"202": {
|
||
"description": "Accepted",
|
||
"schema": {
|
||
"$ref": "#/definitions/httpapi.TaskAcceptedResponse"
|
||
}
|
||
},
|
||
"400": {
|
||
"description": "Bad Request",
|
||
"schema": {
|
||
"$ref": "#/definitions/httpapi.ErrorEnvelope"
|
||
}
|
||
},
|
||
"401": {
|
||
"description": "Unauthorized",
|
||
"schema": {
|
||
"$ref": "#/definitions/httpapi.ErrorEnvelope"
|
||
}
|
||
},
|
||
"402": {
|
||
"description": "Payment Required",
|
||
"schema": {
|
||
"$ref": "#/definitions/httpapi.ErrorEnvelope"
|
||
}
|
||
},
|
||
"403": {
|
||
"description": "Forbidden",
|
||
"schema": {
|
||
"$ref": "#/definitions/httpapi.ErrorEnvelope"
|
||
}
|
||
},
|
||
"404": {
|
||
"description": "Not Found",
|
||
"schema": {
|
||
"$ref": "#/definitions/httpapi.ErrorEnvelope"
|
||
}
|
||
},
|
||
"429": {
|
||
"description": "Too Many Requests",
|
||
"schema": {
|
||
"$ref": "#/definitions/httpapi.ErrorEnvelope"
|
||
}
|
||
},
|
||
"502": {
|
||
"description": "Bad Gateway",
|
||
"schema": {
|
||
"$ref": "#/definitions/httpapi.ErrorEnvelope"
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/readyz": {
|
||
"get": {
|
||
"description": "检查 Postgres 是否可用;数据库不可用时返回 503。",
|
||
"produces": [
|
||
"application/json"
|
||
],
|
||
"tags": [
|
||
"system"
|
||
],
|
||
"summary": "就绪检查",
|
||
"responses": {
|
||
"200": {
|
||
"description": "OK",
|
||
"schema": {
|
||
"$ref": "#/definitions/httpapi.ReadyResponse"
|
||
}
|
||
},
|
||
"503": {
|
||
"description": "Service Unavailable",
|
||
"schema": {
|
||
"$ref": "#/definitions/httpapi.ErrorEnvelope"
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/responses": {
|
||
"post": {
|
||
"security": [
|
||
{
|
||
"BearerAuth": []
|
||
}
|
||
],
|
||
"description": "网关任务接口按 model 选择平台模型;/api/v1 路径返回任务受理结果,OpenAI-compatible 路径同步返回兼容响应或 SSE 流。",
|
||
"consumes": [
|
||
"application/json"
|
||
],
|
||
"produces": [
|
||
"application/json"
|
||
],
|
||
"tags": [
|
||
"tasks"
|
||
],
|
||
"summary": "创建或执行 AI 任务",
|
||
"parameters": [
|
||
{
|
||
"type": "boolean",
|
||
"description": "true 时异步创建任务并返回 202",
|
||
"name": "X-Async",
|
||
"in": "header"
|
||
},
|
||
{
|
||
"description": "AI 任务请求,字段随任务类型变化",
|
||
"name": "input",
|
||
"in": "body",
|
||
"required": true,
|
||
"schema": {
|
||
"$ref": "#/definitions/httpapi.TaskRequest"
|
||
}
|
||
}
|
||
],
|
||
"responses": {
|
||
"200": {
|
||
"description": "OK",
|
||
"schema": {
|
||
"$ref": "#/definitions/httpapi.CompatibleResponse"
|
||
}
|
||
},
|
||
"202": {
|
||
"description": "Accepted",
|
||
"schema": {
|
||
"$ref": "#/definitions/httpapi.TaskAcceptedResponse"
|
||
}
|
||
},
|
||
"400": {
|
||
"description": "Bad Request",
|
||
"schema": {
|
||
"$ref": "#/definitions/httpapi.ErrorEnvelope"
|
||
}
|
||
},
|
||
"401": {
|
||
"description": "Unauthorized",
|
||
"schema": {
|
||
"$ref": "#/definitions/httpapi.ErrorEnvelope"
|
||
}
|
||
},
|
||
"402": {
|
||
"description": "Payment Required",
|
||
"schema": {
|
||
"$ref": "#/definitions/httpapi.ErrorEnvelope"
|
||
}
|
||
},
|
||
"403": {
|
||
"description": "Forbidden",
|
||
"schema": {
|
||
"$ref": "#/definitions/httpapi.ErrorEnvelope"
|
||
}
|
||
},
|
||
"404": {
|
||
"description": "Not Found",
|
||
"schema": {
|
||
"$ref": "#/definitions/httpapi.ErrorEnvelope"
|
||
}
|
||
},
|
||
"429": {
|
||
"description": "Too Many Requests",
|
||
"schema": {
|
||
"$ref": "#/definitions/httpapi.ErrorEnvelope"
|
||
}
|
||
},
|
||
"502": {
|
||
"description": "Bad Gateway",
|
||
"schema": {
|
||
"$ref": "#/definitions/httpapi.ErrorEnvelope"
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/static/simulation/{asset}": {
|
||
"get": {
|
||
"description": "返回本地模拟模式使用的图片、视频封面或短视频资源。",
|
||
"produces": [
|
||
"image/svg+xml",
|
||
"video/mp4"
|
||
],
|
||
"tags": [
|
||
"simulation"
|
||
],
|
||
"summary": "获取模拟资源",
|
||
"parameters": [
|
||
{
|
||
"type": "string",
|
||
"description": "资源文件名,可选 image.svg、image.png、image-edit.svg、image-edit.png、video-poster.svg、video.mp4",
|
||
"name": "asset",
|
||
"in": "path",
|
||
"required": true
|
||
}
|
||
],
|
||
"responses": {
|
||
"200": {
|
||
"description": "OK",
|
||
"schema": {
|
||
"type": "file"
|
||
}
|
||
},
|
||
"404": {
|
||
"description": "Not Found",
|
||
"schema": {
|
||
"type": "string"
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/v1/chat/completions": {
|
||
"post": {
|
||
"security": [
|
||
{
|
||
"BearerAuth": []
|
||
}
|
||
],
|
||
"description": "网关任务接口按 model 选择平台模型;/api/v1 路径返回任务受理结果,OpenAI-compatible 路径同步返回兼容响应或 SSE 流。",
|
||
"consumes": [
|
||
"application/json"
|
||
],
|
||
"produces": [
|
||
"application/json"
|
||
],
|
||
"tags": [
|
||
"tasks"
|
||
],
|
||
"summary": "创建或执行 AI 任务",
|
||
"parameters": [
|
||
{
|
||
"type": "boolean",
|
||
"description": "true 时异步创建任务并返回 202",
|
||
"name": "X-Async",
|
||
"in": "header"
|
||
},
|
||
{
|
||
"description": "AI 任务请求,字段随任务类型变化",
|
||
"name": "input",
|
||
"in": "body",
|
||
"required": true,
|
||
"schema": {
|
||
"$ref": "#/definitions/httpapi.TaskRequest"
|
||
}
|
||
}
|
||
],
|
||
"responses": {
|
||
"200": {
|
||
"description": "OK",
|
||
"schema": {
|
||
"$ref": "#/definitions/httpapi.CompatibleResponse"
|
||
}
|
||
},
|
||
"202": {
|
||
"description": "Accepted",
|
||
"schema": {
|
||
"$ref": "#/definitions/httpapi.TaskAcceptedResponse"
|
||
}
|
||
},
|
||
"400": {
|
||
"description": "Bad Request",
|
||
"schema": {
|
||
"$ref": "#/definitions/httpapi.ErrorEnvelope"
|
||
}
|
||
},
|
||
"401": {
|
||
"description": "Unauthorized",
|
||
"schema": {
|
||
"$ref": "#/definitions/httpapi.ErrorEnvelope"
|
||
}
|
||
},
|
||
"402": {
|
||
"description": "Payment Required",
|
||
"schema": {
|
||
"$ref": "#/definitions/httpapi.ErrorEnvelope"
|
||
}
|
||
},
|
||
"403": {
|
||
"description": "Forbidden",
|
||
"schema": {
|
||
"$ref": "#/definitions/httpapi.ErrorEnvelope"
|
||
}
|
||
},
|
||
"404": {
|
||
"description": "Not Found",
|
||
"schema": {
|
||
"$ref": "#/definitions/httpapi.ErrorEnvelope"
|
||
}
|
||
},
|
||
"429": {
|
||
"description": "Too Many Requests",
|
||
"schema": {
|
||
"$ref": "#/definitions/httpapi.ErrorEnvelope"
|
||
}
|
||
},
|
||
"502": {
|
||
"description": "Bad Gateway",
|
||
"schema": {
|
||
"$ref": "#/definitions/httpapi.ErrorEnvelope"
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/v1/images/edits": {
|
||
"post": {
|
||
"security": [
|
||
{
|
||
"BearerAuth": []
|
||
}
|
||
],
|
||
"description": "网关任务接口按 model 选择平台模型;/api/v1 路径返回任务受理结果,OpenAI-compatible 路径同步返回兼容响应或 SSE 流。",
|
||
"consumes": [
|
||
"application/json"
|
||
],
|
||
"produces": [
|
||
"application/json"
|
||
],
|
||
"tags": [
|
||
"tasks"
|
||
],
|
||
"summary": "创建或执行 AI 任务",
|
||
"parameters": [
|
||
{
|
||
"type": "boolean",
|
||
"description": "true 时异步创建任务并返回 202",
|
||
"name": "X-Async",
|
||
"in": "header"
|
||
},
|
||
{
|
||
"description": "AI 任务请求,字段随任务类型变化",
|
||
"name": "input",
|
||
"in": "body",
|
||
"required": true,
|
||
"schema": {
|
||
"$ref": "#/definitions/httpapi.TaskRequest"
|
||
}
|
||
}
|
||
],
|
||
"responses": {
|
||
"200": {
|
||
"description": "OK",
|
||
"schema": {
|
||
"$ref": "#/definitions/httpapi.CompatibleResponse"
|
||
}
|
||
},
|
||
"202": {
|
||
"description": "Accepted",
|
||
"schema": {
|
||
"$ref": "#/definitions/httpapi.TaskAcceptedResponse"
|
||
}
|
||
},
|
||
"400": {
|
||
"description": "Bad Request",
|
||
"schema": {
|
||
"$ref": "#/definitions/httpapi.ErrorEnvelope"
|
||
}
|
||
},
|
||
"401": {
|
||
"description": "Unauthorized",
|
||
"schema": {
|
||
"$ref": "#/definitions/httpapi.ErrorEnvelope"
|
||
}
|
||
},
|
||
"402": {
|
||
"description": "Payment Required",
|
||
"schema": {
|
||
"$ref": "#/definitions/httpapi.ErrorEnvelope"
|
||
}
|
||
},
|
||
"403": {
|
||
"description": "Forbidden",
|
||
"schema": {
|
||
"$ref": "#/definitions/httpapi.ErrorEnvelope"
|
||
}
|
||
},
|
||
"404": {
|
||
"description": "Not Found",
|
||
"schema": {
|
||
"$ref": "#/definitions/httpapi.ErrorEnvelope"
|
||
}
|
||
},
|
||
"429": {
|
||
"description": "Too Many Requests",
|
||
"schema": {
|
||
"$ref": "#/definitions/httpapi.ErrorEnvelope"
|
||
}
|
||
},
|
||
"502": {
|
||
"description": "Bad Gateway",
|
||
"schema": {
|
||
"$ref": "#/definitions/httpapi.ErrorEnvelope"
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/v1/images/generations": {
|
||
"post": {
|
||
"security": [
|
||
{
|
||
"BearerAuth": []
|
||
}
|
||
],
|
||
"description": "网关任务接口按 model 选择平台模型;/api/v1 路径返回任务受理结果,OpenAI-compatible 路径同步返回兼容响应或 SSE 流。",
|
||
"consumes": [
|
||
"application/json"
|
||
],
|
||
"produces": [
|
||
"application/json"
|
||
],
|
||
"tags": [
|
||
"tasks"
|
||
],
|
||
"summary": "创建或执行 AI 任务",
|
||
"parameters": [
|
||
{
|
||
"type": "boolean",
|
||
"description": "true 时异步创建任务并返回 202",
|
||
"name": "X-Async",
|
||
"in": "header"
|
||
},
|
||
{
|
||
"description": "AI 任务请求,字段随任务类型变化",
|
||
"name": "input",
|
||
"in": "body",
|
||
"required": true,
|
||
"schema": {
|
||
"$ref": "#/definitions/httpapi.TaskRequest"
|
||
}
|
||
}
|
||
],
|
||
"responses": {
|
||
"200": {
|
||
"description": "OK",
|
||
"schema": {
|
||
"$ref": "#/definitions/httpapi.CompatibleResponse"
|
||
}
|
||
},
|
||
"202": {
|
||
"description": "Accepted",
|
||
"schema": {
|
||
"$ref": "#/definitions/httpapi.TaskAcceptedResponse"
|
||
}
|
||
},
|
||
"400": {
|
||
"description": "Bad Request",
|
||
"schema": {
|
||
"$ref": "#/definitions/httpapi.ErrorEnvelope"
|
||
}
|
||
},
|
||
"401": {
|
||
"description": "Unauthorized",
|
||
"schema": {
|
||
"$ref": "#/definitions/httpapi.ErrorEnvelope"
|
||
}
|
||
},
|
||
"402": {
|
||
"description": "Payment Required",
|
||
"schema": {
|
||
"$ref": "#/definitions/httpapi.ErrorEnvelope"
|
||
}
|
||
},
|
||
"403": {
|
||
"description": "Forbidden",
|
||
"schema": {
|
||
"$ref": "#/definitions/httpapi.ErrorEnvelope"
|
||
}
|
||
},
|
||
"404": {
|
||
"description": "Not Found",
|
||
"schema": {
|
||
"$ref": "#/definitions/httpapi.ErrorEnvelope"
|
||
}
|
||
},
|
||
"429": {
|
||
"description": "Too Many Requests",
|
||
"schema": {
|
||
"$ref": "#/definitions/httpapi.ErrorEnvelope"
|
||
}
|
||
},
|
||
"502": {
|
||
"description": "Bad Gateway",
|
||
"schema": {
|
||
"$ref": "#/definitions/httpapi.ErrorEnvelope"
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/v1/responses": {
|
||
"post": {
|
||
"security": [
|
||
{
|
||
"BearerAuth": []
|
||
}
|
||
],
|
||
"description": "网关任务接口按 model 选择平台模型;/api/v1 路径返回任务受理结果,OpenAI-compatible 路径同步返回兼容响应或 SSE 流。",
|
||
"consumes": [
|
||
"application/json"
|
||
],
|
||
"produces": [
|
||
"application/json"
|
||
],
|
||
"tags": [
|
||
"tasks"
|
||
],
|
||
"summary": "创建或执行 AI 任务",
|
||
"parameters": [
|
||
{
|
||
"type": "boolean",
|
||
"description": "true 时异步创建任务并返回 202",
|
||
"name": "X-Async",
|
||
"in": "header"
|
||
},
|
||
{
|
||
"description": "AI 任务请求,字段随任务类型变化",
|
||
"name": "input",
|
||
"in": "body",
|
||
"required": true,
|
||
"schema": {
|
||
"$ref": "#/definitions/httpapi.TaskRequest"
|
||
}
|
||
}
|
||
],
|
||
"responses": {
|
||
"200": {
|
||
"description": "OK",
|
||
"schema": {
|
||
"$ref": "#/definitions/httpapi.CompatibleResponse"
|
||
}
|
||
},
|
||
"202": {
|
||
"description": "Accepted",
|
||
"schema": {
|
||
"$ref": "#/definitions/httpapi.TaskAcceptedResponse"
|
||
}
|
||
},
|
||
"400": {
|
||
"description": "Bad Request",
|
||
"schema": {
|
||
"$ref": "#/definitions/httpapi.ErrorEnvelope"
|
||
}
|
||
},
|
||
"401": {
|
||
"description": "Unauthorized",
|
||
"schema": {
|
||
"$ref": "#/definitions/httpapi.ErrorEnvelope"
|
||
}
|
||
},
|
||
"402": {
|
||
"description": "Payment Required",
|
||
"schema": {
|
||
"$ref": "#/definitions/httpapi.ErrorEnvelope"
|
||
}
|
||
},
|
||
"403": {
|
||
"description": "Forbidden",
|
||
"schema": {
|
||
"$ref": "#/definitions/httpapi.ErrorEnvelope"
|
||
}
|
||
},
|
||
"404": {
|
||
"description": "Not Found",
|
||
"schema": {
|
||
"$ref": "#/definitions/httpapi.ErrorEnvelope"
|
||
}
|
||
},
|
||
"429": {
|
||
"description": "Too Many Requests",
|
||
"schema": {
|
||
"$ref": "#/definitions/httpapi.ErrorEnvelope"
|
||
}
|
||
},
|
||
"502": {
|
||
"description": "Bad Gateway",
|
||
"schema": {
|
||
"$ref": "#/definitions/httpapi.ErrorEnvelope"
|
||
}
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"definitions": {
|
||
"auth.User": {
|
||
"type": "object",
|
||
"properties": {
|
||
"apiKeyId": {
|
||
"type": "string"
|
||
},
|
||
"apiKeyName": {
|
||
"type": "string"
|
||
},
|
||
"apiKeyPrefix": {
|
||
"type": "string"
|
||
},
|
||
"apiKeyScopes": {
|
||
"type": "array",
|
||
"items": {
|
||
"type": "string"
|
||
}
|
||
},
|
||
"apiKeySecret": {
|
||
"type": "string"
|
||
},
|
||
"gatewayTenantId": {
|
||
"type": "string"
|
||
},
|
||
"gatewayUserId": {
|
||
"type": "string"
|
||
},
|
||
"role": {
|
||
"type": "array",
|
||
"items": {
|
||
"type": "string"
|
||
}
|
||
},
|
||
"source": {
|
||
"type": "string"
|
||
},
|
||
"sso_id": {
|
||
"type": "string"
|
||
},
|
||
"sub": {
|
||
"type": "string"
|
||
},
|
||
"tenantId": {
|
||
"type": "string"
|
||
},
|
||
"tenantKey": {
|
||
"type": "string"
|
||
},
|
||
"userGroupId": {
|
||
"type": "string"
|
||
},
|
||
"userGroupKey": {
|
||
"type": "string"
|
||
},
|
||
"userGroupKeys": {
|
||
"type": "array",
|
||
"items": {
|
||
"type": "string"
|
||
}
|
||
},
|
||
"username": {
|
||
"type": "string"
|
||
}
|
||
}
|
||
},
|
||
"httpapi.APIKeyListResponse": {
|
||
"type": "object",
|
||
"properties": {
|
||
"items": {
|
||
"type": "array",
|
||
"items": {
|
||
"$ref": "#/definitions/store.APIKey"
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"httpapi.AccessRuleListResponse": {
|
||
"type": "object",
|
||
"properties": {
|
||
"items": {
|
||
"type": "array",
|
||
"items": {
|
||
"$ref": "#/definitions/store.AccessRule"
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"httpapi.AuditLogListResponse": {
|
||
"type": "object",
|
||
"properties": {
|
||
"items": {
|
||
"type": "array",
|
||
"items": {
|
||
"$ref": "#/definitions/store.AuditLog"
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"httpapi.AuthResponse": {
|
||
"type": "object",
|
||
"properties": {
|
||
"accessToken": {
|
||
"type": "string",
|
||
"example": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9..."
|
||
},
|
||
"expiresIn": {
|
||
"type": "integer",
|
||
"example": 86400
|
||
},
|
||
"tokenType": {
|
||
"type": "string",
|
||
"example": "Bearer"
|
||
},
|
||
"user": {
|
||
"$ref": "#/definitions/auth.User"
|
||
}
|
||
}
|
||
},
|
||
"httpapi.BaseModelListResponse": {
|
||
"type": "object",
|
||
"properties": {
|
||
"items": {
|
||
"type": "array",
|
||
"items": {
|
||
"$ref": "#/definitions/store.BaseModel"
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"httpapi.CatalogProviderListResponse": {
|
||
"type": "object",
|
||
"properties": {
|
||
"items": {
|
||
"type": "array",
|
||
"items": {
|
||
"$ref": "#/definitions/store.CatalogProvider"
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"httpapi.ChatMessage": {
|
||
"type": "object",
|
||
"properties": {
|
||
"content": {
|
||
"type": "string",
|
||
"example": "Hello"
|
||
},
|
||
"role": {
|
||
"type": "string",
|
||
"example": "user"
|
||
}
|
||
}
|
||
},
|
||
"httpapi.CompatibleResponse": {
|
||
"type": "object",
|
||
"properties": {
|
||
"choices": {
|
||
"type": "array",
|
||
"items": {
|
||
"type": "object",
|
||
"additionalProperties": true
|
||
}
|
||
},
|
||
"id": {
|
||
"type": "string",
|
||
"example": "chatcmpl-123"
|
||
},
|
||
"model": {
|
||
"type": "string",
|
||
"example": "gpt-4o-mini"
|
||
},
|
||
"object": {
|
||
"type": "string",
|
||
"example": "chat.completion"
|
||
},
|
||
"usage": {
|
||
"type": "object",
|
||
"additionalProperties": true
|
||
}
|
||
}
|
||
},
|
||
"httpapi.ErrorEnvelope": {
|
||
"type": "object",
|
||
"properties": {
|
||
"error": {
|
||
"$ref": "#/definitions/httpapi.ErrorPayload"
|
||
}
|
||
}
|
||
},
|
||
"httpapi.ErrorPayload": {
|
||
"type": "object",
|
||
"properties": {
|
||
"code": {
|
||
"type": "string",
|
||
"example": "rate_limit"
|
||
},
|
||
"message": {
|
||
"type": "string",
|
||
"example": "invalid json body"
|
||
},
|
||
"status": {
|
||
"type": "integer",
|
||
"example": 400
|
||
}
|
||
}
|
||
},
|
||
"httpapi.HealthResponse": {
|
||
"type": "object",
|
||
"properties": {
|
||
"env": {
|
||
"type": "string",
|
||
"example": "development"
|
||
},
|
||
"identityMode": {
|
||
"type": "string",
|
||
"example": "standalone"
|
||
},
|
||
"ok": {
|
||
"type": "boolean",
|
||
"example": true
|
||
},
|
||
"service": {
|
||
"type": "string",
|
||
"example": "easyai-ai-gateway"
|
||
}
|
||
}
|
||
},
|
||
"httpapi.ModelCatalogFilterOption": {
|
||
"type": "object",
|
||
"properties": {
|
||
"count": {
|
||
"type": "integer"
|
||
},
|
||
"iconPath": {
|
||
"type": "string"
|
||
},
|
||
"label": {
|
||
"type": "string"
|
||
},
|
||
"value": {
|
||
"type": "string"
|
||
}
|
||
}
|
||
},
|
||
"httpapi.ModelCatalogFilters": {
|
||
"type": "object",
|
||
"properties": {
|
||
"capabilities": {
|
||
"type": "array",
|
||
"items": {
|
||
"$ref": "#/definitions/httpapi.ModelCatalogFilterOption"
|
||
}
|
||
},
|
||
"providers": {
|
||
"type": "array",
|
||
"items": {
|
||
"$ref": "#/definitions/httpapi.ModelCatalogFilterOption"
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"httpapi.ModelCatalogItem": {
|
||
"type": "object",
|
||
"properties": {
|
||
"alias": {
|
||
"type": "string"
|
||
},
|
||
"capabilityTags": {
|
||
"type": "array",
|
||
"items": {
|
||
"type": "string"
|
||
}
|
||
},
|
||
"description": {
|
||
"type": "string"
|
||
},
|
||
"discount": {
|
||
"$ref": "#/definitions/httpapi.ModelCatalogText"
|
||
},
|
||
"displayName": {
|
||
"type": "string"
|
||
},
|
||
"enabled": {
|
||
"type": "boolean"
|
||
},
|
||
"iconPath": {
|
||
"type": "string"
|
||
},
|
||
"id": {
|
||
"type": "string"
|
||
},
|
||
"modelName": {
|
||
"type": "string"
|
||
},
|
||
"modelType": {
|
||
"type": "array",
|
||
"items": {
|
||
"type": "string"
|
||
}
|
||
},
|
||
"permission": {
|
||
"$ref": "#/definitions/httpapi.ModelCatalogPermission"
|
||
},
|
||
"pricing": {
|
||
"$ref": "#/definitions/httpapi.ModelCatalogPricing"
|
||
},
|
||
"providerKeys": {
|
||
"type": "array",
|
||
"items": {
|
||
"type": "string"
|
||
}
|
||
},
|
||
"providers": {
|
||
"type": "array",
|
||
"items": {
|
||
"$ref": "#/definitions/httpapi.ModelCatalogProviderSummary"
|
||
}
|
||
},
|
||
"rateLimits": {
|
||
"$ref": "#/definitions/httpapi.ModelCatalogRateLimits"
|
||
},
|
||
"source": {
|
||
"$ref": "#/definitions/httpapi.ModelCatalogText"
|
||
},
|
||
"sourceCount": {
|
||
"type": "integer"
|
||
},
|
||
"sources": {
|
||
"type": "array",
|
||
"items": {
|
||
"$ref": "#/definitions/httpapi.ModelCatalogSource"
|
||
}
|
||
},
|
||
"statusLabel": {
|
||
"type": "string"
|
||
}
|
||
}
|
||
},
|
||
"httpapi.ModelCatalogPermission": {
|
||
"type": "object",
|
||
"properties": {
|
||
"allowGroups": {
|
||
"type": "array",
|
||
"items": {
|
||
"type": "string"
|
||
}
|
||
},
|
||
"denyGroups": {
|
||
"type": "array",
|
||
"items": {
|
||
"type": "string"
|
||
}
|
||
},
|
||
"label": {
|
||
"type": "string"
|
||
},
|
||
"title": {
|
||
"type": "string"
|
||
}
|
||
}
|
||
},
|
||
"httpapi.ModelCatalogPricing": {
|
||
"type": "object",
|
||
"properties": {
|
||
"lines": {
|
||
"type": "array",
|
||
"items": {
|
||
"type": "string"
|
||
}
|
||
},
|
||
"title": {
|
||
"type": "string"
|
||
}
|
||
}
|
||
},
|
||
"httpapi.ModelCatalogProviderSummary": {
|
||
"type": "object",
|
||
"properties": {
|
||
"iconPath": {
|
||
"type": "string"
|
||
},
|
||
"key": {
|
||
"type": "string"
|
||
},
|
||
"name": {
|
||
"type": "string"
|
||
},
|
||
"sourceCount": {
|
||
"type": "integer"
|
||
}
|
||
}
|
||
},
|
||
"httpapi.ModelCatalogRateLimits": {
|
||
"type": "object",
|
||
"properties": {
|
||
"concurrent": {
|
||
"type": "number"
|
||
},
|
||
"label": {
|
||
"type": "string"
|
||
},
|
||
"rpm": {
|
||
"type": "number"
|
||
},
|
||
"title": {
|
||
"type": "string"
|
||
},
|
||
"tpm": {
|
||
"type": "number"
|
||
}
|
||
}
|
||
},
|
||
"httpapi.ModelCatalogResponse": {
|
||
"type": "object",
|
||
"properties": {
|
||
"filters": {
|
||
"$ref": "#/definitions/httpapi.ModelCatalogFilters"
|
||
},
|
||
"items": {
|
||
"type": "array",
|
||
"items": {
|
||
"$ref": "#/definitions/httpapi.ModelCatalogItem"
|
||
}
|
||
},
|
||
"summary": {
|
||
"$ref": "#/definitions/httpapi.ModelCatalogSummary"
|
||
}
|
||
}
|
||
},
|
||
"httpapi.ModelCatalogSource": {
|
||
"type": "object",
|
||
"properties": {
|
||
"displayName": {
|
||
"type": "string"
|
||
},
|
||
"enabled": {
|
||
"type": "boolean"
|
||
},
|
||
"id": {
|
||
"type": "string"
|
||
},
|
||
"modelAlias": {
|
||
"type": "string"
|
||
},
|
||
"modelName": {
|
||
"type": "string"
|
||
},
|
||
"modelType": {
|
||
"type": "array",
|
||
"items": {
|
||
"type": "string"
|
||
}
|
||
},
|
||
"platformId": {
|
||
"type": "string"
|
||
},
|
||
"platformName": {
|
||
"type": "string"
|
||
},
|
||
"providerKey": {
|
||
"type": "string"
|
||
},
|
||
"providerName": {
|
||
"type": "string"
|
||
},
|
||
"rateLimits": {
|
||
"$ref": "#/definitions/httpapi.ModelCatalogRateLimits"
|
||
}
|
||
}
|
||
},
|
||
"httpapi.ModelCatalogSummary": {
|
||
"type": "object",
|
||
"properties": {
|
||
"modelCount": {
|
||
"type": "integer"
|
||
},
|
||
"sourceCount": {
|
||
"type": "integer"
|
||
}
|
||
}
|
||
},
|
||
"httpapi.ModelCatalogText": {
|
||
"type": "object",
|
||
"properties": {
|
||
"label": {
|
||
"type": "string"
|
||
},
|
||
"title": {
|
||
"type": "string"
|
||
}
|
||
}
|
||
},
|
||
"httpapi.ModelRateLimitStatusListResponse": {
|
||
"type": "object",
|
||
"properties": {
|
||
"items": {
|
||
"type": "array",
|
||
"items": {
|
||
"$ref": "#/definitions/store.ModelRateLimitStatus"
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"httpapi.NetworkProxyConfigResponse": {
|
||
"type": "object",
|
||
"properties": {
|
||
"globalHttpProxy": {
|
||
"type": "string",
|
||
"example": "http://127.0.0.1:7890"
|
||
},
|
||
"globalHttpProxySet": {
|
||
"type": "boolean",
|
||
"example": true
|
||
},
|
||
"globalHttpProxySource": {
|
||
"type": "string",
|
||
"example": "env"
|
||
}
|
||
}
|
||
},
|
||
"httpapi.PlatformListResponse": {
|
||
"type": "object",
|
||
"properties": {
|
||
"items": {
|
||
"type": "array",
|
||
"items": {
|
||
"$ref": "#/definitions/store.Platform"
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"httpapi.PlatformModelListResponse": {
|
||
"type": "object",
|
||
"properties": {
|
||
"items": {
|
||
"type": "array",
|
||
"items": {
|
||
"$ref": "#/definitions/store.PlatformModel"
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"httpapi.PlayableAPIKeyListResponse": {
|
||
"type": "object",
|
||
"properties": {
|
||
"items": {
|
||
"type": "array",
|
||
"items": {
|
||
"$ref": "#/definitions/store.PlayableAPIKey"
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"httpapi.PricingEstimateRequest": {
|
||
"type": "object",
|
||
"properties": {
|
||
"kind": {
|
||
"type": "string",
|
||
"example": "chat.completions"
|
||
},
|
||
"max_tokens": {
|
||
"type": "integer",
|
||
"example": 512
|
||
},
|
||
"messages": {
|
||
"type": "array",
|
||
"items": {
|
||
"$ref": "#/definitions/httpapi.ChatMessage"
|
||
}
|
||
},
|
||
"model": {
|
||
"type": "string",
|
||
"example": "gpt-4o-mini"
|
||
},
|
||
"n": {
|
||
"type": "integer",
|
||
"example": 1
|
||
},
|
||
"prompt": {
|
||
"type": "string",
|
||
"example": "A small orange cat"
|
||
},
|
||
"runMode": {
|
||
"type": "string",
|
||
"example": "simulation"
|
||
}
|
||
}
|
||
},
|
||
"httpapi.PricingEstimateResponse": {
|
||
"type": "object",
|
||
"properties": {
|
||
"items": {
|
||
"type": "array",
|
||
"items": {
|
||
"type": "object",
|
||
"additionalProperties": true
|
||
}
|
||
},
|
||
"resolver": {
|
||
"type": "string",
|
||
"example": "effective-pricing-v1"
|
||
}
|
||
}
|
||
},
|
||
"httpapi.PricingRuleListResponse": {
|
||
"type": "object",
|
||
"properties": {
|
||
"items": {
|
||
"type": "array",
|
||
"items": {
|
||
"$ref": "#/definitions/store.PricingRule"
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"httpapi.PricingRuleSetListResponse": {
|
||
"type": "object",
|
||
"properties": {
|
||
"items": {
|
||
"type": "array",
|
||
"items": {
|
||
"$ref": "#/definitions/store.PricingRuleSet"
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"httpapi.RateLimitWindowListResponse": {
|
||
"type": "object",
|
||
"properties": {
|
||
"items": {
|
||
"type": "array",
|
||
"items": {
|
||
"$ref": "#/definitions/store.RateLimitWindow"
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"httpapi.ReadyResponse": {
|
||
"type": "object",
|
||
"properties": {
|
||
"ok": {
|
||
"type": "boolean",
|
||
"example": true
|
||
}
|
||
}
|
||
},
|
||
"httpapi.ReplacePlatformModelsRequest": {
|
||
"type": "object",
|
||
"properties": {
|
||
"models": {
|
||
"type": "array",
|
||
"items": {
|
||
"$ref": "#/definitions/store.CreatePlatformModelInput"
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"httpapi.RuntimePolicySetListResponse": {
|
||
"type": "object",
|
||
"properties": {
|
||
"items": {
|
||
"type": "array",
|
||
"items": {
|
||
"$ref": "#/definitions/store.RuntimePolicySet"
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"httpapi.TaskAcceptedResponse": {
|
||
"type": "object",
|
||
"properties": {
|
||
"next": {
|
||
"$ref": "#/definitions/httpapi.TaskNextLinks"
|
||
},
|
||
"task": {
|
||
"$ref": "#/definitions/store.GatewayTask"
|
||
},
|
||
"taskId": {
|
||
"type": "string",
|
||
"example": "9f4d8f3d-5f5f-4bb7-a4be-344a9f930e25"
|
||
}
|
||
}
|
||
},
|
||
"httpapi.TaskListResponse": {
|
||
"type": "object",
|
||
"properties": {
|
||
"items": {
|
||
"type": "array",
|
||
"items": {
|
||
"$ref": "#/definitions/store.GatewayTask"
|
||
}
|
||
},
|
||
"page": {
|
||
"type": "integer",
|
||
"example": 1
|
||
},
|
||
"pageSize": {
|
||
"type": "integer",
|
||
"example": 50
|
||
},
|
||
"total": {
|
||
"type": "integer",
|
||
"example": 42
|
||
}
|
||
}
|
||
},
|
||
"httpapi.TaskNextLinks": {
|
||
"type": "object",
|
||
"properties": {
|
||
"detail": {
|
||
"type": "string",
|
||
"example": "/api/v1/tasks/9f4d8f3d-5f5f-4bb7-a4be-344a9f930e25"
|
||
},
|
||
"events": {
|
||
"type": "string",
|
||
"example": "/api/v1/tasks/9f4d8f3d-5f5f-4bb7-a4be-344a9f930e25/events"
|
||
}
|
||
}
|
||
},
|
||
"httpapi.TaskParamPreprocessingLogListResponse": {
|
||
"type": "object",
|
||
"properties": {
|
||
"items": {
|
||
"type": "array",
|
||
"items": {
|
||
"$ref": "#/definitions/store.TaskParamPreprocessingLog"
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"httpapi.TaskRequest": {
|
||
"type": "object",
|
||
"properties": {
|
||
"duration": {
|
||
"type": "integer",
|
||
"example": 5
|
||
},
|
||
"input": {
|
||
"type": "string",
|
||
"example": "Tell me a short story"
|
||
},
|
||
"max_tokens": {
|
||
"type": "integer",
|
||
"example": 512
|
||
},
|
||
"messages": {
|
||
"type": "array",
|
||
"items": {
|
||
"$ref": "#/definitions/httpapi.ChatMessage"
|
||
}
|
||
},
|
||
"model": {
|
||
"type": "string",
|
||
"example": "gpt-4o-mini"
|
||
},
|
||
"prompt": {
|
||
"type": "string",
|
||
"example": "A watercolor robot reading a book"
|
||
},
|
||
"resolution": {
|
||
"type": "string",
|
||
"example": "720p"
|
||
},
|
||
"runMode": {
|
||
"type": "string",
|
||
"example": "simulation"
|
||
},
|
||
"size": {
|
||
"type": "string",
|
||
"example": "1024x1024"
|
||
},
|
||
"stream": {
|
||
"type": "boolean",
|
||
"example": false
|
||
}
|
||
}
|
||
},
|
||
"httpapi.TenantListResponse": {
|
||
"type": "object",
|
||
"properties": {
|
||
"items": {
|
||
"type": "array",
|
||
"items": {
|
||
"$ref": "#/definitions/store.GatewayTenant"
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"httpapi.UserGroupListResponse": {
|
||
"type": "object",
|
||
"properties": {
|
||
"items": {
|
||
"type": "array",
|
||
"items": {
|
||
"$ref": "#/definitions/store.UserGroup"
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"httpapi.UserListResponse": {
|
||
"type": "object",
|
||
"properties": {
|
||
"items": {
|
||
"type": "array",
|
||
"items": {
|
||
"$ref": "#/definitions/store.GatewayUser"
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"httpapi.WalletAdjustmentResponse": {
|
||
"type": "object",
|
||
"properties": {
|
||
"account": {
|
||
"$ref": "#/definitions/store.GatewayWalletAccount"
|
||
},
|
||
"auditLog": {
|
||
"$ref": "#/definitions/store.AuditLog"
|
||
},
|
||
"before": {
|
||
"$ref": "#/definitions/store.GatewayWalletAccount"
|
||
},
|
||
"transaction": {
|
||
"$ref": "#/definitions/store.GatewayWalletTransaction"
|
||
}
|
||
}
|
||
},
|
||
"httpapi.WalletTransactionListResponse": {
|
||
"type": "object",
|
||
"properties": {
|
||
"items": {
|
||
"type": "array",
|
||
"items": {
|
||
"$ref": "#/definitions/store.GatewayWalletTransaction"
|
||
}
|
||
},
|
||
"page": {
|
||
"type": "integer",
|
||
"example": 1
|
||
},
|
||
"pageSize": {
|
||
"type": "integer",
|
||
"example": 50
|
||
},
|
||
"total": {
|
||
"type": "integer",
|
||
"example": 42
|
||
}
|
||
}
|
||
},
|
||
"httpapi.updatePlatformDynamicPriorityRequest": {
|
||
"type": "object",
|
||
"properties": {
|
||
"dynamicPriority": {
|
||
"type": "integer",
|
||
"example": 10
|
||
},
|
||
"reset": {
|
||
"type": "boolean",
|
||
"example": false
|
||
}
|
||
}
|
||
},
|
||
"httpapi.walletBalanceRequest": {
|
||
"type": "object",
|
||
"properties": {
|
||
"balance": {
|
||
"type": "number",
|
||
"example": 100
|
||
},
|
||
"currency": {
|
||
"type": "string",
|
||
"example": "USD"
|
||
},
|
||
"idempotencyKey": {
|
||
"type": "string",
|
||
"example": "wallet-set-20260514-001"
|
||
},
|
||
"metadata": {
|
||
"type": "object",
|
||
"additionalProperties": {}
|
||
},
|
||
"reason": {
|
||
"type": "string",
|
||
"example": "manual recharge"
|
||
}
|
||
}
|
||
},
|
||
"store.APIKey": {
|
||
"type": "object",
|
||
"properties": {
|
||
"createdAt": {
|
||
"type": "string"
|
||
},
|
||
"expiresAt": {
|
||
"type": "string"
|
||
},
|
||
"gatewayTenantId": {
|
||
"type": "string"
|
||
},
|
||
"gatewayUserId": {
|
||
"type": "string"
|
||
},
|
||
"id": {
|
||
"type": "string"
|
||
},
|
||
"keyPrefix": {
|
||
"type": "string"
|
||
},
|
||
"lastUsedAt": {
|
||
"type": "string"
|
||
},
|
||
"name": {
|
||
"type": "string"
|
||
},
|
||
"quotaPolicy": {
|
||
"type": "object",
|
||
"additionalProperties": {}
|
||
},
|
||
"rateLimitPolicy": {
|
||
"type": "object",
|
||
"additionalProperties": {}
|
||
},
|
||
"scopes": {
|
||
"type": "array",
|
||
"items": {
|
||
"type": "string"
|
||
}
|
||
},
|
||
"secret": {
|
||
"type": "string"
|
||
},
|
||
"status": {
|
||
"type": "string"
|
||
},
|
||
"tenantId": {
|
||
"type": "string"
|
||
},
|
||
"tenantKey": {
|
||
"type": "string"
|
||
},
|
||
"updatedAt": {
|
||
"type": "string"
|
||
},
|
||
"userGroupId": {
|
||
"type": "string"
|
||
},
|
||
"userId": {
|
||
"type": "string"
|
||
}
|
||
}
|
||
},
|
||
"store.AccessRule": {
|
||
"type": "object",
|
||
"properties": {
|
||
"conditions": {
|
||
"type": "object",
|
||
"additionalProperties": {}
|
||
},
|
||
"createdAt": {
|
||
"type": "string"
|
||
},
|
||
"effect": {
|
||
"type": "string"
|
||
},
|
||
"id": {
|
||
"type": "string"
|
||
},
|
||
"metadata": {
|
||
"type": "object",
|
||
"additionalProperties": {}
|
||
},
|
||
"minPermissionLevel": {
|
||
"type": "integer"
|
||
},
|
||
"priority": {
|
||
"type": "integer"
|
||
},
|
||
"resourceId": {
|
||
"type": "string"
|
||
},
|
||
"resourceType": {
|
||
"type": "string"
|
||
},
|
||
"status": {
|
||
"type": "string"
|
||
},
|
||
"subjectId": {
|
||
"type": "string"
|
||
},
|
||
"subjectType": {
|
||
"type": "string"
|
||
},
|
||
"updatedAt": {
|
||
"type": "string"
|
||
}
|
||
}
|
||
},
|
||
"store.AccessRuleBatchInput": {
|
||
"type": "object",
|
||
"properties": {
|
||
"deleteResources": {
|
||
"type": "array",
|
||
"items": {
|
||
"$ref": "#/definitions/store.AccessRuleResourceInput"
|
||
}
|
||
},
|
||
"effect": {
|
||
"type": "string"
|
||
},
|
||
"subjectId": {
|
||
"type": "string"
|
||
},
|
||
"subjectType": {
|
||
"type": "string"
|
||
},
|
||
"upsertResources": {
|
||
"type": "array",
|
||
"items": {
|
||
"$ref": "#/definitions/store.AccessRuleResourceInput"
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"store.AccessRuleInput": {
|
||
"type": "object",
|
||
"properties": {
|
||
"conditions": {
|
||
"type": "object",
|
||
"additionalProperties": {}
|
||
},
|
||
"effect": {
|
||
"type": "string"
|
||
},
|
||
"metadata": {
|
||
"type": "object",
|
||
"additionalProperties": {}
|
||
},
|
||
"minPermissionLevel": {
|
||
"type": "integer"
|
||
},
|
||
"priority": {
|
||
"type": "integer"
|
||
},
|
||
"resourceId": {
|
||
"type": "string"
|
||
},
|
||
"resourceType": {
|
||
"type": "string"
|
||
},
|
||
"status": {
|
||
"type": "string"
|
||
},
|
||
"subjectId": {
|
||
"type": "string"
|
||
},
|
||
"subjectType": {
|
||
"type": "string"
|
||
}
|
||
}
|
||
},
|
||
"store.AccessRuleResourceInput": {
|
||
"type": "object",
|
||
"properties": {
|
||
"conditions": {
|
||
"type": "object",
|
||
"additionalProperties": {}
|
||
},
|
||
"metadata": {
|
||
"type": "object",
|
||
"additionalProperties": {}
|
||
},
|
||
"minPermissionLevel": {
|
||
"type": "integer"
|
||
},
|
||
"priority": {
|
||
"type": "integer"
|
||
},
|
||
"resourceId": {
|
||
"type": "string"
|
||
},
|
||
"resourceType": {
|
||
"type": "string"
|
||
},
|
||
"status": {
|
||
"type": "string"
|
||
}
|
||
}
|
||
},
|
||
"store.AuditLog": {
|
||
"type": "object",
|
||
"properties": {
|
||
"action": {
|
||
"type": "string"
|
||
},
|
||
"actorGatewayUserId": {
|
||
"type": "string"
|
||
},
|
||
"actorRoles": {
|
||
"type": "array",
|
||
"items": {
|
||
"type": "string"
|
||
}
|
||
},
|
||
"actorSource": {
|
||
"type": "string"
|
||
},
|
||
"actorUserId": {
|
||
"type": "string"
|
||
},
|
||
"actorUsername": {
|
||
"type": "string"
|
||
},
|
||
"afterState": {
|
||
"type": "object",
|
||
"additionalProperties": {}
|
||
},
|
||
"beforeState": {
|
||
"type": "object",
|
||
"additionalProperties": {}
|
||
},
|
||
"category": {
|
||
"type": "string"
|
||
},
|
||
"createdAt": {
|
||
"type": "string"
|
||
},
|
||
"id": {
|
||
"type": "string"
|
||
},
|
||
"metadata": {
|
||
"type": "object",
|
||
"additionalProperties": {}
|
||
},
|
||
"requestIp": {
|
||
"type": "string"
|
||
},
|
||
"targetGatewayTenantId": {
|
||
"type": "string"
|
||
},
|
||
"targetGatewayUserId": {
|
||
"type": "string"
|
||
},
|
||
"targetId": {
|
||
"type": "string"
|
||
},
|
||
"targetType": {
|
||
"type": "string"
|
||
},
|
||
"userAgent": {
|
||
"type": "string"
|
||
}
|
||
}
|
||
},
|
||
"store.BaseModel": {
|
||
"type": "object",
|
||
"properties": {
|
||
"baseBillingConfig": {
|
||
"type": "object",
|
||
"additionalProperties": {}
|
||
},
|
||
"canonicalModelKey": {
|
||
"type": "string"
|
||
},
|
||
"capabilities": {
|
||
"type": "object",
|
||
"additionalProperties": {}
|
||
},
|
||
"catalogType": {
|
||
"type": "string"
|
||
},
|
||
"createdAt": {
|
||
"type": "string"
|
||
},
|
||
"customizedAt": {
|
||
"type": "string"
|
||
},
|
||
"defaultRateLimitPolicy": {
|
||
"type": "object",
|
||
"additionalProperties": {}
|
||
},
|
||
"defaultSnapshot": {
|
||
"type": "object",
|
||
"additionalProperties": {}
|
||
},
|
||
"id": {
|
||
"type": "string"
|
||
},
|
||
"metadata": {
|
||
"type": "object",
|
||
"additionalProperties": {}
|
||
},
|
||
"modelAlias": {
|
||
"type": "string"
|
||
},
|
||
"modelType": {
|
||
"type": "array",
|
||
"items": {
|
||
"type": "string"
|
||
}
|
||
},
|
||
"pricingRuleSetId": {
|
||
"type": "string"
|
||
},
|
||
"pricingVersion": {
|
||
"type": "integer"
|
||
},
|
||
"providerKey": {
|
||
"type": "string"
|
||
},
|
||
"providerModelName": {
|
||
"type": "string"
|
||
},
|
||
"runtimePolicyOverride": {
|
||
"type": "object",
|
||
"additionalProperties": {}
|
||
},
|
||
"runtimePolicySetId": {
|
||
"type": "string"
|
||
},
|
||
"status": {
|
||
"type": "string"
|
||
},
|
||
"updatedAt": {
|
||
"type": "string"
|
||
}
|
||
}
|
||
},
|
||
"store.BaseModelInput": {
|
||
"type": "object",
|
||
"properties": {
|
||
"baseBillingConfig": {
|
||
"type": "object",
|
||
"additionalProperties": {}
|
||
},
|
||
"canonicalModelKey": {
|
||
"type": "string"
|
||
},
|
||
"capabilities": {
|
||
"type": "object",
|
||
"additionalProperties": {}
|
||
},
|
||
"catalogType": {
|
||
"type": "string"
|
||
},
|
||
"defaultRateLimitPolicy": {
|
||
"type": "object",
|
||
"additionalProperties": {}
|
||
},
|
||
"defaultSnapshot": {
|
||
"type": "object",
|
||
"additionalProperties": {}
|
||
},
|
||
"displayName": {
|
||
"type": "string"
|
||
},
|
||
"metadata": {
|
||
"type": "object",
|
||
"additionalProperties": {}
|
||
},
|
||
"modelAlias": {
|
||
"type": "string"
|
||
},
|
||
"modelType": {
|
||
"type": "array",
|
||
"items": {
|
||
"type": "string"
|
||
}
|
||
},
|
||
"pricingRuleSetId": {
|
||
"type": "string"
|
||
},
|
||
"pricingVersion": {
|
||
"type": "integer"
|
||
},
|
||
"providerKey": {
|
||
"type": "string"
|
||
},
|
||
"providerModelName": {
|
||
"type": "string"
|
||
},
|
||
"runtimePolicyOverride": {
|
||
"type": "object",
|
||
"additionalProperties": {}
|
||
},
|
||
"runtimePolicySetId": {
|
||
"type": "string"
|
||
},
|
||
"status": {
|
||
"type": "string"
|
||
}
|
||
}
|
||
},
|
||
"store.CatalogProvider": {
|
||
"type": "object",
|
||
"properties": {
|
||
"capabilitySchema": {
|
||
"type": "object",
|
||
"additionalProperties": {}
|
||
},
|
||
"code": {
|
||
"type": "string"
|
||
},
|
||
"createdAt": {
|
||
"type": "string"
|
||
},
|
||
"defaultAuthType": {
|
||
"type": "string"
|
||
},
|
||
"defaultBaseUrl": {
|
||
"type": "string"
|
||
},
|
||
"defaultRateLimitPolicy": {
|
||
"type": "object",
|
||
"additionalProperties": {}
|
||
},
|
||
"displayName": {
|
||
"type": "string"
|
||
},
|
||
"iconPath": {
|
||
"type": "string"
|
||
},
|
||
"id": {
|
||
"type": "string"
|
||
},
|
||
"metadata": {
|
||
"type": "object",
|
||
"additionalProperties": {}
|
||
},
|
||
"providerKey": {
|
||
"type": "string"
|
||
},
|
||
"providerType": {
|
||
"type": "string"
|
||
},
|
||
"source": {
|
||
"type": "string"
|
||
},
|
||
"status": {
|
||
"type": "string"
|
||
},
|
||
"updatedAt": {
|
||
"type": "string"
|
||
}
|
||
}
|
||
},
|
||
"store.CatalogProviderInput": {
|
||
"type": "object",
|
||
"properties": {
|
||
"capabilitySchema": {
|
||
"type": "object",
|
||
"additionalProperties": {}
|
||
},
|
||
"code": {
|
||
"type": "string"
|
||
},
|
||
"defaultAuthType": {
|
||
"type": "string"
|
||
},
|
||
"defaultBaseUrl": {
|
||
"type": "string"
|
||
},
|
||
"defaultRateLimitPolicy": {
|
||
"type": "object",
|
||
"additionalProperties": {}
|
||
},
|
||
"displayName": {
|
||
"type": "string"
|
||
},
|
||
"iconPath": {
|
||
"type": "string"
|
||
},
|
||
"metadata": {
|
||
"type": "object",
|
||
"additionalProperties": {}
|
||
},
|
||
"providerKey": {
|
||
"type": "string"
|
||
},
|
||
"providerType": {
|
||
"type": "string"
|
||
},
|
||
"source": {
|
||
"type": "string"
|
||
},
|
||
"status": {
|
||
"type": "string"
|
||
}
|
||
}
|
||
},
|
||
"store.CreateAPIKeyInput": {
|
||
"type": "object",
|
||
"properties": {
|
||
"expiresAt": {
|
||
"type": "string"
|
||
},
|
||
"name": {
|
||
"type": "string"
|
||
},
|
||
"scopes": {
|
||
"type": "array",
|
||
"items": {
|
||
"type": "string"
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"store.CreatePlatformInput": {
|
||
"type": "object",
|
||
"properties": {
|
||
"authType": {
|
||
"type": "string"
|
||
},
|
||
"baseUrl": {
|
||
"type": "string"
|
||
},
|
||
"config": {
|
||
"type": "object",
|
||
"additionalProperties": {}
|
||
},
|
||
"credentials": {
|
||
"type": "object",
|
||
"additionalProperties": {}
|
||
},
|
||
"defaultDiscountFactor": {
|
||
"type": "number"
|
||
},
|
||
"defaultPricingMode": {
|
||
"type": "string"
|
||
},
|
||
"internalName": {
|
||
"type": "string"
|
||
},
|
||
"name": {
|
||
"type": "string"
|
||
},
|
||
"platformKey": {
|
||
"type": "string"
|
||
},
|
||
"pricingRuleSetId": {
|
||
"type": "string"
|
||
},
|
||
"priority": {
|
||
"type": "integer"
|
||
},
|
||
"provider": {
|
||
"type": "string"
|
||
},
|
||
"rateLimitPolicy": {
|
||
"type": "object",
|
||
"additionalProperties": {}
|
||
},
|
||
"retryPolicy": {
|
||
"type": "object",
|
||
"additionalProperties": {}
|
||
},
|
||
"status": {
|
||
"type": "string"
|
||
}
|
||
}
|
||
},
|
||
"store.CreatePlatformModelInput": {
|
||
"type": "object",
|
||
"properties": {
|
||
"baseModelId": {
|
||
"type": "string"
|
||
},
|
||
"billingConfig": {
|
||
"type": "object",
|
||
"additionalProperties": {}
|
||
},
|
||
"billingConfigOverride": {
|
||
"type": "object",
|
||
"additionalProperties": {}
|
||
},
|
||
"canonicalModelKey": {
|
||
"type": "string"
|
||
},
|
||
"capabilities": {
|
||
"type": "object",
|
||
"additionalProperties": {}
|
||
},
|
||
"capabilityOverride": {
|
||
"type": "object",
|
||
"additionalProperties": {}
|
||
},
|
||
"discountFactor": {
|
||
"type": "number"
|
||
},
|
||
"displayName": {
|
||
"type": "string"
|
||
},
|
||
"enabled": {
|
||
"type": "boolean"
|
||
},
|
||
"modelAlias": {
|
||
"type": "string"
|
||
},
|
||
"modelName": {
|
||
"type": "string"
|
||
},
|
||
"modelType": {
|
||
"type": "array",
|
||
"items": {
|
||
"type": "string"
|
||
}
|
||
},
|
||
"permissionConfig": {
|
||
"type": "object",
|
||
"additionalProperties": {}
|
||
},
|
||
"platformId": {
|
||
"type": "string"
|
||
},
|
||
"pricingMode": {
|
||
"type": "string"
|
||
},
|
||
"pricingRuleSetId": {
|
||
"type": "string"
|
||
},
|
||
"providerModelName": {
|
||
"type": "string"
|
||
},
|
||
"rateLimitPolicy": {
|
||
"type": "object",
|
||
"additionalProperties": {}
|
||
},
|
||
"retryPolicy": {
|
||
"type": "object",
|
||
"additionalProperties": {}
|
||
},
|
||
"runtimePolicyOverride": {
|
||
"type": "object",
|
||
"additionalProperties": {}
|
||
},
|
||
"runtimePolicySetId": {
|
||
"type": "string"
|
||
}
|
||
}
|
||
},
|
||
"store.CreatedAPIKey": {
|
||
"type": "object",
|
||
"properties": {
|
||
"apiKey": {
|
||
"$ref": "#/definitions/store.APIKey"
|
||
},
|
||
"secret": {
|
||
"type": "string"
|
||
}
|
||
}
|
||
},
|
||
"store.GatewayTask": {
|
||
"type": "object",
|
||
"properties": {
|
||
"apiKeyId": {
|
||
"type": "string"
|
||
},
|
||
"apiKeyName": {
|
||
"type": "string"
|
||
},
|
||
"apiKeyPrefix": {
|
||
"type": "string"
|
||
},
|
||
"asyncMode": {
|
||
"type": "boolean"
|
||
},
|
||
"attemptCount": {
|
||
"type": "integer"
|
||
},
|
||
"attempts": {
|
||
"type": "array",
|
||
"items": {
|
||
"$ref": "#/definitions/store.TaskAttempt"
|
||
}
|
||
},
|
||
"billingSummary": {
|
||
"type": "object",
|
||
"additionalProperties": {}
|
||
},
|
||
"billings": {
|
||
"type": "array",
|
||
"items": {}
|
||
},
|
||
"createdAt": {
|
||
"type": "string"
|
||
},
|
||
"error": {
|
||
"type": "string"
|
||
},
|
||
"errorCode": {
|
||
"type": "string"
|
||
},
|
||
"errorMessage": {
|
||
"type": "string"
|
||
},
|
||
"finalChargeAmount": {
|
||
"type": "number"
|
||
},
|
||
"finishedAt": {
|
||
"type": "string"
|
||
},
|
||
"gatewayTenantId": {
|
||
"type": "string"
|
||
},
|
||
"gatewayUserId": {
|
||
"type": "string"
|
||
},
|
||
"id": {
|
||
"type": "string"
|
||
},
|
||
"kind": {
|
||
"type": "string"
|
||
},
|
||
"metrics": {
|
||
"type": "object",
|
||
"additionalProperties": {}
|
||
},
|
||
"model": {
|
||
"type": "string"
|
||
},
|
||
"modelType": {
|
||
"type": "string"
|
||
},
|
||
"remoteTaskId": {
|
||
"type": "string"
|
||
},
|
||
"remoteTaskPayload": {
|
||
"type": "object",
|
||
"additionalProperties": {}
|
||
},
|
||
"request": {
|
||
"type": "object",
|
||
"additionalProperties": {}
|
||
},
|
||
"requestId": {
|
||
"type": "string"
|
||
},
|
||
"requestedModel": {
|
||
"type": "string"
|
||
},
|
||
"resolvedModel": {
|
||
"type": "string"
|
||
},
|
||
"responseDurationMs": {
|
||
"type": "integer"
|
||
},
|
||
"responseFinishedAt": {
|
||
"type": "string"
|
||
},
|
||
"responseStartedAt": {
|
||
"type": "string"
|
||
},
|
||
"result": {
|
||
"type": "object",
|
||
"additionalProperties": {}
|
||
},
|
||
"riverJobId": {
|
||
"type": "integer"
|
||
},
|
||
"runMode": {
|
||
"type": "string"
|
||
},
|
||
"status": {
|
||
"type": "string"
|
||
},
|
||
"tenantId": {
|
||
"type": "string"
|
||
},
|
||
"tenantKey": {
|
||
"type": "string"
|
||
},
|
||
"updatedAt": {
|
||
"type": "string"
|
||
},
|
||
"usage": {
|
||
"type": "object",
|
||
"additionalProperties": {}
|
||
},
|
||
"userGroupId": {
|
||
"type": "string"
|
||
},
|
||
"userGroupKey": {
|
||
"type": "string"
|
||
},
|
||
"userId": {
|
||
"type": "string"
|
||
},
|
||
"userSource": {
|
||
"type": "string"
|
||
}
|
||
}
|
||
},
|
||
"store.GatewayTenant": {
|
||
"type": "object",
|
||
"properties": {
|
||
"authPolicy": {
|
||
"type": "object",
|
||
"additionalProperties": {}
|
||
},
|
||
"billingProfile": {
|
||
"type": "object",
|
||
"additionalProperties": {}
|
||
},
|
||
"createdAt": {
|
||
"type": "string"
|
||
},
|
||
"defaultUserGroupId": {
|
||
"type": "string"
|
||
},
|
||
"description": {
|
||
"type": "string"
|
||
},
|
||
"externalTenantId": {
|
||
"type": "string"
|
||
},
|
||
"id": {
|
||
"type": "string"
|
||
},
|
||
"metadata": {
|
||
"type": "object",
|
||
"additionalProperties": {}
|
||
},
|
||
"name": {
|
||
"type": "string"
|
||
},
|
||
"planKey": {
|
||
"type": "string"
|
||
},
|
||
"rateLimitPolicy": {
|
||
"type": "object",
|
||
"additionalProperties": {}
|
||
},
|
||
"source": {
|
||
"type": "string"
|
||
},
|
||
"sourceUpdatedAt": {
|
||
"type": "string"
|
||
},
|
||
"status": {
|
||
"type": "string"
|
||
},
|
||
"syncedAt": {
|
||
"type": "string"
|
||
},
|
||
"tenantKey": {
|
||
"type": "string"
|
||
},
|
||
"updatedAt": {
|
||
"type": "string"
|
||
}
|
||
}
|
||
},
|
||
"store.GatewayTenantInput": {
|
||
"type": "object",
|
||
"properties": {
|
||
"authPolicy": {
|
||
"type": "object",
|
||
"additionalProperties": {}
|
||
},
|
||
"billingProfile": {
|
||
"type": "object",
|
||
"additionalProperties": {}
|
||
},
|
||
"defaultUserGroupId": {
|
||
"type": "string"
|
||
},
|
||
"description": {
|
||
"type": "string"
|
||
},
|
||
"externalTenantId": {
|
||
"type": "string"
|
||
},
|
||
"metadata": {
|
||
"type": "object",
|
||
"additionalProperties": {}
|
||
},
|
||
"name": {
|
||
"type": "string"
|
||
},
|
||
"planKey": {
|
||
"type": "string"
|
||
},
|
||
"rateLimitPolicy": {
|
||
"type": "object",
|
||
"additionalProperties": {}
|
||
},
|
||
"source": {
|
||
"type": "string"
|
||
},
|
||
"status": {
|
||
"type": "string"
|
||
},
|
||
"tenantKey": {
|
||
"type": "string"
|
||
}
|
||
}
|
||
},
|
||
"store.GatewayUser": {
|
||
"type": "object",
|
||
"properties": {
|
||
"authProfile": {
|
||
"type": "object",
|
||
"additionalProperties": {}
|
||
},
|
||
"avatarUrl": {
|
||
"type": "string"
|
||
},
|
||
"createdAt": {
|
||
"type": "string"
|
||
},
|
||
"defaultUserGroupId": {
|
||
"type": "string"
|
||
},
|
||
"displayName": {
|
||
"type": "string"
|
||
},
|
||
"email": {
|
||
"type": "string"
|
||
},
|
||
"externalUserId": {
|
||
"type": "string"
|
||
},
|
||
"gatewayTenantId": {
|
||
"type": "string"
|
||
},
|
||
"id": {
|
||
"type": "string"
|
||
},
|
||
"lastLoginAt": {
|
||
"type": "string"
|
||
},
|
||
"metadata": {
|
||
"type": "object",
|
||
"additionalProperties": {}
|
||
},
|
||
"phone": {
|
||
"type": "string"
|
||
},
|
||
"roles": {
|
||
"type": "array",
|
||
"items": {
|
||
"type": "string"
|
||
}
|
||
},
|
||
"source": {
|
||
"type": "string"
|
||
},
|
||
"sourceUpdatedAt": {
|
||
"type": "string"
|
||
},
|
||
"status": {
|
||
"type": "string"
|
||
},
|
||
"syncedAt": {
|
||
"type": "string"
|
||
},
|
||
"tenantId": {
|
||
"type": "string"
|
||
},
|
||
"tenantKey": {
|
||
"type": "string"
|
||
},
|
||
"updatedAt": {
|
||
"type": "string"
|
||
},
|
||
"userKey": {
|
||
"type": "string"
|
||
},
|
||
"username": {
|
||
"type": "string"
|
||
},
|
||
"walletAccounts": {
|
||
"type": "array",
|
||
"items": {
|
||
"$ref": "#/definitions/store.GatewayWalletAccount"
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"store.GatewayUserInput": {
|
||
"type": "object",
|
||
"properties": {
|
||
"authProfile": {
|
||
"type": "object",
|
||
"additionalProperties": {}
|
||
},
|
||
"avatarUrl": {
|
||
"type": "string"
|
||
},
|
||
"defaultUserGroupId": {
|
||
"type": "string"
|
||
},
|
||
"displayName": {
|
||
"type": "string"
|
||
},
|
||
"email": {
|
||
"type": "string"
|
||
},
|
||
"externalUserId": {
|
||
"type": "string"
|
||
},
|
||
"gatewayTenantId": {
|
||
"type": "string"
|
||
},
|
||
"metadata": {
|
||
"type": "object",
|
||
"additionalProperties": {}
|
||
},
|
||
"password": {
|
||
"type": "string"
|
||
},
|
||
"phone": {
|
||
"type": "string"
|
||
},
|
||
"roles": {
|
||
"type": "array",
|
||
"items": {
|
||
"type": "string"
|
||
}
|
||
},
|
||
"source": {
|
||
"type": "string"
|
||
},
|
||
"status": {
|
||
"type": "string"
|
||
},
|
||
"tenantId": {
|
||
"type": "string"
|
||
},
|
||
"tenantKey": {
|
||
"type": "string"
|
||
},
|
||
"userKey": {
|
||
"type": "string"
|
||
},
|
||
"username": {
|
||
"type": "string"
|
||
}
|
||
}
|
||
},
|
||
"store.GatewayWalletAccount": {
|
||
"type": "object",
|
||
"properties": {
|
||
"balance": {
|
||
"type": "number"
|
||
},
|
||
"createdAt": {
|
||
"type": "string"
|
||
},
|
||
"currency": {
|
||
"type": "string"
|
||
},
|
||
"frozenBalance": {
|
||
"type": "number"
|
||
},
|
||
"gatewayTenantId": {
|
||
"type": "string"
|
||
},
|
||
"gatewayUserId": {
|
||
"type": "string"
|
||
},
|
||
"id": {
|
||
"type": "string"
|
||
},
|
||
"metadata": {
|
||
"type": "object",
|
||
"additionalProperties": {}
|
||
},
|
||
"status": {
|
||
"type": "string"
|
||
},
|
||
"tenantId": {
|
||
"type": "string"
|
||
},
|
||
"tenantKey": {
|
||
"type": "string"
|
||
},
|
||
"totalRecharged": {
|
||
"type": "number"
|
||
},
|
||
"totalSpent": {
|
||
"type": "number"
|
||
},
|
||
"updatedAt": {
|
||
"type": "string"
|
||
},
|
||
"userId": {
|
||
"type": "string"
|
||
}
|
||
}
|
||
},
|
||
"store.GatewayWalletTransaction": {
|
||
"type": "object",
|
||
"properties": {
|
||
"accountId": {
|
||
"type": "string"
|
||
},
|
||
"amount": {
|
||
"type": "number"
|
||
},
|
||
"balanceAfter": {
|
||
"type": "number"
|
||
},
|
||
"balanceBefore": {
|
||
"type": "number"
|
||
},
|
||
"createdAt": {
|
||
"type": "string"
|
||
},
|
||
"currency": {
|
||
"type": "string"
|
||
},
|
||
"direction": {
|
||
"type": "string"
|
||
},
|
||
"gatewayTenantId": {
|
||
"type": "string"
|
||
},
|
||
"gatewayUserId": {
|
||
"type": "string"
|
||
},
|
||
"id": {
|
||
"type": "string"
|
||
},
|
||
"idempotencyKey": {
|
||
"type": "string"
|
||
},
|
||
"metadata": {
|
||
"type": "object",
|
||
"additionalProperties": {}
|
||
},
|
||
"referenceId": {
|
||
"type": "string"
|
||
},
|
||
"referenceType": {
|
||
"type": "string"
|
||
},
|
||
"transactionType": {
|
||
"type": "string"
|
||
}
|
||
}
|
||
},
|
||
"store.LocalLoginInput": {
|
||
"type": "object",
|
||
"properties": {
|
||
"account": {
|
||
"type": "string"
|
||
},
|
||
"password": {
|
||
"type": "string"
|
||
}
|
||
}
|
||
},
|
||
"store.LocalRegisterInput": {
|
||
"type": "object",
|
||
"properties": {
|
||
"displayName": {
|
||
"type": "string"
|
||
},
|
||
"email": {
|
||
"type": "string"
|
||
},
|
||
"invitationCode": {
|
||
"type": "string"
|
||
},
|
||
"password": {
|
||
"type": "string"
|
||
},
|
||
"username": {
|
||
"type": "string"
|
||
}
|
||
}
|
||
},
|
||
"store.ModelRateLimitStatus": {
|
||
"type": "object",
|
||
"properties": {
|
||
"concurrent": {
|
||
"$ref": "#/definitions/store.RateLimitMetricStatus"
|
||
},
|
||
"displayName": {
|
||
"type": "string"
|
||
},
|
||
"enabled": {
|
||
"type": "boolean"
|
||
},
|
||
"loadRatio": {
|
||
"type": "number"
|
||
},
|
||
"modelAlias": {
|
||
"type": "string"
|
||
},
|
||
"modelCooldownUntil": {
|
||
"type": "string"
|
||
},
|
||
"modelName": {
|
||
"type": "string"
|
||
},
|
||
"modelType": {
|
||
"type": "array",
|
||
"items": {
|
||
"type": "string"
|
||
}
|
||
},
|
||
"platformCooldownUntil": {
|
||
"type": "string"
|
||
},
|
||
"platformDisabledReason": {
|
||
"$ref": "#/definitions/store.PlatformPolicyEvent"
|
||
},
|
||
"platformDynamicPriority": {
|
||
"type": "integer"
|
||
},
|
||
"platformEffectivePriority": {
|
||
"type": "integer"
|
||
},
|
||
"platformId": {
|
||
"type": "string"
|
||
},
|
||
"platformModelId": {
|
||
"type": "string"
|
||
},
|
||
"platformName": {
|
||
"type": "string"
|
||
},
|
||
"platformPriority": {
|
||
"type": "integer"
|
||
},
|
||
"platformStatus": {
|
||
"type": "string"
|
||
},
|
||
"provider": {
|
||
"type": "string"
|
||
},
|
||
"providerModelName": {
|
||
"type": "string"
|
||
},
|
||
"queuedTasks": {
|
||
"type": "number"
|
||
},
|
||
"rateLimitPolicy": {
|
||
"type": "object",
|
||
"additionalProperties": {}
|
||
},
|
||
"recentPriorityDemotions": {
|
||
"type": "array",
|
||
"items": {
|
||
"$ref": "#/definitions/store.PriorityDemotionRecord"
|
||
}
|
||
},
|
||
"rpm": {
|
||
"$ref": "#/definitions/store.RateLimitMetricStatus"
|
||
},
|
||
"tpm": {
|
||
"$ref": "#/definitions/store.RateLimitMetricStatus"
|
||
}
|
||
}
|
||
},
|
||
"store.Platform": {
|
||
"type": "object",
|
||
"properties": {
|
||
"authType": {
|
||
"type": "string"
|
||
},
|
||
"baseUrl": {
|
||
"type": "string"
|
||
},
|
||
"config": {
|
||
"type": "object",
|
||
"additionalProperties": {}
|
||
},
|
||
"cooldownUntil": {
|
||
"type": "string"
|
||
},
|
||
"createdAt": {
|
||
"type": "string"
|
||
},
|
||
"credentialsPreview": {
|
||
"type": "object",
|
||
"additionalProperties": {}
|
||
},
|
||
"defaultDiscountFactor": {
|
||
"type": "number"
|
||
},
|
||
"defaultPricingMode": {
|
||
"type": "string"
|
||
},
|
||
"dynamicPriority": {
|
||
"type": "integer"
|
||
},
|
||
"effectivePriority": {
|
||
"type": "integer"
|
||
},
|
||
"id": {
|
||
"type": "string"
|
||
},
|
||
"internalName": {
|
||
"type": "string"
|
||
},
|
||
"name": {
|
||
"type": "string"
|
||
},
|
||
"platformKey": {
|
||
"type": "string"
|
||
},
|
||
"pricingRuleSetId": {
|
||
"type": "string"
|
||
},
|
||
"priority": {
|
||
"type": "integer"
|
||
},
|
||
"provider": {
|
||
"type": "string"
|
||
},
|
||
"rateLimitPolicy": {
|
||
"type": "object",
|
||
"additionalProperties": {}
|
||
},
|
||
"retryPolicy": {
|
||
"type": "object",
|
||
"additionalProperties": {}
|
||
},
|
||
"status": {
|
||
"type": "string"
|
||
},
|
||
"updatedAt": {
|
||
"type": "string"
|
||
}
|
||
}
|
||
},
|
||
"store.PlatformModel": {
|
||
"type": "object",
|
||
"properties": {
|
||
"baseModelId": {
|
||
"type": "string"
|
||
},
|
||
"billingConfig": {
|
||
"type": "object",
|
||
"additionalProperties": {}
|
||
},
|
||
"billingConfigOverride": {
|
||
"type": "object",
|
||
"additionalProperties": {}
|
||
},
|
||
"capabilities": {
|
||
"type": "object",
|
||
"additionalProperties": {}
|
||
},
|
||
"capabilityOverride": {
|
||
"type": "object",
|
||
"additionalProperties": {}
|
||
},
|
||
"cooldownUntil": {
|
||
"type": "string"
|
||
},
|
||
"createdAt": {
|
||
"type": "string"
|
||
},
|
||
"discountFactor": {
|
||
"type": "number"
|
||
},
|
||
"displayName": {
|
||
"type": "string"
|
||
},
|
||
"enabled": {
|
||
"type": "boolean"
|
||
},
|
||
"id": {
|
||
"type": "string"
|
||
},
|
||
"modelAlias": {
|
||
"type": "string"
|
||
},
|
||
"modelName": {
|
||
"type": "string"
|
||
},
|
||
"modelType": {
|
||
"type": "array",
|
||
"items": {
|
||
"type": "string"
|
||
}
|
||
},
|
||
"permissionConfig": {
|
||
"type": "object",
|
||
"additionalProperties": {}
|
||
},
|
||
"platformId": {
|
||
"type": "string"
|
||
},
|
||
"platformName": {
|
||
"type": "string"
|
||
},
|
||
"pricingMode": {
|
||
"type": "string"
|
||
},
|
||
"pricingRuleSetId": {
|
||
"type": "string"
|
||
},
|
||
"provider": {
|
||
"type": "string"
|
||
},
|
||
"providerModelName": {
|
||
"type": "string"
|
||
},
|
||
"rateLimitPolicy": {
|
||
"type": "object",
|
||
"additionalProperties": {}
|
||
},
|
||
"retryPolicy": {
|
||
"type": "object",
|
||
"additionalProperties": {}
|
||
},
|
||
"runtimePolicyOverride": {
|
||
"type": "object",
|
||
"additionalProperties": {}
|
||
},
|
||
"runtimePolicySetId": {
|
||
"type": "string"
|
||
},
|
||
"updatedAt": {
|
||
"type": "string"
|
||
}
|
||
}
|
||
},
|
||
"store.PlatformPolicyEvent": {
|
||
"type": "object",
|
||
"properties": {
|
||
"category": {
|
||
"type": "string"
|
||
},
|
||
"createdAt": {
|
||
"type": "string"
|
||
},
|
||
"errorCode": {
|
||
"type": "string"
|
||
},
|
||
"errorMessage": {
|
||
"type": "string"
|
||
},
|
||
"eventType": {
|
||
"type": "string"
|
||
},
|
||
"id": {
|
||
"type": "string"
|
||
},
|
||
"matchedValue": {
|
||
"type": "string"
|
||
},
|
||
"platformId": {
|
||
"type": "string"
|
||
},
|
||
"platformModelId": {
|
||
"type": "string"
|
||
},
|
||
"policy": {
|
||
"type": "string"
|
||
},
|
||
"policyRule": {
|
||
"type": "string"
|
||
},
|
||
"policySource": {
|
||
"type": "string"
|
||
},
|
||
"reason": {
|
||
"type": "string"
|
||
},
|
||
"statusCode": {
|
||
"type": "integer"
|
||
},
|
||
"taskId": {
|
||
"type": "string"
|
||
}
|
||
}
|
||
},
|
||
"store.PlayableAPIKey": {
|
||
"type": "object",
|
||
"properties": {
|
||
"createdAt": {
|
||
"type": "string"
|
||
},
|
||
"expiresAt": {
|
||
"type": "string"
|
||
},
|
||
"gatewayTenantId": {
|
||
"type": "string"
|
||
},
|
||
"gatewayUserId": {
|
||
"type": "string"
|
||
},
|
||
"id": {
|
||
"type": "string"
|
||
},
|
||
"keyPrefix": {
|
||
"type": "string"
|
||
},
|
||
"lastUsedAt": {
|
||
"type": "string"
|
||
},
|
||
"name": {
|
||
"type": "string"
|
||
},
|
||
"quotaPolicy": {
|
||
"type": "object",
|
||
"additionalProperties": {}
|
||
},
|
||
"rateLimitPolicy": {
|
||
"type": "object",
|
||
"additionalProperties": {}
|
||
},
|
||
"scopes": {
|
||
"type": "array",
|
||
"items": {
|
||
"type": "string"
|
||
}
|
||
},
|
||
"secret": {
|
||
"type": "string"
|
||
},
|
||
"status": {
|
||
"type": "string"
|
||
},
|
||
"tenantId": {
|
||
"type": "string"
|
||
},
|
||
"tenantKey": {
|
||
"type": "string"
|
||
},
|
||
"updatedAt": {
|
||
"type": "string"
|
||
},
|
||
"userGroupId": {
|
||
"type": "string"
|
||
},
|
||
"userId": {
|
||
"type": "string"
|
||
}
|
||
}
|
||
},
|
||
"store.PricingRule": {
|
||
"type": "object",
|
||
"properties": {
|
||
"basePrice": {
|
||
"type": "number"
|
||
},
|
||
"baseWeight": {
|
||
"type": "object",
|
||
"additionalProperties": {}
|
||
},
|
||
"calculatorType": {
|
||
"type": "string"
|
||
},
|
||
"createdAt": {
|
||
"type": "string"
|
||
},
|
||
"currency": {
|
||
"type": "string"
|
||
},
|
||
"dimensionSchema": {
|
||
"type": "object",
|
||
"additionalProperties": {}
|
||
},
|
||
"displayName": {
|
||
"type": "string"
|
||
},
|
||
"dynamicWeight": {
|
||
"type": "object",
|
||
"additionalProperties": {}
|
||
},
|
||
"formulaConfig": {
|
||
"type": "object",
|
||
"additionalProperties": {}
|
||
},
|
||
"id": {
|
||
"type": "string"
|
||
},
|
||
"metadata": {
|
||
"type": "object",
|
||
"additionalProperties": {}
|
||
},
|
||
"priority": {
|
||
"type": "integer"
|
||
},
|
||
"resourceType": {
|
||
"type": "string"
|
||
},
|
||
"ruleKey": {
|
||
"type": "string"
|
||
},
|
||
"ruleSetId": {
|
||
"type": "string"
|
||
},
|
||
"scopeId": {
|
||
"type": "string"
|
||
},
|
||
"scopeType": {
|
||
"type": "string"
|
||
},
|
||
"status": {
|
||
"type": "string"
|
||
},
|
||
"unit": {
|
||
"type": "string"
|
||
},
|
||
"updatedAt": {
|
||
"type": "string"
|
||
}
|
||
}
|
||
},
|
||
"store.PricingRuleInput": {
|
||
"type": "object",
|
||
"properties": {
|
||
"basePrice": {
|
||
"type": "number"
|
||
},
|
||
"baseWeight": {
|
||
"type": "object",
|
||
"additionalProperties": {}
|
||
},
|
||
"calculatorType": {
|
||
"type": "string"
|
||
},
|
||
"currency": {
|
||
"type": "string"
|
||
},
|
||
"dimensionSchema": {
|
||
"type": "object",
|
||
"additionalProperties": {}
|
||
},
|
||
"displayName": {
|
||
"type": "string"
|
||
},
|
||
"dynamicWeight": {
|
||
"type": "object",
|
||
"additionalProperties": {}
|
||
},
|
||
"formulaConfig": {
|
||
"type": "object",
|
||
"additionalProperties": {}
|
||
},
|
||
"metadata": {
|
||
"type": "object",
|
||
"additionalProperties": {}
|
||
},
|
||
"priority": {
|
||
"type": "integer"
|
||
},
|
||
"resourceType": {
|
||
"type": "string"
|
||
},
|
||
"ruleKey": {
|
||
"type": "string"
|
||
},
|
||
"status": {
|
||
"type": "string"
|
||
},
|
||
"unit": {
|
||
"type": "string"
|
||
}
|
||
}
|
||
},
|
||
"store.PricingRuleSet": {
|
||
"type": "object",
|
||
"properties": {
|
||
"category": {
|
||
"type": "string"
|
||
},
|
||
"createdAt": {
|
||
"type": "string"
|
||
},
|
||
"currency": {
|
||
"type": "string"
|
||
},
|
||
"description": {
|
||
"type": "string"
|
||
},
|
||
"id": {
|
||
"type": "string"
|
||
},
|
||
"metadata": {
|
||
"type": "object",
|
||
"additionalProperties": {}
|
||
},
|
||
"name": {
|
||
"type": "string"
|
||
},
|
||
"ruleSetKey": {
|
||
"type": "string"
|
||
},
|
||
"rules": {
|
||
"type": "array",
|
||
"items": {
|
||
"$ref": "#/definitions/store.PricingRule"
|
||
}
|
||
},
|
||
"status": {
|
||
"type": "string"
|
||
},
|
||
"updatedAt": {
|
||
"type": "string"
|
||
}
|
||
}
|
||
},
|
||
"store.PricingRuleSetInput": {
|
||
"type": "object",
|
||
"properties": {
|
||
"category": {
|
||
"type": "string"
|
||
},
|
||
"currency": {
|
||
"type": "string"
|
||
},
|
||
"description": {
|
||
"type": "string"
|
||
},
|
||
"metadata": {
|
||
"type": "object",
|
||
"additionalProperties": {}
|
||
},
|
||
"name": {
|
||
"type": "string"
|
||
},
|
||
"ruleSetKey": {
|
||
"type": "string"
|
||
},
|
||
"rules": {
|
||
"type": "array",
|
||
"items": {
|
||
"$ref": "#/definitions/store.PricingRuleInput"
|
||
}
|
||
},
|
||
"status": {
|
||
"type": "string"
|
||
}
|
||
}
|
||
},
|
||
"store.PriorityDemotionRecord": {
|
||
"type": "object",
|
||
"properties": {
|
||
"category": {
|
||
"type": "string"
|
||
},
|
||
"createdAt": {
|
||
"type": "string"
|
||
},
|
||
"dynamicPriority": {
|
||
"type": "integer"
|
||
},
|
||
"errorCode": {
|
||
"type": "string"
|
||
},
|
||
"errorMessage": {
|
||
"type": "string"
|
||
},
|
||
"id": {
|
||
"type": "string"
|
||
},
|
||
"matchedValue": {
|
||
"type": "string"
|
||
},
|
||
"platformId": {
|
||
"type": "string"
|
||
},
|
||
"platformModelId": {
|
||
"type": "string"
|
||
},
|
||
"policy": {
|
||
"type": "string"
|
||
},
|
||
"policyRule": {
|
||
"type": "string"
|
||
},
|
||
"policySource": {
|
||
"type": "string"
|
||
},
|
||
"reason": {
|
||
"type": "string"
|
||
},
|
||
"statusCode": {
|
||
"type": "integer"
|
||
},
|
||
"taskId": {
|
||
"type": "string"
|
||
}
|
||
}
|
||
},
|
||
"store.RateLimitMetricStatus": {
|
||
"type": "object",
|
||
"properties": {
|
||
"currentValue": {
|
||
"type": "number"
|
||
},
|
||
"limitValue": {
|
||
"type": "number"
|
||
},
|
||
"limited": {
|
||
"type": "boolean"
|
||
},
|
||
"ratio": {
|
||
"type": "number"
|
||
},
|
||
"reservedValue": {
|
||
"type": "number"
|
||
},
|
||
"resetAt": {
|
||
"type": "string"
|
||
},
|
||
"usedValue": {
|
||
"type": "number"
|
||
}
|
||
}
|
||
},
|
||
"store.RateLimitWindow": {
|
||
"type": "object",
|
||
"properties": {
|
||
"limitValue": {
|
||
"type": "number"
|
||
},
|
||
"metric": {
|
||
"type": "string"
|
||
},
|
||
"reservedValue": {
|
||
"type": "number"
|
||
},
|
||
"resetAt": {
|
||
"type": "string"
|
||
},
|
||
"scopeKey": {
|
||
"type": "string"
|
||
},
|
||
"scopeType": {
|
||
"type": "string"
|
||
},
|
||
"updatedAt": {
|
||
"type": "string"
|
||
},
|
||
"usedValue": {
|
||
"type": "number"
|
||
},
|
||
"windowStart": {
|
||
"type": "string"
|
||
}
|
||
}
|
||
},
|
||
"store.RunnerPolicy": {
|
||
"type": "object",
|
||
"properties": {
|
||
"createdAt": {
|
||
"type": "string"
|
||
},
|
||
"description": {
|
||
"type": "string"
|
||
},
|
||
"failoverPolicy": {
|
||
"type": "object",
|
||
"additionalProperties": {}
|
||
},
|
||
"hardStopPolicy": {
|
||
"type": "object",
|
||
"additionalProperties": {}
|
||
},
|
||
"id": {
|
||
"type": "string"
|
||
},
|
||
"metadata": {
|
||
"type": "object",
|
||
"additionalProperties": {}
|
||
},
|
||
"name": {
|
||
"type": "string"
|
||
},
|
||
"policyKey": {
|
||
"type": "string"
|
||
},
|
||
"priorityDemotePolicy": {
|
||
"type": "object",
|
||
"additionalProperties": {}
|
||
},
|
||
"status": {
|
||
"type": "string"
|
||
},
|
||
"updatedAt": {
|
||
"type": "string"
|
||
}
|
||
}
|
||
},
|
||
"store.RunnerPolicyInput": {
|
||
"type": "object",
|
||
"properties": {
|
||
"description": {
|
||
"type": "string"
|
||
},
|
||
"failoverPolicy": {
|
||
"type": "object",
|
||
"additionalProperties": {}
|
||
},
|
||
"hardStopPolicy": {
|
||
"type": "object",
|
||
"additionalProperties": {}
|
||
},
|
||
"metadata": {
|
||
"type": "object",
|
||
"additionalProperties": {}
|
||
},
|
||
"name": {
|
||
"type": "string"
|
||
},
|
||
"policyKey": {
|
||
"type": "string"
|
||
},
|
||
"priorityDemotePolicy": {
|
||
"type": "object",
|
||
"additionalProperties": {}
|
||
},
|
||
"status": {
|
||
"type": "string"
|
||
}
|
||
}
|
||
},
|
||
"store.RuntimePolicySet": {
|
||
"type": "object",
|
||
"properties": {
|
||
"autoDisablePolicy": {
|
||
"type": "object",
|
||
"additionalProperties": {}
|
||
},
|
||
"createdAt": {
|
||
"type": "string"
|
||
},
|
||
"degradePolicy": {
|
||
"type": "object",
|
||
"additionalProperties": {}
|
||
},
|
||
"description": {
|
||
"type": "string"
|
||
},
|
||
"id": {
|
||
"type": "string"
|
||
},
|
||
"metadata": {
|
||
"type": "object",
|
||
"additionalProperties": {}
|
||
},
|
||
"name": {
|
||
"type": "string"
|
||
},
|
||
"policyKey": {
|
||
"type": "string"
|
||
},
|
||
"rateLimitPolicy": {
|
||
"type": "object",
|
||
"additionalProperties": {}
|
||
},
|
||
"retryPolicy": {
|
||
"type": "object",
|
||
"additionalProperties": {}
|
||
},
|
||
"status": {
|
||
"type": "string"
|
||
},
|
||
"updatedAt": {
|
||
"type": "string"
|
||
}
|
||
}
|
||
},
|
||
"store.RuntimePolicySetInput": {
|
||
"type": "object",
|
||
"properties": {
|
||
"autoDisablePolicy": {
|
||
"type": "object",
|
||
"additionalProperties": {}
|
||
},
|
||
"degradePolicy": {
|
||
"type": "object",
|
||
"additionalProperties": {}
|
||
},
|
||
"description": {
|
||
"type": "string"
|
||
},
|
||
"metadata": {
|
||
"type": "object",
|
||
"additionalProperties": {}
|
||
},
|
||
"name": {
|
||
"type": "string"
|
||
},
|
||
"policyKey": {
|
||
"type": "string"
|
||
},
|
||
"rateLimitPolicy": {
|
||
"type": "object",
|
||
"additionalProperties": {}
|
||
},
|
||
"retryPolicy": {
|
||
"type": "object",
|
||
"additionalProperties": {}
|
||
},
|
||
"status": {
|
||
"type": "string"
|
||
}
|
||
}
|
||
},
|
||
"store.TaskAttempt": {
|
||
"type": "object",
|
||
"properties": {
|
||
"attemptNo": {
|
||
"type": "integer"
|
||
},
|
||
"clientId": {
|
||
"type": "string"
|
||
},
|
||
"errorCode": {
|
||
"type": "string"
|
||
},
|
||
"errorMessage": {
|
||
"type": "string"
|
||
},
|
||
"finishedAt": {
|
||
"type": "string"
|
||
},
|
||
"id": {
|
||
"type": "string"
|
||
},
|
||
"metrics": {
|
||
"type": "object",
|
||
"additionalProperties": {}
|
||
},
|
||
"modelAlias": {
|
||
"type": "string"
|
||
},
|
||
"modelName": {
|
||
"type": "string"
|
||
},
|
||
"modelType": {
|
||
"type": "string"
|
||
},
|
||
"platformId": {
|
||
"type": "string"
|
||
},
|
||
"platformModelId": {
|
||
"type": "string"
|
||
},
|
||
"platformName": {
|
||
"type": "string"
|
||
},
|
||
"provider": {
|
||
"type": "string"
|
||
},
|
||
"providerModelName": {
|
||
"type": "string"
|
||
},
|
||
"queueKey": {
|
||
"type": "string"
|
||
},
|
||
"requestId": {
|
||
"type": "string"
|
||
},
|
||
"requestSnapshot": {
|
||
"type": "object",
|
||
"additionalProperties": {}
|
||
},
|
||
"responseDurationMs": {
|
||
"type": "integer"
|
||
},
|
||
"responseFinishedAt": {
|
||
"type": "string"
|
||
},
|
||
"responseSnapshot": {
|
||
"type": "object",
|
||
"additionalProperties": {}
|
||
},
|
||
"responseStartedAt": {
|
||
"type": "string"
|
||
},
|
||
"retryable": {
|
||
"type": "boolean"
|
||
},
|
||
"simulated": {
|
||
"type": "boolean"
|
||
},
|
||
"startedAt": {
|
||
"type": "string"
|
||
},
|
||
"status": {
|
||
"type": "string"
|
||
},
|
||
"statusCode": {
|
||
"type": "integer"
|
||
},
|
||
"taskId": {
|
||
"type": "string"
|
||
},
|
||
"usage": {
|
||
"type": "object",
|
||
"additionalProperties": {}
|
||
}
|
||
}
|
||
},
|
||
"store.TaskParamPreprocessingLog": {
|
||
"type": "object",
|
||
"properties": {
|
||
"actualInput": {
|
||
"type": "object",
|
||
"additionalProperties": {}
|
||
},
|
||
"attemptId": {
|
||
"type": "string"
|
||
},
|
||
"attemptNo": {
|
||
"type": "integer"
|
||
},
|
||
"changeCount": {
|
||
"type": "integer"
|
||
},
|
||
"changed": {
|
||
"type": "boolean"
|
||
},
|
||
"changes": {
|
||
"type": "array",
|
||
"items": {}
|
||
},
|
||
"clientId": {
|
||
"type": "string"
|
||
},
|
||
"convertedOutput": {
|
||
"type": "object",
|
||
"additionalProperties": {}
|
||
},
|
||
"createdAt": {
|
||
"type": "string"
|
||
},
|
||
"id": {
|
||
"type": "string"
|
||
},
|
||
"model": {
|
||
"type": "object",
|
||
"additionalProperties": {}
|
||
},
|
||
"modelType": {
|
||
"type": "string"
|
||
},
|
||
"platformId": {
|
||
"type": "string"
|
||
},
|
||
"platformModelId": {
|
||
"type": "string"
|
||
},
|
||
"taskId": {
|
||
"type": "string"
|
||
}
|
||
}
|
||
},
|
||
"store.UserGroup": {
|
||
"type": "object",
|
||
"properties": {
|
||
"billingDiscountPolicy": {
|
||
"type": "object",
|
||
"additionalProperties": {}
|
||
},
|
||
"createdAt": {
|
||
"type": "string"
|
||
},
|
||
"description": {
|
||
"type": "string"
|
||
},
|
||
"groupKey": {
|
||
"type": "string"
|
||
},
|
||
"id": {
|
||
"type": "string"
|
||
},
|
||
"metadata": {
|
||
"type": "object",
|
||
"additionalProperties": {}
|
||
},
|
||
"name": {
|
||
"type": "string"
|
||
},
|
||
"priority": {
|
||
"type": "integer"
|
||
},
|
||
"quotaPolicy": {
|
||
"type": "object",
|
||
"additionalProperties": {}
|
||
},
|
||
"rateLimitPolicy": {
|
||
"type": "object",
|
||
"additionalProperties": {}
|
||
},
|
||
"rechargeDiscountPolicy": {
|
||
"type": "object",
|
||
"additionalProperties": {}
|
||
},
|
||
"source": {
|
||
"type": "string"
|
||
},
|
||
"status": {
|
||
"type": "string"
|
||
},
|
||
"updatedAt": {
|
||
"type": "string"
|
||
}
|
||
}
|
||
},
|
||
"store.UserGroupInput": {
|
||
"type": "object",
|
||
"properties": {
|
||
"billingDiscountPolicy": {
|
||
"type": "object",
|
||
"additionalProperties": {}
|
||
},
|
||
"description": {
|
||
"type": "string"
|
||
},
|
||
"groupKey": {
|
||
"type": "string"
|
||
},
|
||
"metadata": {
|
||
"type": "object",
|
||
"additionalProperties": {}
|
||
},
|
||
"name": {
|
||
"type": "string"
|
||
},
|
||
"priority": {
|
||
"type": "integer"
|
||
},
|
||
"quotaPolicy": {
|
||
"type": "object",
|
||
"additionalProperties": {}
|
||
},
|
||
"rateLimitPolicy": {
|
||
"type": "object",
|
||
"additionalProperties": {}
|
||
},
|
||
"rechargeDiscountPolicy": {
|
||
"type": "object",
|
||
"additionalProperties": {}
|
||
},
|
||
"source": {
|
||
"type": "string"
|
||
},
|
||
"status": {
|
||
"type": "string"
|
||
}
|
||
}
|
||
},
|
||
"store.WalletSummary": {
|
||
"type": "object",
|
||
"properties": {
|
||
"accounts": {
|
||
"type": "array",
|
||
"items": {
|
||
"$ref": "#/definitions/store.GatewayWalletAccount"
|
||
}
|
||
},
|
||
"primaryAccount": {
|
||
"$ref": "#/definitions/store.GatewayWalletAccount"
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"securityDefinitions": {
|
||
"BearerAuth": {
|
||
"description": "Bearer JWT 或 API Key。",
|
||
"type": "apiKey",
|
||
"name": "Authorization",
|
||
"in": "header"
|
||
}
|
||
}
|
||
} |