// Package docs Code generated by swaggo/swag. DO NOT EDIT package docs import "github.com/swaggo/swag" const docTemplate = `{ "schemes": {{ marshal .Schemes }}, "swagger": "2.0", "info": { "description": "{{escape .Description}}", "title": "{{.Title}}", "contact": {}, "version": "{{.Version}}" }, "host": "{{.Host}}", "basePath": "{{.BasePath}}", "paths": { "/api/channel/": { "post": { "security": [ { "ApiKeyAuth": [] } ], "description": "Adds a new channel to the system", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "channel" ], "summary": "Add a single channel", "parameters": [ { "description": "Channel information", "name": "channel", "in": "body", "required": true, "schema": { "$ref": "#/definitions/controller.AddChannelRequest" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/middleware.APIResponse" } } } } }, "/api/channel/{id}": { "get": { "security": [ { "ApiKeyAuth": [] } ], "description": "Returns detailed information about a specific channel", "produces": [ "application/json" ], "tags": [ "channel" ], "summary": "Get a channel by ID", "parameters": [ { "type": "integer", "description": "Channel ID", "name": "id", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/middleware.APIResponse" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/model.Channel" } } } ] } } } }, "put": { "security": [ { "ApiKeyAuth": [] } ], "description": "Updates an existing channel by its ID", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "channel" ], "summary": "Update a channel", "parameters": [ { "type": "integer", "description": "Channel ID", "name": "id", "in": "path", "required": true }, { "description": "Updated channel information", "name": "channel", "in": "body", "required": true, "schema": { "$ref": "#/definitions/controller.AddChannelRequest" } } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/middleware.APIResponse" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/model.Channel" } } } ] } } } }, "delete": { "security": [ { "ApiKeyAuth": [] } ], "description": "Deletes a channel by its ID", "produces": [ "application/json" ], "tags": [ "channel" ], "summary": "Delete a channel", "parameters": [ { "type": "integer", "description": "Channel ID", "name": "id", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/middleware.APIResponse" } } } } }, "/api/channel/{id}/balance": { "get": { "security": [ { "ApiKeyAuth": [] } ], "description": "Updates the balance for a single channel", "produces": [ "application/json" ], "tags": [ "channel" ], "summary": "Update channel balance", "parameters": [ { "type": "integer", "description": "Channel ID", "name": "id", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/middleware.APIResponse" }, { "type": "object", "properties": { "data": { "type": "number", "format": "float64" } } } ] } } } } }, "/api/channel/{id}/status": { "post": { "security": [ { "ApiKeyAuth": [] } ], "description": "Updates the status of a channel by its ID", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "channel" ], "summary": "Update channel status", "parameters": [ { "type": "integer", "description": "Channel ID", "name": "id", "in": "path", "required": true }, { "description": "Status information", "name": "status", "in": "body", "required": true, "schema": { "$ref": "#/definitions/controller.UpdateChannelStatusRequest" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/middleware.APIResponse" } } } } }, "/api/channel/{id}/test": { "get": { "security": [ { "ApiKeyAuth": [] } ], "description": "Tests all models in the channel", "produces": [ "application/json" ], "tags": [ "channel" ], "summary": "Test channel models", "parameters": [ { "type": "integer", "description": "Channel ID", "name": "id", "in": "path", "required": true }, { "type": "boolean", "description": "Return success", "name": "return_success", "in": "query" }, { "type": "boolean", "description": "Success body", "name": "success_body", "in": "query" }, { "type": "boolean", "description": "Stream", "name": "stream", "in": "query" } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/middleware.APIResponse" }, { "type": "object", "properties": { "data": { "type": "array", "items": { "$ref": "#/definitions/controller.TestResult" } } } } ] } } } } }, "/api/channel/{id}/{model}": { "get": { "security": [ { "ApiKeyAuth": [] } ], "description": "Tests a single model in the channel", "produces": [ "application/json" ], "tags": [ "channel" ], "summary": "Test channel model", "parameters": [ { "type": "integer", "description": "Channel ID", "name": "id", "in": "path", "required": true }, { "type": "string", "description": "Model name", "name": "model", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/middleware.APIResponse" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/model.ChannelTest" } } } ] } } } } }, "/api/channels/": { "get": { "security": [ { "ApiKeyAuth": [] } ], "description": "Returns a paginated list of channels with optional filters", "produces": [ "application/json" ], "tags": [ "channels" ], "summary": "Get channels with pagination", "parameters": [ { "type": "integer", "description": "Page number", "name": "page", "in": "query" }, { "type": "integer", "description": "Items per page", "name": "per_page", "in": "query" }, { "type": "integer", "description": "Filter by id", "name": "id", "in": "query" }, { "type": "string", "description": "Filter by name", "name": "name", "in": "query" }, { "type": "string", "description": "Filter by key", "name": "key", "in": "query" }, { "type": "integer", "description": "Filter by channel type", "name": "channel_type", "in": "query" }, { "type": "string", "description": "Filter by base URL", "name": "base_url", "in": "query" }, { "type": "string", "description": "Order by field", "name": "order", "in": "query" } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/middleware.APIResponse" }, { "type": "object", "properties": { "data": { "type": "object", "additionalProperties": { "allOf": [ {}, { "type": "object", "properties": { "channels": { "type": "array", "items": { "$ref": "#/definitions/model.Channel" } }, "total": { "type": "integer" } } } ] } } } } ] } } } }, "post": { "security": [ { "ApiKeyAuth": [] } ], "description": "Adds multiple channels in a batch operation", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "channels" ], "summary": "Add multiple channels", "parameters": [ { "description": "Channel information", "name": "channels", "in": "body", "required": true, "schema": { "type": "array", "items": { "$ref": "#/definitions/controller.AddChannelRequest" } } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/middleware.APIResponse" } } } } }, "/api/channels/all": { "get": { "security": [ { "ApiKeyAuth": [] } ], "description": "Returns a list of all channels without pagination", "produces": [ "application/json" ], "tags": [ "channels" ], "summary": "Get all channels", "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/middleware.APIResponse" }, { "type": "object", "properties": { "data": { "type": "array", "items": { "$ref": "#/definitions/model.Channel" } } } } ] } } } } }, "/api/channels/balance": { "get": { "security": [ { "ApiKeyAuth": [] } ], "description": "Updates the balance for all channels", "produces": [ "application/json" ], "tags": [ "channel" ], "summary": "Update all channels balance", "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/middleware.APIResponse" } } } } }, "/api/channels/batch_delete": { "post": { "security": [ { "ApiKeyAuth": [] } ], "description": "Deletes multiple channels by their IDs", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "channels" ], "summary": "Delete multiple channels", "parameters": [ { "description": "Channel IDs", "name": "ids", "in": "body", "required": true, "schema": { "type": "array", "items": { "type": "integer" } } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/middleware.APIResponse" } } } } }, "/api/channels/import/oneapi": { "post": { "security": [ { "ApiKeyAuth": [] } ], "description": "Imports channels from OneAPI", "produces": [ "application/json" ], "tags": [ "channels" ], "summary": "Import channel from OneAPI", "parameters": [ { "description": "Import channel from OneAPI request", "name": "request", "in": "body", "required": true, "schema": { "$ref": "#/definitions/controller.ImportChannelFromOneAPIRequest" } } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/middleware.APIResponse" }, { "type": "object", "properties": { "data": { "type": "array", "items": {} } } } ] } } } } }, "/api/channels/search": { "get": { "security": [ { "ApiKeyAuth": [] } ], "description": "Search channels with keyword and optional filters", "produces": [ "application/json" ], "tags": [ "channels" ], "summary": "Search channels", "parameters": [ { "type": "string", "description": "Search keyword", "name": "keyword", "in": "query", "required": true }, { "type": "integer", "description": "Page number", "name": "page", "in": "query" }, { "type": "integer", "description": "Items per page", "name": "per_page", "in": "query" }, { "type": "integer", "description": "Filter by id", "name": "id", "in": "query" }, { "type": "string", "description": "Filter by name", "name": "name", "in": "query" }, { "type": "string", "description": "Filter by key", "name": "key", "in": "query" }, { "type": "integer", "description": "Filter by channel type", "name": "channel_type", "in": "query" }, { "type": "string", "description": "Filter by base URL", "name": "base_url", "in": "query" }, { "type": "string", "description": "Order by field", "name": "order", "in": "query" } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/middleware.APIResponse" }, { "type": "object", "properties": { "data": { "type": "object", "additionalProperties": { "allOf": [ {}, { "type": "object", "properties": { "channels": { "type": "array", "items": { "$ref": "#/definitions/model.Channel" } }, "total": { "type": "integer" } } } ] } } } } ] } } } } }, "/api/channels/test": { "get": { "security": [ { "ApiKeyAuth": [] } ], "description": "Tests all channels", "produces": [ "application/json" ], "tags": [ "channel" ], "summary": "Test all channels", "parameters": [ { "type": "boolean", "description": "Test disabled", "name": "test_disabled", "in": "query" }, { "type": "boolean", "description": "Return success", "name": "return_success", "in": "query" }, { "type": "boolean", "description": "Success body", "name": "success_body", "in": "query" }, { "type": "boolean", "description": "Stream", "name": "stream", "in": "query" } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/middleware.APIResponse" }, { "type": "object", "properties": { "data": { "type": "array", "items": { "$ref": "#/definitions/controller.TestResult" } } } } ] } } } } }, "/api/channels/type_metas": { "get": { "security": [ { "ApiKeyAuth": [] } ], "description": "Returns metadata for all channel types", "produces": [ "application/json" ], "tags": [ "channels" ], "summary": "Get channel type metadata", "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/middleware.APIResponse" }, { "type": "object", "properties": { "data": { "type": "object", "additionalProperties": { "$ref": "#/definitions/adaptors.AdaptorMeta" } } } } ] } } } } }, "/api/dashboard/": { "get": { "security": [ { "ApiKeyAuth": [] } ], "description": "Returns the general dashboard data including usage statistics and metrics", "produces": [ "application/json" ], "tags": [ "dashboard" ], "summary": "Get dashboard data", "parameters": [ { "type": "integer", "description": "Channel ID", "name": "channel", "in": "query" }, { "type": "string", "description": "Model name", "name": "model", "in": "query" }, { "type": "integer", "format": "int64", "description": "Start second timestamp", "name": "start_timestamp", "in": "query" }, { "type": "integer", "format": "int64", "description": "End second timestamp", "name": "end_timestamp", "in": "query" }, { "type": "string", "description": "Timezone, default is Local", "name": "timezone", "in": "query" }, { "type": "string", "description": "Time span type (minute, hour, day, month)", "name": "timespan", "in": "query" } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/middleware.APIResponse" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/model.DashboardResponse" } } } ] } } } } }, "/api/dashboard/{group}": { "get": { "security": [ { "ApiKeyAuth": [] } ], "description": "Returns dashboard data and metrics specific to the given group", "produces": [ "application/json" ], "tags": [ "dashboard" ], "summary": "Get dashboard data for a specific group", "parameters": [ { "type": "string", "description": "Group", "name": "group", "in": "path", "required": true }, { "type": "string", "description": "Token name", "name": "token_name", "in": "query" }, { "type": "string", "description": "Model or *", "name": "model", "in": "query" }, { "type": "integer", "format": "int64", "description": "Start second timestamp", "name": "start_timestamp", "in": "query" }, { "type": "integer", "format": "int64", "description": "End second timestamp", "name": "end_timestamp", "in": "query" }, { "type": "string", "description": "Timezone, default is Local", "name": "timezone", "in": "query" }, { "type": "string", "description": "Time span type (minute, hour, day, month)", "name": "timespan", "in": "query" } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/middleware.APIResponse" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/model.GroupDashboardResponse" } } } ] } } } } }, "/api/dashboard/{group}/models": { "get": { "security": [ { "ApiKeyAuth": [] } ], "description": "Returns model-specific metrics and usage data for the given group", "produces": [ "application/json" ], "tags": [ "dashboard" ], "summary": "Get model usage data for a specific group", "parameters": [ { "type": "string", "description": "Group", "name": "group", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/middleware.APIResponse" }, { "type": "object", "properties": { "data": { "type": "array", "items": { "$ref": "#/definitions/controller.GroupModel" } } } } ] } } } } }, "/api/dashboardv2/": { "get": { "security": [ { "ApiKeyAuth": [] } ], "description": "Returns model-specific metrics and usage data for the given channel", "produces": [ "application/json" ], "tags": [ "dashboard" ], "summary": "Get model usage data for a specific channel", "parameters": [ { "type": "integer", "description": "Channel ID", "name": "channel", "in": "query" }, { "type": "string", "description": "Model name", "name": "model", "in": "query" }, { "type": "integer", "format": "int64", "description": "Start timestamp", "name": "start_timestamp", "in": "query" }, { "type": "integer", "format": "int64", "description": "End timestamp", "name": "end_timestamp", "in": "query" }, { "type": "string", "description": "Timezone, default is Local", "name": "timezone", "in": "query" }, { "type": "string", "description": "Time span type (minute, hour, day, month)", "name": "timespan", "in": "query" } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/middleware.APIResponse" }, { "type": "object", "properties": { "data": { "type": "array", "items": { "$ref": "#/definitions/model.TimeSummaryDataV2" } } } } ] } } } } }, "/api/dashboardv2/{group}": { "get": { "security": [ { "ApiKeyAuth": [] } ], "description": "Returns model-specific metrics and usage data for the given group", "produces": [ "application/json" ], "tags": [ "dashboard" ], "summary": "Get model usage data for a specific group", "parameters": [ { "type": "string", "description": "Group", "name": "group", "in": "path", "required": true }, { "type": "string", "description": "Token name", "name": "token_name", "in": "query" }, { "type": "string", "description": "Model name", "name": "model", "in": "query" }, { "type": "integer", "format": "int64", "description": "Start timestamp", "name": "start_timestamp", "in": "query" }, { "type": "integer", "format": "int64", "description": "End timestamp", "name": "end_timestamp", "in": "query" }, { "type": "string", "description": "Timezone, default is Local", "name": "timezone", "in": "query" }, { "type": "string", "description": "Time span type (minute, hour, day, month)", "name": "timespan", "in": "query" } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/middleware.APIResponse" }, { "type": "object", "properties": { "data": { "type": "array", "items": { "$ref": "#/definitions/model.TimeSummaryDataV2" } } } } ] } } } } }, "/api/embedmcp/": { "get": { "security": [ { "ApiKeyAuth": [] } ], "description": "Get embed mcp", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "embedmcp" ], "summary": "Get embed mcp", "responses": { "200": { "description": "OK", "schema": { "type": "array", "items": { "$ref": "#/definitions/controller.EmbedMCP" } } } } }, "post": { "security": [ { "ApiKeyAuth": [] } ], "description": "Save embed mcp", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "embedmcp" ], "summary": "Save embed mcp", "parameters": [ { "description": "Save embed mcp request", "name": "body", "in": "body", "required": true, "schema": { "$ref": "#/definitions/controller.SaveEmbedMCPRequest" } } ], "responses": { "200": { "description": "OK" } } } }, "/api/group/{group}": { "get": { "security": [ { "ApiKeyAuth": [] } ], "description": "Returns detailed information about a specific group", "produces": [ "application/json" ], "tags": [ "group" ], "summary": "Get a group", "parameters": [ { "type": "string", "description": "Group name", "name": "group", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/middleware.APIResponse" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/controller.GroupResponse" } } } ] } } } }, "put": { "security": [ { "ApiKeyAuth": [] } ], "description": "Updates an existing group with the given information", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "group" ], "summary": "Update a group", "parameters": [ { "type": "string", "description": "Group name", "name": "group", "in": "path", "required": true }, { "description": "Updated group information", "name": "data", "in": "body", "required": true, "schema": { "$ref": "#/definitions/model.UpdateGroupRequest" } } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/middleware.APIResponse" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/model.Group" } } } ] } } } }, "post": { "security": [ { "ApiKeyAuth": [] } ], "description": "Creates a new group with the given information", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "group" ], "summary": "Create a new group", "parameters": [ { "type": "string", "description": "Group name", "name": "group", "in": "path", "required": true }, { "description": "Group information", "name": "data", "in": "body", "required": true, "schema": { "$ref": "#/definitions/controller.CreateGroupRequest" } } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/middleware.APIResponse" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/model.Group" } } } ] } } } }, "delete": { "security": [ { "ApiKeyAuth": [] } ], "description": "Deletes a group by its name", "produces": [ "application/json" ], "tags": [ "group" ], "summary": "Delete a group", "parameters": [ { "type": "string", "description": "Group name", "name": "group", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/middleware.APIResponse" } } } } }, "/api/group/{group}/mcp": { "get": { "security": [ { "ApiKeyAuth": [] } ], "description": "Get MCPs by group", "produces": [ "application/json" ], "tags": [ "mcp", "group" ], "summary": "Get MCPs by group", "parameters": [ { "type": "string", "description": "Group ID", "name": "group", "in": "path", "required": true }, { "type": "integer", "description": "Page", "name": "page", "in": "query" }, { "type": "integer", "description": "Per Page", "name": "per_page", "in": "query" }, { "type": "string", "description": "MCP ID", "name": "id", "in": "query" }, { "type": "string", "description": "hosted or local", "name": "type", "in": "query" }, { "type": "string", "description": "Keyword", "name": "keyword", "in": "query" } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/middleware.APIResponse" }, { "type": "object", "properties": { "data": { "type": "array", "items": { "$ref": "#/definitions/controller.GroupPublicMCPResponse" } } } } ] } } } } }, "/api/group/{group}/mcp/{id}": { "get": { "security": [ { "ApiKeyAuth": [] } ], "description": "Get a specific MCP by its ID", "produces": [ "application/json" ], "tags": [ "mcp", "group" ], "summary": "Get MCP by ID", "parameters": [ { "type": "string", "description": "Group ID", "name": "group", "in": "path", "required": true }, { "type": "string", "description": "MCP ID", "name": "id", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/middleware.APIResponse" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/controller.GroupPublicMCPDetailResponse" } } } ] } } } } }, "/api/group/{group}/model_config/{model}": { "get": { "security": [ { "ApiKeyAuth": [] } ], "description": "Get group model config", "produces": [ "application/json" ], "tags": [ "group" ], "summary": "Get group model config", "parameters": [ { "type": "string", "description": "Group name", "name": "group", "in": "path", "required": true }, { "type": "string", "description": "Model name", "name": "model", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/middleware.APIResponse" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/model.GroupModelConfig" } } } ] } } } }, "put": { "security": [ { "ApiKeyAuth": [] } ], "description": "Update group model config", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "group" ], "summary": "Update group model config", "parameters": [ { "type": "string", "description": "Group name", "name": "group", "in": "path", "required": true }, { "type": "string", "description": "Model name", "name": "model", "in": "path", "required": true }, { "description": "Group model config information", "name": "data", "in": "body", "required": true, "schema": { "$ref": "#/definitions/controller.SaveGroupModelConfigRequest" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/middleware.APIResponse" } } } }, "post": { "security": [ { "ApiKeyAuth": [] } ], "description": "Save group model config", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "group" ], "summary": "Save group model config", "parameters": [ { "type": "string", "description": "Group name", "name": "group", "in": "path", "required": true }, { "description": "Group model config information", "name": "data", "in": "body", "required": true, "schema": { "$ref": "#/definitions/controller.SaveGroupModelConfigRequest" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/middleware.APIResponse" } } } }, "delete": { "security": [ { "ApiKeyAuth": [] } ], "description": "Delete group model config", "produces": [ "application/json" ], "tags": [ "group" ], "summary": "Delete group model config", "parameters": [ { "type": "string", "description": "Group name", "name": "group", "in": "path", "required": true }, { "type": "string", "description": "Model name", "name": "model", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/middleware.APIResponse" } } } } }, "/api/group/{group}/model_configs/": { "get": { "security": [ { "ApiKeyAuth": [] } ], "description": "Get group model configs", "produces": [ "application/json" ], "tags": [ "group" ], "summary": "Get group model configs", "parameters": [ { "type": "string", "description": "Group name", "name": "group", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/middleware.APIResponse" }, { "type": "object", "properties": { "data": { "type": "array", "items": { "$ref": "#/definitions/model.GroupModelConfig" } } } } ] } } } }, "put": { "security": [ { "ApiKeyAuth": [] } ], "description": "Update group model configs", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "group" ], "summary": "Update group model configs", "parameters": [ { "type": "string", "description": "Group name", "name": "group", "in": "path", "required": true }, { "description": "Group model config information", "name": "data", "in": "body", "required": true, "schema": { "type": "array", "items": { "$ref": "#/definitions/controller.SaveGroupModelConfigRequest" } } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/middleware.APIResponse" } } } }, "post": { "security": [ { "ApiKeyAuth": [] } ], "description": "Save group model configs", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "group" ], "summary": "Save group model configs", "parameters": [ { "type": "string", "description": "Group name", "name": "group", "in": "path", "required": true }, { "description": "Group model config information", "name": "data", "in": "body", "required": true, "schema": { "type": "array", "items": { "$ref": "#/definitions/controller.SaveGroupModelConfigRequest" } } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/middleware.APIResponse" } } } }, "delete": { "security": [ { "ApiKeyAuth": [] } ], "description": "Delete group model configs", "produces": [ "application/json" ], "tags": [ "group" ], "summary": "Delete group model configs", "parameters": [ { "type": "string", "description": "Group name", "name": "group", "in": "path", "required": true }, { "description": "Model names", "name": "models", "in": "body", "required": true, "schema": { "type": "array", "items": { "type": "string" } } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/middleware.APIResponse" } } } } }, "/api/group/{group}/rpm_ratio": { "post": { "security": [ { "ApiKeyAuth": [] } ], "description": "Updates the RPM (Requests Per Minute) ratio for a group", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "group" ], "summary": "Update group RPM ratio", "parameters": [ { "type": "string", "description": "Group name", "name": "group", "in": "path", "required": true }, { "description": "RPM ratio information", "name": "data", "in": "body", "required": true, "schema": { "$ref": "#/definitions/controller.UpdateGroupRPMRatioRequest" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/middleware.APIResponse" } } } } }, "/api/group/{group}/status": { "post": { "security": [ { "ApiKeyAuth": [] } ], "description": "Updates the status of a group", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "group" ], "summary": "Update group status", "parameters": [ { "type": "string", "description": "Group name", "name": "group", "in": "path", "required": true }, { "description": "Status information", "name": "status", "in": "body", "required": true, "schema": { "$ref": "#/definitions/controller.UpdateGroupStatusRequest" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/middleware.APIResponse" } } } } }, "/api/group/{group}/tpm_ratio": { "post": { "security": [ { "ApiKeyAuth": [] } ], "description": "Updates the TPM (Tokens Per Minute) ratio for a group", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "group" ], "summary": "Update group TPM ratio", "parameters": [ { "type": "string", "description": "Group name", "name": "group", "in": "path", "required": true }, { "description": "TPM ratio information", "name": "data", "in": "body", "required": true, "schema": { "$ref": "#/definitions/controller.UpdateGroupTPMRatioRequest" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/middleware.APIResponse" } } } } }, "/api/groups/": { "get": { "security": [ { "ApiKeyAuth": [] } ], "description": "Returns a list of all groups with pagination", "produces": [ "application/json" ], "tags": [ "groups" ], "summary": "Get all groups", "parameters": [ { "type": "integer", "description": "Page number", "name": "page", "in": "query" }, { "type": "integer", "description": "Items per page", "name": "per_page", "in": "query" } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/middleware.APIResponse" }, { "type": "object", "properties": { "data": { "type": "object", "additionalProperties": { "allOf": [ {}, { "type": "object", "properties": { "groups": { "type": "array", "items": { "$ref": "#/definitions/controller.GroupResponse" } }, "total": { "type": "integer" } } } ] } } } } ] } } } } }, "/api/groups/batch_delete": { "post": { "security": [ { "ApiKeyAuth": [] } ], "description": "Deletes multiple groups by their IDs", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "groups" ], "summary": "Delete multiple groups", "parameters": [ { "description": "Group IDs", "name": "ids", "in": "body", "required": true, "schema": { "type": "array", "items": { "type": "string" } } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/middleware.APIResponse" } } } } }, "/api/groups/batch_status": { "post": { "security": [ { "ApiKeyAuth": [] } ], "description": "Updates the status of multiple groups", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "groups" ], "summary": "Update multiple groups status", "parameters": [ { "description": "Group IDs and status", "name": "data", "in": "body", "required": true, "schema": { "$ref": "#/definitions/controller.UpdateGroupsStatusRequest" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/middleware.APIResponse" } } } } }, "/api/groups/ip_groups": { "get": { "security": [ { "ApiKeyAuth": [] } ], "description": "Get IP group list", "produces": [ "application/json" ], "tags": [ "groups" ], "summary": "Get IP group list", "parameters": [ { "type": "integer", "description": "Threshold", "name": "threshold", "in": "query" }, { "type": "integer", "description": "Start timestamp", "name": "start_timestamp", "in": "query" }, { "type": "integer", "description": "End timestamp", "name": "end_timestamp", "in": "query" } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/middleware.APIResponse" }, { "type": "object", "properties": { "data": { "type": "object", "additionalProperties": { "type": "array", "items": { "type": "string" } } } } } ] } } } } }, "/api/groups/search": { "get": { "security": [ { "ApiKeyAuth": [] } ], "description": "Search groups with keyword and pagination", "produces": [ "application/json" ], "tags": [ "groups" ], "summary": "Search groups", "parameters": [ { "type": "string", "description": "Search keyword", "name": "keyword", "in": "query", "required": true }, { "type": "integer", "description": "Page number", "name": "page", "in": "query" }, { "type": "integer", "description": "Items per page", "name": "per_page", "in": "query" }, { "type": "integer", "description": "Status", "name": "status", "in": "query" }, { "type": "string", "description": "Order", "name": "order", "in": "query" } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/middleware.APIResponse" }, { "type": "object", "properties": { "data": { "type": "object", "additionalProperties": { "allOf": [ {}, { "type": "object", "properties": { "groups": { "type": "array", "items": { "$ref": "#/definitions/controller.GroupResponse" } }, "total": { "type": "integer" } } } ] } } } } ] } } } } }, "/api/log/{group}": { "get": { "security": [ { "ApiKeyAuth": [] } ], "description": "Get logs for a specific group", "produces": [ "application/json" ], "tags": [ "log" ], "summary": "Get group logs", "parameters": [ { "type": "string", "description": "Group name", "name": "group", "in": "path", "required": true }, { "type": "integer", "description": "Page number", "name": "page", "in": "query" }, { "type": "integer", "description": "Items per page", "name": "per_page", "in": "query" }, { "type": "integer", "description": "Start timestamp (milliseconds)", "name": "start_timestamp", "in": "query" }, { "type": "integer", "description": "End timestamp (milliseconds)", "name": "end_timestamp", "in": "query" }, { "type": "string", "description": "Token name", "name": "token_name", "in": "query" }, { "type": "string", "description": "Model name", "name": "model_name", "in": "query" }, { "type": "integer", "description": "Channel ID", "name": "channel", "in": "query" }, { "type": "integer", "description": "Token ID", "name": "token_id", "in": "query" }, { "type": "string", "description": "Order", "name": "order", "in": "query" }, { "type": "string", "description": "Request ID", "name": "request_id", "in": "query" }, { "type": "string", "description": "Status code type", "name": "code_type", "in": "query" }, { "type": "integer", "description": "Status code", "name": "code", "in": "query" }, { "type": "boolean", "description": "With body", "name": "with_body", "in": "query" }, { "type": "string", "description": "IP", "name": "ip", "in": "query" }, { "type": "string", "description": "User", "name": "user", "in": "query" } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/middleware.APIResponse" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/model.GetGroupLogsResult" } } } ] } } } } }, "/api/log/{group}/detail/{log_id}": { "get": { "security": [ { "ApiKeyAuth": [] } ], "description": "Get detailed information about a specific log entry in a group", "produces": [ "application/json" ], "tags": [ "log" ], "summary": "Get group log detail", "parameters": [ { "type": "string", "description": "Group name", "name": "group", "in": "path", "required": true }, { "type": "string", "description": "Log ID", "name": "log_id", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/middleware.APIResponse" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/model.RequestDetail" } } } ] } } } } }, "/api/log/{group}/search": { "get": { "security": [ { "ApiKeyAuth": [] } ], "description": "Search logs for a specific group with filters", "produces": [ "application/json" ], "tags": [ "log" ], "summary": "Search group logs", "parameters": [ { "type": "string", "description": "Group name", "name": "group", "in": "path", "required": true }, { "type": "string", "description": "Keyword", "name": "keyword", "in": "query" }, { "type": "integer", "description": "Page number", "name": "page", "in": "query" }, { "type": "integer", "description": "Items per page", "name": "per_page", "in": "query" }, { "type": "integer", "description": "Start timestamp (milliseconds)", "name": "start_timestamp", "in": "query" }, { "type": "integer", "description": "End timestamp (milliseconds)", "name": "end_timestamp", "in": "query" }, { "type": "string", "description": "Filter by token name", "name": "token_name", "in": "query" }, { "type": "string", "description": "Filter by model name", "name": "model_name", "in": "query" }, { "type": "integer", "description": "Filter by token id", "name": "token_id", "in": "query" }, { "type": "string", "description": "Order", "name": "order", "in": "query" }, { "type": "string", "description": "Request ID", "name": "request_id", "in": "query" }, { "type": "string", "description": "Status code type", "name": "code_type", "in": "query" }, { "type": "integer", "description": "Status code", "name": "code", "in": "query" }, { "type": "boolean", "description": "With body", "name": "with_body", "in": "query" }, { "type": "string", "description": "IP", "name": "ip", "in": "query" }, { "type": "string", "description": "User", "name": "user", "in": "query" } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/middleware.APIResponse" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/model.GetGroupLogsResult" } } } ] } } } } }, "/api/logs/": { "get": { "security": [ { "ApiKeyAuth": [] } ], "description": "Returns a paginated list of all logs with optional filters", "produces": [ "application/json" ], "tags": [ "logs" ], "summary": "Get all logs", "parameters": [ { "type": "integer", "description": "Page number", "name": "page", "in": "query" }, { "type": "integer", "description": "Items per page", "name": "per_page", "in": "query" }, { "type": "integer", "description": "Start timestamp (milliseconds)", "name": "start_timestamp", "in": "query" }, { "type": "integer", "description": "End timestamp (milliseconds)", "name": "end_timestamp", "in": "query" }, { "type": "string", "description": "Model name", "name": "model_name", "in": "query" }, { "type": "integer", "description": "Channel ID", "name": "channel", "in": "query" }, { "type": "string", "description": "Order", "name": "order", "in": "query" }, { "type": "string", "description": "Request ID", "name": "request_id", "in": "query" }, { "type": "string", "description": "Status code type", "name": "code_type", "in": "query" }, { "type": "integer", "description": "Status code", "name": "code", "in": "query" }, { "type": "boolean", "description": "With body", "name": "with_body", "in": "query" }, { "type": "string", "description": "IP", "name": "ip", "in": "query" }, { "type": "string", "description": "User", "name": "user", "in": "query" } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/middleware.APIResponse" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/model.GetLogsResult" } } } ] } } } }, "delete": { "security": [ { "ApiKeyAuth": [] } ], "description": "Deletes logs older than the specified retention period", "produces": [ "application/json" ], "tags": [ "logs" ], "summary": "Delete historical logs", "parameters": [ { "type": "integer", "description": "Timestamp (milliseconds)", "name": "timestamp", "in": "query", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/middleware.APIResponse" }, { "type": "object", "properties": { "data": { "type": "integer" } } } ] } } } } }, "/api/logs/consume_error": { "get": { "security": [ { "ApiKeyAuth": [] } ], "description": "Search for logs with consumption errors", "produces": [ "application/json" ], "tags": [ "logs" ], "summary": "Search consumption errors", "parameters": [ { "type": "integer", "description": "Page number", "name": "page", "in": "query" }, { "type": "integer", "description": "Items per page", "name": "per_page", "in": "query" }, { "type": "integer", "description": "Start timestamp (milliseconds)", "name": "start_timestamp", "in": "query" }, { "type": "integer", "description": "End timestamp (milliseconds)", "name": "end_timestamp", "in": "query" }, { "type": "string", "description": "Keyword", "name": "keyword", "in": "query" }, { "type": "string", "description": "Group", "name": "group", "in": "query" }, { "type": "string", "description": "Token name", "name": "token_name", "in": "query" }, { "type": "string", "description": "Model name", "name": "model_name", "in": "query" }, { "type": "string", "description": "Content", "name": "content", "in": "query" }, { "type": "integer", "description": "Token ID", "name": "token_id", "in": "query" }, { "type": "string", "description": "Order", "name": "order", "in": "query" }, { "type": "string", "description": "Request ID", "name": "request_id", "in": "query" } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/middleware.APIResponse" }, { "type": "object", "properties": { "data": { "type": "object", "additionalProperties": { "allOf": [ {}, { "type": "object", "properties": { "logs": { "type": "array", "items": { "$ref": "#/definitions/model.RequestDetail" } }, "total": { "type": "integer" } } } ] } } } } ] } } } } }, "/api/logs/detail/{log_id}": { "get": { "security": [ { "ApiKeyAuth": [] } ], "description": "Get detailed information about a specific log entry", "produces": [ "application/json" ], "tags": [ "logs" ], "summary": "Get log detail", "parameters": [ { "type": "string", "description": "Log ID", "name": "log_id", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/middleware.APIResponse" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/model.RequestDetail" } } } ] } } } } }, "/api/logs/search": { "get": { "security": [ { "ApiKeyAuth": [] } ], "description": "Search logs with various filters", "produces": [ "application/json" ], "tags": [ "logs" ], "summary": "Search logs", "parameters": [ { "type": "string", "description": "Keyword", "name": "keyword", "in": "query" }, { "type": "integer", "description": "Page number", "name": "page", "in": "query" }, { "type": "integer", "description": "Items per page", "name": "per_page", "in": "query" }, { "type": "integer", "description": "Start timestamp (milliseconds)", "name": "start_timestamp", "in": "query" }, { "type": "integer", "description": "End timestamp (milliseconds)", "name": "end_timestamp", "in": "query" }, { "type": "string", "description": "Filter by model name", "name": "model_name", "in": "query" }, { "type": "integer", "description": "Filter by channel", "name": "channel", "in": "query" }, { "type": "string", "description": "Group name", "name": "group", "in": "query", "required": true }, { "type": "integer", "description": "Filter by token id", "name": "token_id", "in": "query" }, { "type": "string", "description": "Filter by token name", "name": "token_name", "in": "query" }, { "type": "string", "description": "Order", "name": "order", "in": "query" }, { "type": "string", "description": "Request ID", "name": "request_id", "in": "query" }, { "type": "string", "description": "Status code type", "name": "code_type", "in": "query" }, { "type": "integer", "description": "Status code", "name": "code", "in": "query" }, { "type": "boolean", "description": "With body", "name": "with_body", "in": "query" }, { "type": "string", "description": "IP", "name": "ip", "in": "query" }, { "type": "string", "description": "User", "name": "user", "in": "query" } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/middleware.APIResponse" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/model.GetLogsResult" } } } ] } } } } }, "/api/mcp/group/all": { "get": { "security": [ { "ApiKeyAuth": [] } ], "description": "Get all Group MCPs with filtering", "produces": [ "application/json" ], "tags": [ "mcp" ], "summary": "Get all Group MCPs", "parameters": [ { "type": "integer", "description": "MCP status", "name": "status", "in": "query" } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/middleware.APIResponse" }, { "type": "object", "properties": { "data": { "type": "array", "items": { "$ref": "#/definitions/controller.GroupMCPResponse" } } } } ] } } } } }, "/api/mcp/group/{group}": { "get": { "security": [ { "ApiKeyAuth": [] } ], "description": "Get a list of Group MCPs with pagination and filtering", "produces": [ "application/json" ], "tags": [ "mcp" ], "summary": "Get Group MCPs", "parameters": [ { "type": "string", "description": "Group ID", "name": "group", "in": "path", "required": true }, { "type": "integer", "description": "Page number", "name": "page", "in": "query" }, { "type": "integer", "description": "Items per page", "name": "per_page", "in": "query" }, { "type": "string", "description": "MCP id", "name": "id", "in": "query" }, { "type": "string", "description": "MCP type, mcp_proxy_sse, mcp_proxy_streamable, mcp_openapi", "name": "type", "in": "query" }, { "type": "string", "description": "Search keyword", "name": "keyword", "in": "query" }, { "type": "integer", "description": "MCP status", "name": "status", "in": "query" } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/middleware.APIResponse" }, { "type": "object", "properties": { "data": { "type": "array", "items": { "$ref": "#/definitions/controller.GroupMCPResponse" } } } } ] } } } }, "post": { "security": [ { "ApiKeyAuth": [] } ], "description": "Create a new Group MCP", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "mcp" ], "summary": "Create Group MCP", "parameters": [ { "type": "string", "description": "Group ID", "name": "group", "in": "path", "required": true }, { "description": "Group MCP object", "name": "mcp", "in": "body", "required": true, "schema": { "$ref": "#/definitions/model.GroupMCP" } } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/middleware.APIResponse" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/controller.GroupMCPResponse" } } } ] } } } } }, "/api/mcp/group/{group}/{id}": { "get": { "security": [ { "ApiKeyAuth": [] } ], "description": "Get a specific Group MCP by its ID and Group ID", "produces": [ "application/json" ], "tags": [ "mcp" ], "summary": "Get Group MCP by ID", "parameters": [ { "type": "string", "description": "MCP ID", "name": "id", "in": "path", "required": true }, { "type": "string", "description": "Group ID", "name": "group", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/middleware.APIResponse" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/controller.GroupMCPResponse" } } } ] } } } }, "put": { "security": [ { "ApiKeyAuth": [] } ], "description": "Update an existing Group MCP", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "mcp" ], "summary": "Update Group MCP", "parameters": [ { "type": "string", "description": "MCP ID", "name": "id", "in": "path", "required": true }, { "type": "string", "description": "Group ID", "name": "group", "in": "path", "required": true }, { "description": "Group MCP object", "name": "mcp", "in": "body", "required": true, "schema": { "$ref": "#/definitions/model.GroupMCP" } } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/middleware.APIResponse" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/controller.GroupMCPResponse" } } } ] } } } }, "delete": { "security": [ { "ApiKeyAuth": [] } ], "description": "Delete a Group MCP by ID and Group ID", "produces": [ "application/json" ], "tags": [ "mcp" ], "summary": "Delete Group MCP", "parameters": [ { "type": "string", "description": "MCP ID", "name": "id", "in": "path", "required": true }, { "type": "string", "description": "Group ID", "name": "group", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/middleware.APIResponse" } } } } }, "/api/mcp/group/{group}/{id}/status": { "post": { "security": [ { "ApiKeyAuth": [] } ], "description": "Update the status of a Group MCP", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "mcp" ], "summary": "Update Group MCP status", "parameters": [ { "type": "string", "description": "MCP ID", "name": "id", "in": "path", "required": true }, { "type": "string", "description": "Group ID", "name": "group", "in": "path", "required": true }, { "description": "MCP status", "name": "status", "in": "body", "required": true, "schema": { "$ref": "#/definitions/controller.UpdateGroupMCPStatusRequest" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/middleware.APIResponse" } } } } }, "/api/mcp/public/": { "post": { "security": [ { "ApiKeyAuth": [] } ], "description": "Create a new MCP", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "mcp" ], "summary": "Create MCP", "parameters": [ { "description": "MCP object", "name": "mcp", "in": "body", "required": true, "schema": { "$ref": "#/definitions/model.PublicMCP" } } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/middleware.APIResponse" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/controller.PublicMCPResponse" } } } ] } } } } }, "/api/mcp/public/{id}": { "get": { "security": [ { "ApiKeyAuth": [] } ], "description": "Get a specific MCP by its ID", "produces": [ "application/json" ], "tags": [ "mcp" ], "summary": "Get MCP by ID", "parameters": [ { "type": "string", "description": "MCP ID", "name": "id", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/middleware.APIResponse" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/controller.PublicMCPResponse" } } } ] } } } }, "put": { "security": [ { "ApiKeyAuth": [] } ], "description": "Save a MCP", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "mcp" ], "summary": "Save MCP", "parameters": [ { "type": "string", "description": "MCP ID", "name": "id", "in": "path", "required": true }, { "description": "MCP object", "name": "mcp", "in": "body", "required": true, "schema": { "$ref": "#/definitions/model.PublicMCP" } } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/middleware.APIResponse" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/controller.PublicMCPResponse" } } } ] } } } }, "post": { "security": [ { "ApiKeyAuth": [] } ], "description": "Update an existing MCP", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "mcp" ], "summary": "Update MCP", "parameters": [ { "type": "string", "description": "MCP ID", "name": "id", "in": "path", "required": true }, { "description": "MCP object", "name": "mcp", "in": "body", "required": true, "schema": { "$ref": "#/definitions/model.PublicMCP" } } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/middleware.APIResponse" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/controller.PublicMCPResponse" } } } ] } } } }, "delete": { "security": [ { "ApiKeyAuth": [] } ], "description": "Delete an MCP by ID", "produces": [ "application/json" ], "tags": [ "mcp" ], "summary": "Delete MCP", "parameters": [ { "type": "string", "description": "MCP ID", "name": "id", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/middleware.APIResponse" } } } } }, "/api/mcp/public/{id}/group/{group}/params": { "get": { "security": [ { "ApiKeyAuth": [] } ], "description": "Get reusing parameters for a specific group and MCP", "produces": [ "application/json" ], "tags": [ "mcp" ], "summary": "Get group MCP reusing parameters", "parameters": [ { "type": "string", "description": "MCP ID", "name": "id", "in": "path", "required": true }, { "type": "string", "description": "Group ID", "name": "group", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/middleware.APIResponse" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/model.PublicMCPReusingParam" } } } ] } } } }, "post": { "security": [ { "ApiKeyAuth": [] } ], "description": "Create or update reusing parameters for a specific group and MCP", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "mcp" ], "summary": "Create or update group MCP reusing parameters", "parameters": [ { "type": "string", "description": "MCP ID", "name": "id", "in": "path", "required": true }, { "type": "string", "description": "Group ID", "name": "group", "in": "path", "required": true }, { "description": "Reusing parameters", "name": "params", "in": "body", "required": true, "schema": { "$ref": "#/definitions/model.PublicMCPReusingParam" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/middleware.APIResponse" } } } } }, "/api/mcp/public/{id}/status": { "post": { "security": [ { "ApiKeyAuth": [] } ], "description": "Update the status of an MCP", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "mcp" ], "summary": "Update MCP status", "parameters": [ { "type": "string", "description": "MCP ID", "name": "id", "in": "path", "required": true }, { "description": "MCP status", "name": "status", "in": "body", "required": true, "schema": { "$ref": "#/definitions/controller.UpdatePublicMCPStatusRequest" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/middleware.APIResponse" } } } } }, "/api/mcp/publics/": { "get": { "security": [ { "ApiKeyAuth": [] } ], "description": "Get a list of MCPs with pagination and filtering", "produces": [ "application/json" ], "tags": [ "mcp" ], "summary": "Get MCPs", "parameters": [ { "type": "integer", "description": "Page number", "name": "page", "in": "query" }, { "type": "integer", "description": "Items per page", "name": "per_page", "in": "query" }, { "type": "string", "description": "hosted or local", "name": "type", "in": "query" }, { "type": "string", "description": "MCP id", "name": "id", "in": "query" }, { "type": "string", "description": "Search keyword", "name": "keyword", "in": "query" }, { "type": "integer", "description": "MCP status", "name": "status", "in": "query" } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/middleware.APIResponse" }, { "type": "object", "properties": { "data": { "type": "array", "items": { "$ref": "#/definitions/controller.PublicMCPResponse" } } } } ] } } } }, "post": { "security": [ { "ApiKeyAuth": [] } ], "description": "Save a list of MCPs", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "mcp" ], "summary": "Save MCPs", "parameters": [ { "description": "MCP object", "name": "mcp", "in": "body", "required": true, "schema": { "type": "array", "items": { "$ref": "#/definitions/model.PublicMCP" } } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/middleware.APIResponse" } } } } }, "/api/mcp/publics/all": { "get": { "security": [ { "ApiKeyAuth": [] } ], "description": "Get all MCPs with filtering", "produces": [ "application/json" ], "tags": [ "mcp" ], "summary": "Get all MCPs", "parameters": [ { "type": "integer", "description": "MCP status", "name": "status", "in": "query" } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/middleware.APIResponse" }, { "type": "object", "properties": { "data": { "type": "array", "items": { "$ref": "#/definitions/controller.PublicMCPResponse" } } } } ] } } } } }, "/api/model_config/{model}": { "get": { "security": [ { "ApiKeyAuth": [] } ], "description": "Returns a model config", "produces": [ "application/json" ], "tags": [ "modelconfig" ], "summary": "Get model config", "parameters": [ { "type": "string", "description": "Model name", "name": "model", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/middleware.APIResponse" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/model.ModelConfig" } } } ] } } } }, "post": { "security": [ { "ApiKeyAuth": [] } ], "description": "Saves a model config", "produces": [ "application/json" ], "tags": [ "modelconfig" ], "summary": "Save model config", "parameters": [ { "description": "Model config", "name": "config", "in": "body", "required": true, "schema": { "$ref": "#/definitions/controller.SaveModelConfigsRequest" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/middleware.APIResponse" } } } }, "delete": { "security": [ { "ApiKeyAuth": [] } ], "description": "Deletes a model config", "produces": [ "application/json" ], "tags": [ "modelconfig" ], "summary": "Delete model config", "parameters": [ { "type": "string", "description": "Model name", "name": "model", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/middleware.APIResponse" } } } } }, "/api/model_configs/": { "get": { "security": [ { "ApiKeyAuth": [] } ], "description": "Returns a list of model configs with pagination", "produces": [ "application/json" ], "tags": [ "modelconfig" ], "summary": "Get model configs", "parameters": [ { "type": "string", "description": "Model name", "name": "model", "in": "query" } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/middleware.APIResponse" }, { "type": "object", "properties": { "data": { "type": "object", "additionalProperties": { "allOf": [ {}, { "type": "object", "properties": { "configs": { "type": "array", "items": { "$ref": "#/definitions/model.ModelConfig" } }, "total": { "type": "integer" } } } ] } } } } ] } } } }, "post": { "security": [ { "ApiKeyAuth": [] } ], "description": "Saves a list of model configs", "produces": [ "application/json" ], "tags": [ "modelconfig" ], "summary": "Save model configs", "parameters": [ { "description": "Model configs", "name": "configs", "in": "body", "required": true, "schema": { "type": "array", "items": { "$ref": "#/definitions/controller.SaveModelConfigsRequest" } } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/middleware.APIResponse" } } } } }, "/api/model_configs/all": { "get": { "security": [ { "ApiKeyAuth": [] } ], "description": "Returns a list of all model configs", "produces": [ "application/json" ], "tags": [ "modelconfig" ], "summary": "Get all model configs", "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/middleware.APIResponse" }, { "type": "object", "properties": { "data": { "type": "array", "items": { "$ref": "#/definitions/model.ModelConfig" } } } } ] } } } } }, "/api/model_configs/batch_delete": { "post": { "security": [ { "ApiKeyAuth": [] } ], "description": "Deletes a list of model configs", "produces": [ "application/json" ], "tags": [ "modelconfig" ], "summary": "Delete model configs", "parameters": [ { "description": "Model names", "name": "models", "in": "body", "required": true, "schema": { "type": "array", "items": { "type": "string" } } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/middleware.APIResponse" } } } } }, "/api/model_configs/contains": { "post": { "security": [ { "ApiKeyAuth": [] } ], "description": "Returns a list of model configs by models contains", "produces": [ "application/json" ], "tags": [ "modelconfig" ], "summary": "Get model configs by models contains", "parameters": [ { "description": "Models", "name": "models", "in": "body", "required": true, "schema": { "$ref": "#/definitions/controller.GetModelConfigsByModelsContainsRequest" } } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/middleware.APIResponse" }, { "type": "object", "properties": { "data": { "type": "array", "items": { "$ref": "#/definitions/model.ModelConfig" } } } } ] } } } } }, "/api/model_configs/search": { "get": { "security": [ { "ApiKeyAuth": [] } ], "description": "Returns a list of model configs by keyword", "produces": [ "application/json" ], "tags": [ "modelconfig" ], "summary": "Search model configs", "parameters": [ { "type": "string", "description": "Keyword", "name": "keyword", "in": "query" }, { "type": "string", "description": "Model name", "name": "model", "in": "query" }, { "type": "string", "description": "Owner", "name": "owner", "in": "query" }, { "type": "integer", "description": "Page", "name": "page", "in": "query" }, { "type": "integer", "description": "Per page", "name": "per_page", "in": "query" } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/middleware.APIResponse" }, { "type": "object", "properties": { "data": { "type": "object", "additionalProperties": { "allOf": [ {}, { "type": "object", "properties": { "configs": { "type": "array", "items": { "$ref": "#/definitions/model.ModelConfig" } }, "total": { "type": "integer" } } } ] } } } } ] } } } } }, "/api/models/builtin": { "get": { "security": [ { "ApiKeyAuth": [] } ], "description": "Returns a list of builtin models", "produces": [ "application/json" ], "tags": [ "model" ], "summary": "Get builtin models", "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/middleware.APIResponse" }, { "type": "object", "properties": { "data": { "type": "array", "items": { "$ref": "#/definitions/controller.BuiltinModelConfig" } } } } ] } } } } }, "/api/models/builtin/channel": { "get": { "security": [ { "ApiKeyAuth": [] } ], "description": "Returns a list of channel builtin models", "produces": [ "application/json" ], "tags": [ "model" ], "summary": "Get channel builtin models", "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/middleware.APIResponse" }, { "type": "object", "properties": { "data": { "type": "object", "additionalProperties": { "type": "array", "items": { "$ref": "#/definitions/controller.BuiltinModelConfig" } } } } } ] } } } } }, "/api/models/builtin/channel/{type}": { "get": { "security": [ { "ApiKeyAuth": [] } ], "description": "Returns a list of channel builtin models by type", "produces": [ "application/json" ], "tags": [ "model" ], "summary": "Get channel builtin models by type", "parameters": [ { "enum": [ 1, 3, 4, 12, 13, 14, 15, 16, 17, 18, 19, 20, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52 ], "type": "integer", "description": "Channel type", "name": "type", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/middleware.APIResponse" }, { "type": "object", "properties": { "data": { "type": "array", "items": { "$ref": "#/definitions/controller.BuiltinModelConfig" } } } } ] } } } } }, "/api/models/default": { "get": { "security": [ { "ApiKeyAuth": [] } ], "description": "Returns a list of channel default models and mapping", "produces": [ "application/json" ], "tags": [ "model" ], "summary": "Get channel default models and mapping", "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/middleware.APIResponse" }, { "type": "object", "properties": { "data": { "type": "object", "additionalProperties": { "allOf": [ {}, { "type": "object", "properties": { "mapping": { "type": "object", "additionalProperties": { "type": "string" } }, "models": { "type": "array", "items": { "type": "string" } } } } ] } } } } ] } } } } }, "/api/models/default/{type}": { "get": { "security": [ { "ApiKeyAuth": [] } ], "description": "Returns a list of channel default models and mapping by type", "produces": [ "application/json" ], "tags": [ "model" ], "summary": "Get channel default models and mapping by type", "parameters": [ { "type": "string", "description": "Channel type", "name": "type", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/middleware.APIResponse" }, { "type": "object", "properties": { "data": { "type": "object", "additionalProperties": { "allOf": [ {}, { "type": "object", "properties": { "mapping": { "type": "object", "additionalProperties": { "type": "string" } }, "models": { "type": "array", "items": { "type": "string" } } } } ] } } } } ] } } } } }, "/api/models/enabled": { "get": { "security": [ { "ApiKeyAuth": [] } ], "description": "Returns a list of enabled models", "produces": [ "application/json" ], "tags": [ "model" ], "summary": "Get enabled models", "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/middleware.APIResponse" }, { "type": "object", "properties": { "data": { "type": "object", "additionalProperties": { "type": "array", "items": { "$ref": "#/definitions/model.ModelConfig" } } } } } ] } } } } }, "/api/models/enabled/{set}": { "get": { "security": [ { "ApiKeyAuth": [] } ], "description": "Returns a list of enabled models by set", "produces": [ "application/json" ], "tags": [ "model" ], "summary": "Get enabled models by set", "parameters": [ { "type": "string", "description": "Models set", "name": "set", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/middleware.APIResponse" }, { "type": "object", "properties": { "data": { "type": "array", "items": { "$ref": "#/definitions/model.ModelConfig" } } } } ] } } } } }, "/api/models/sets": { "get": { "security": [ { "ApiKeyAuth": [] } ], "description": "Returns a list of enabled models and channels sets", "produces": [ "application/json" ], "tags": [ "model" ], "summary": "Get enabled models and channels sets", "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/middleware.APIResponse" }, { "type": "object", "properties": { "data": { "type": "object", "additionalProperties": { "type": "object", "additionalProperties": { "type": "array", "items": { "$ref": "#/definitions/controller.EnabledModelChannel" } } } } } } ] } } } } }, "/api/monitor/": { "get": { "security": [ { "ApiKeyAuth": [] } ], "description": "Returns a list of all channel model error rates", "produces": [ "application/json" ], "tags": [ "monitor" ], "summary": "Get all channel model error rates", "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/middleware.APIResponse" }, { "type": "object", "properties": { "data": { "type": "object", "additionalProperties": { "type": "object", "additionalProperties": { "type": "number", "format": "float64" } } } } } ] } } } }, "delete": { "security": [ { "ApiKeyAuth": [] } ], "description": "Clears all model errors", "produces": [ "application/json" ], "tags": [ "monitor" ], "summary": "Clear all model errors", "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/middleware.APIResponse" } } } } }, "/api/monitor/banned_channels": { "get": { "security": [ { "ApiKeyAuth": [] } ], "description": "Returns a list of all banned model channels", "produces": [ "application/json" ], "tags": [ "monitor" ], "summary": "Get all banned model channels", "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/middleware.APIResponse" }, { "type": "object", "properties": { "data": { "type": "object", "additionalProperties": { "type": "array", "items": { "type": "integer", "format": "int64" } } } } } ] } } } } }, "/api/monitor/models": { "get": { "security": [ { "ApiKeyAuth": [] } ], "description": "Returns a list of models error rate", "produces": [ "application/json" ], "tags": [ "monitor" ], "summary": "Get models error rate", "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/middleware.APIResponse" }, { "type": "object", "properties": { "data": { "type": "object", "additionalProperties": { "type": "number", "format": "float64" } } } } ] } } } } }, "/api/monitor/{id}": { "get": { "security": [ { "ApiKeyAuth": [] } ], "description": "Returns a list of channel model error rates", "produces": [ "application/json" ], "tags": [ "monitor" ], "summary": "Get channel model error rates", "parameters": [ { "type": "integer", "description": "Channel ID", "name": "id", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/middleware.APIResponse" }, { "type": "object", "properties": { "data": { "type": "array", "items": { "type": "object", "additionalProperties": { "type": "number", "format": "float64" } } } } } ] } } } }, "delete": { "security": [ { "ApiKeyAuth": [] } ], "description": "Clears all model errors for a specific channel", "produces": [ "application/json" ], "tags": [ "monitor" ], "summary": "Clear channel all model errors", "parameters": [ { "type": "integer", "description": "Channel ID", "name": "id", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/middleware.APIResponse" } } } } }, "/api/monitor/{id}/{model}": { "delete": { "security": [ { "ApiKeyAuth": [] } ], "description": "Clears model errors for a specific channel and model", "produces": [ "application/json" ], "tags": [ "monitor" ], "summary": "Clear channel model errors", "parameters": [ { "type": "integer", "description": "Channel ID", "name": "id", "in": "path", "required": true }, { "type": "string", "description": "Model name", "name": "model", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/middleware.APIResponse" } } } } }, "/api/option/": { "get": { "security": [ { "ApiKeyAuth": [] } ], "description": "Returns a list of options", "produces": [ "application/json" ], "tags": [ "option" ], "summary": "Get options", "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/middleware.APIResponse" }, { "type": "object", "properties": { "data": { "type": "object", "additionalProperties": { "type": "string" } } } } ] } } } }, "put": { "security": [ { "ApiKeyAuth": [] } ], "description": "Updates a single option", "produces": [ "application/json" ], "tags": [ "option" ], "summary": "Update option", "parameters": [ { "description": "Option value", "name": "value", "in": "body", "required": true, "schema": { "$ref": "#/definitions/model.Option" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/middleware.APIResponse" } } } }, "post": { "security": [ { "ApiKeyAuth": [] } ], "description": "Updates a single option", "produces": [ "application/json" ], "tags": [ "option" ], "summary": "Update option", "parameters": [ { "description": "Option value", "name": "value", "in": "body", "required": true, "schema": { "$ref": "#/definitions/model.Option" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/middleware.APIResponse" } } } } }, "/api/option/batch": { "post": { "security": [ { "ApiKeyAuth": [] } ], "description": "Updates multiple options", "produces": [ "application/json" ], "tags": [ "option" ], "summary": "Update options", "parameters": [ { "description": "Options", "name": "options", "in": "body", "required": true, "schema": { "type": "object", "additionalProperties": { "type": "string" } } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/middleware.APIResponse" } } } } }, "/api/option/{key}": { "get": { "security": [ { "ApiKeyAuth": [] } ], "description": "Returns a single option", "produces": [ "application/json" ], "tags": [ "option" ], "summary": "Get option", "parameters": [ { "type": "string", "description": "Option key", "name": "key", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/middleware.APIResponse" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/model.Option" } } } ] } } } }, "put": { "security": [ { "ApiKeyAuth": [] } ], "description": "Updates a single option by key", "produces": [ "application/json" ], "tags": [ "option" ], "summary": "Update option by key", "parameters": [ { "type": "string", "description": "Option key", "name": "key", "in": "path", "required": true }, { "description": "Option value", "name": "value", "in": "body", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/middleware.APIResponse" } } } } }, "/api/status": { "get": { "description": "Returns the status of the server", "produces": [ "application/json" ], "tags": [ "misc" ], "summary": "Get status", "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/middleware.APIResponse" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/controller.StatusData" } } } ] } } } } }, "/api/test-embedmcp/{id}": { "get": { "security": [ { "ApiKeyAuth": [] } ], "description": "Test Embed MCP Streamable Server with various HTTP methods", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "embedmcp" ], "summary": "Test Embed MCP Streamable Server", "parameters": [ { "type": "string", "description": "MCP ID", "name": "id", "in": "path", "required": true }, { "type": "string", "description": "Initial configuration parameters (e.g. config[host]=http://localhost:3000)", "name": "config[key]", "in": "query" }, { "type": "string", "description": "Reusing configuration parameters (e.g., reusing[authorization]=apikey)", "name": "reusing[key]", "in": "query" } ], "responses": { "200": { "description": "OK" }, "400": { "description": "Bad Request" } } }, "post": { "security": [ { "ApiKeyAuth": [] } ], "description": "Test Embed MCP Streamable Server with various HTTP methods", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "embedmcp" ], "summary": "Test Embed MCP Streamable Server", "parameters": [ { "type": "string", "description": "MCP ID", "name": "id", "in": "path", "required": true }, { "type": "string", "description": "Initial configuration parameters (e.g. config[host]=http://localhost:3000)", "name": "config[key]", "in": "query" }, { "type": "string", "description": "Reusing configuration parameters (e.g., reusing[authorization]=apikey)", "name": "reusing[key]", "in": "query" } ], "responses": { "200": { "description": "OK" }, "400": { "description": "Bad Request" } } }, "delete": { "security": [ { "ApiKeyAuth": [] } ], "description": "Test Embed MCP Streamable Server with various HTTP methods", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "embedmcp" ], "summary": "Test Embed MCP Streamable Server", "parameters": [ { "type": "string", "description": "MCP ID", "name": "id", "in": "path", "required": true }, { "type": "string", "description": "Initial configuration parameters (e.g. config[host]=http://localhost:3000)", "name": "config[key]", "in": "query" }, { "type": "string", "description": "Reusing configuration parameters (e.g., reusing[authorization]=apikey)", "name": "reusing[key]", "in": "query" } ], "responses": { "200": { "description": "OK" }, "400": { "description": "Bad Request" } } } }, "/api/test-embedmcp/{id}/sse": { "get": { "security": [ { "ApiKeyAuth": [] } ], "description": "Test Embed MCP SSE Server", "tags": [ "embedmcp" ], "summary": "Test Embed MCP SSE Server", "parameters": [ { "type": "string", "description": "MCP ID", "name": "id", "in": "path", "required": true }, { "type": "string", "description": "Initial configuration parameters (e.g. config[host]=http://localhost:3000)", "name": "config[key]", "in": "query" }, { "type": "string", "description": "Reusing configuration parameters (e.g. reusing[authorization]=apikey)", "name": "reusing[key]", "in": "query" } ], "responses": { "200": { "description": "OK" }, "400": { "description": "Bad Request" } } } }, "/api/test-publicmcp/{group}/{id}/sse": { "get": { "security": [ { "ApiKeyAuth": [] } ], "summary": "Test Public MCP SSE Server", "parameters": [ { "type": "string", "description": "Group ID", "name": "group", "in": "path", "required": true }, { "type": "string", "description": "MCP ID", "name": "id", "in": "path", "required": true } ], "responses": {} } }, "/api/token/{group}": { "post": { "security": [ { "ApiKeyAuth": [] } ], "description": "Adds a new token to a specific group", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "token" ], "summary": "Add group token", "parameters": [ { "type": "string", "description": "Group name", "name": "group", "in": "path", "required": true }, { "type": "boolean", "description": "Auto create group", "name": "auto_create_group", "in": "query" }, { "type": "boolean", "description": "Ignore exist", "name": "ignore_exist", "in": "query" }, { "description": "Token information", "name": "token", "in": "body", "required": true, "schema": { "$ref": "#/definitions/controller.AddTokenRequest" } } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/middleware.APIResponse" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/controller.TokenResponse" } } } ] } } } } }, "/api/token/{group}/batch_delete": { "post": { "security": [ { "ApiKeyAuth": [] } ], "description": "Deletes multiple tokens from a specific group", "produces": [ "application/json" ], "tags": [ "token" ], "summary": "Delete group tokens", "parameters": [ { "type": "string", "description": "Group name", "name": "group", "in": "path", "required": true }, { "description": "Token IDs", "name": "ids", "in": "body", "required": true, "schema": { "type": "array", "items": { "type": "integer" } } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/middleware.APIResponse" } } } } }, "/api/token/{group}/search": { "get": { "security": [ { "ApiKeyAuth": [] } ], "description": "Returns a paginated list of tokens for a specific group based on search criteria", "produces": [ "application/json" ], "tags": [ "token" ], "summary": "Search tokens for a specific group", "parameters": [ { "type": "string", "description": "Group name", "name": "group", "in": "path", "required": true }, { "type": "string", "description": "Keyword", "name": "keyword", "in": "query" }, { "type": "integer", "description": "Page number", "name": "page", "in": "query" }, { "type": "integer", "description": "Items per page", "name": "per_page", "in": "query" }, { "type": "string", "description": "Order", "name": "order", "in": "query" }, { "type": "string", "description": "Name", "name": "name", "in": "query" }, { "type": "string", "description": "Key", "name": "key", "in": "query" }, { "type": "integer", "description": "Status", "name": "status", "in": "query" } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/middleware.APIResponse" }, { "type": "object", "properties": { "data": { "type": "object", "additionalProperties": { "allOf": [ {}, { "type": "object", "properties": { "tokens": { "type": "array", "items": { "$ref": "#/definitions/controller.TokenResponse" } }, "total": { "type": "integer" } } } ] } } } } ] } } } } }, "/api/token/{group}/{id}": { "get": { "security": [ { "ApiKeyAuth": [] } ], "description": "Returns detailed information about a specific token for a specific group", "produces": [ "application/json" ], "tags": [ "token" ], "summary": "Get token by ID for a specific group", "parameters": [ { "type": "string", "description": "Group name", "name": "group", "in": "path", "required": true }, { "type": "integer", "description": "Token ID", "name": "id", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/middleware.APIResponse" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/controller.TokenResponse" } } } ] } } } }, "put": { "security": [ { "ApiKeyAuth": [] } ], "description": "Updates an existing token in a specific group", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "token" ], "summary": "Update group token", "parameters": [ { "type": "string", "description": "Group name", "name": "group", "in": "path", "required": true }, { "type": "integer", "description": "Token ID", "name": "id", "in": "path", "required": true }, { "description": "Updated token information", "name": "token", "in": "body", "required": true, "schema": { "$ref": "#/definitions/model.UpdateTokenRequest" } } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/middleware.APIResponse" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/controller.TokenResponse" } } } ] } } } }, "delete": { "security": [ { "ApiKeyAuth": [] } ], "description": "Deletes a specific token from a group", "produces": [ "application/json" ], "tags": [ "token" ], "summary": "Delete group token", "parameters": [ { "type": "string", "description": "Group name", "name": "group", "in": "path", "required": true }, { "type": "integer", "description": "Token ID", "name": "id", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/middleware.APIResponse" } } } } }, "/api/token/{group}/{id}/name": { "post": { "security": [ { "ApiKeyAuth": [] } ], "description": "Updates the name of a token in a specific group", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "token" ], "summary": "Update group token name", "parameters": [ { "type": "string", "description": "Group name", "name": "group", "in": "path", "required": true }, { "type": "integer", "description": "Token ID", "name": "id", "in": "path", "required": true }, { "description": "Name information", "name": "name", "in": "body", "required": true, "schema": { "$ref": "#/definitions/controller.UpdateTokenNameRequest" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/middleware.APIResponse" } } } } }, "/api/token/{group}/{id}/status": { "post": { "security": [ { "ApiKeyAuth": [] } ], "description": "Updates the status of a token in a specific group", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "token" ], "summary": "Update group token status", "parameters": [ { "type": "string", "description": "Group name", "name": "group", "in": "path", "required": true }, { "type": "integer", "description": "Token ID", "name": "id", "in": "path", "required": true }, { "description": "Status information", "name": "status", "in": "body", "required": true, "schema": { "$ref": "#/definitions/controller.UpdateTokenStatusRequest" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/middleware.APIResponse" } } } } }, "/api/tokens/": { "get": { "security": [ { "ApiKeyAuth": [] } ], "description": "Returns a paginated list of all tokens", "produces": [ "application/json" ], "tags": [ "tokens" ], "summary": "Get all tokens", "parameters": [ { "type": "integer", "description": "Page number", "name": "page", "in": "query" }, { "type": "integer", "description": "Items per page", "name": "per_page", "in": "query" }, { "type": "string", "description": "Group name", "name": "group", "in": "query" }, { "type": "string", "description": "Order", "name": "order", "in": "query" }, { "type": "integer", "description": "Status", "name": "status", "in": "query" } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/middleware.APIResponse" }, { "type": "object", "properties": { "data": { "type": "object", "additionalProperties": { "allOf": [ {}, { "type": "object", "properties": { "tokens": { "type": "array", "items": { "$ref": "#/definitions/controller.TokenResponse" } }, "total": { "type": "integer" } } } ] } } } } ] } } } } }, "/api/tokens/batch_delete": { "post": { "security": [ { "ApiKeyAuth": [] } ], "description": "Deletes multiple tokens by their IDs", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "tokens" ], "summary": "Delete multiple tokens", "parameters": [ { "description": "Token IDs", "name": "ids", "in": "body", "required": true, "schema": { "type": "array", "items": { "type": "integer" } } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/middleware.APIResponse" } } } } }, "/api/tokens/search": { "get": { "security": [ { "ApiKeyAuth": [] } ], "description": "Returns a paginated list of tokens based on search criteria", "produces": [ "application/json" ], "tags": [ "tokens" ], "summary": "Search tokens", "parameters": [ { "type": "string", "description": "Keyword", "name": "keyword", "in": "query" }, { "type": "integer", "description": "Page number", "name": "page", "in": "query" }, { "type": "integer", "description": "Items per page", "name": "per_page", "in": "query" }, { "type": "string", "description": "Order", "name": "order", "in": "query" }, { "type": "string", "description": "Name", "name": "name", "in": "query" }, { "type": "string", "description": "Key", "name": "key", "in": "query" }, { "type": "integer", "description": "Status", "name": "status", "in": "query" }, { "type": "string", "description": "Group", "name": "group", "in": "query" } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/middleware.APIResponse" }, { "type": "object", "properties": { "data": { "type": "object", "additionalProperties": { "allOf": [ {}, { "type": "object", "properties": { "tokens": { "type": "array", "items": { "$ref": "#/definitions/controller.TokenResponse" } }, "total": { "type": "integer" } } } ] } } } } ] } } } } }, "/api/tokens/{group}": { "get": { "security": [ { "ApiKeyAuth": [] } ], "description": "Returns a paginated list of all tokens for a specific group", "produces": [ "application/json" ], "tags": [ "tokens" ], "summary": "Get all tokens for a specific group", "parameters": [ { "type": "string", "description": "Group name", "name": "group", "in": "path", "required": true }, { "type": "integer", "description": "Page number", "name": "page", "in": "query" }, { "type": "integer", "description": "Items per page", "name": "per_page", "in": "query" }, { "type": "string", "description": "Order", "name": "order", "in": "query" }, { "type": "integer", "description": "Status", "name": "status", "in": "query" } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/middleware.APIResponse" }, { "type": "object", "properties": { "data": { "type": "object", "additionalProperties": { "allOf": [ {}, { "type": "object", "properties": { "tokens": { "type": "array", "items": { "$ref": "#/definitions/controller.TokenResponse" } }, "total": { "type": "integer" } } } ] } } } } ] } } } } }, "/api/tokens/{id}": { "get": { "security": [ { "ApiKeyAuth": [] } ], "description": "Returns detailed information about a specific token", "produces": [ "application/json" ], "tags": [ "tokens" ], "summary": "Get token by ID", "parameters": [ { "type": "integer", "description": "Token ID", "name": "id", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/middleware.APIResponse" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/controller.TokenResponse" } } } ] } } } }, "put": { "security": [ { "ApiKeyAuth": [] } ], "description": "Updates an existing token's information", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "tokens" ], "summary": "Update token", "parameters": [ { "type": "integer", "description": "Token ID", "name": "id", "in": "path", "required": true }, { "description": "Updated token information", "name": "token", "in": "body", "required": true, "schema": { "$ref": "#/definitions/model.UpdateTokenRequest" } } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/middleware.APIResponse" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/controller.TokenResponse" } } } ] } } } }, "delete": { "security": [ { "ApiKeyAuth": [] } ], "description": "Deletes a specific token by ID", "produces": [ "application/json" ], "tags": [ "tokens" ], "summary": "Delete token", "parameters": [ { "type": "integer", "description": "Token ID", "name": "id", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/middleware.APIResponse" } } } } }, "/api/tokens/{id}/name": { "post": { "security": [ { "ApiKeyAuth": [] } ], "description": "Updates the name of a specific token", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "tokens" ], "summary": "Update token name", "parameters": [ { "type": "integer", "description": "Token ID", "name": "id", "in": "path", "required": true }, { "description": "Name information", "name": "name", "in": "body", "required": true, "schema": { "$ref": "#/definitions/controller.UpdateTokenNameRequest" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/middleware.APIResponse" } } } } }, "/api/tokens/{id}/status": { "post": { "security": [ { "ApiKeyAuth": [] } ], "description": "Updates the status of a specific token", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "tokens" ], "summary": "Update token status", "parameters": [ { "type": "integer", "description": "Token ID", "name": "id", "in": "path", "required": true }, { "description": "Status information", "name": "status", "in": "body", "required": true, "schema": { "$ref": "#/definitions/controller.UpdateTokenStatusRequest" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/middleware.APIResponse" } } } } }, "/mcp": { "get": { "security": [ { "ApiKeyAuth": [] } ], "summary": "Host MCP Streamable Server", "responses": {} }, "post": { "security": [ { "ApiKeyAuth": [] } ], "summary": "Host MCP Streamable Server", "responses": {} }, "delete": { "security": [ { "ApiKeyAuth": [] } ], "summary": "Host MCP Streamable Server", "responses": {} } }, "/mcp/group/{id}": { "get": { "security": [ { "ApiKeyAuth": [] } ], "summary": "Group MCP Streamable Server", "responses": {} }, "post": { "security": [ { "ApiKeyAuth": [] } ], "summary": "Group MCP Streamable Server", "responses": {} }, "delete": { "security": [ { "ApiKeyAuth": [] } ], "summary": "Group MCP Streamable Server", "responses": {} } }, "/mcp/group/{id}/sse": { "get": { "security": [ { "ApiKeyAuth": [] } ], "summary": "Group MCP SSE Server", "responses": {} } }, "/mcp/public/{id}": { "get": { "security": [ { "ApiKeyAuth": [] } ], "summary": "Public MCP Streamable Server", "responses": {} }, "post": { "security": [ { "ApiKeyAuth": [] } ], "summary": "Public MCP Streamable Server", "responses": {} }, "delete": { "security": [ { "ApiKeyAuth": [] } ], "summary": "Public MCP Streamable Server", "responses": {} } }, "/mcp/public/{id}/sse": { "get": { "security": [ { "ApiKeyAuth": [] } ], "summary": "Public MCP SSE Server", "responses": {} } }, "/message": { "post": { "summary": "MCP SSE Message", "responses": {} } }, "/sse": { "get": { "security": [ { "ApiKeyAuth": [] } ], "summary": "Public MCP SSE Server", "responses": {} } }, "/v1/audio/speech": { "post": { "security": [ { "ApiKeyAuth": [] } ], "description": "AudioSpeech", "produces": [ "application/json" ], "tags": [ "relay" ], "summary": "AudioSpeech", "parameters": [ { "description": "Request", "name": "request", "in": "body", "required": true, "schema": { "$ref": "#/definitions/model.TextToSpeechRequest" } }, { "type": "string", "description": "Optional Aiproxy-Channel header", "name": "Aiproxy-Channel", "in": "header" } ], "responses": { "200": { "description": "audio binary", "schema": { "type": "file" }, "headers": { "X-RateLimit-Limit-Requests": { "type": "integer", "description": "X-RateLimit-Limit-Requests" }, "X-RateLimit-Limit-Tokens": { "type": "integer", "description": "X-RateLimit-Limit-Tokens" }, "X-RateLimit-Remaining-Requests": { "type": "integer", "description": "X-RateLimit-Remaining-Requests" }, "X-RateLimit-Remaining-Tokens": { "type": "integer", "description": "X-RateLimit-Remaining-Tokens" }, "X-RateLimit-Reset-Requests": { "type": "string", "description": "X-RateLimit-Reset-Requests" }, "X-RateLimit-Reset-Tokens": { "type": "string", "description": "X-RateLimit-Reset-Tokens" } } } } } }, "/v1/audio/transcriptions": { "post": { "security": [ { "ApiKeyAuth": [] } ], "description": "AudioTranscription", "produces": [ "application/json" ], "tags": [ "relay" ], "summary": "AudioTranscription", "parameters": [ { "type": "string", "description": "Model", "name": "model", "in": "formData", "required": true }, { "type": "file", "description": "File", "name": "file", "in": "formData", "required": true }, { "type": "string", "description": "Optional Aiproxy-Channel header", "name": "Aiproxy-Channel", "in": "header" } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/model.SttJSONResponse" }, "headers": { "X-RateLimit-Limit-Requests": { "type": "integer", "description": "X-RateLimit-Limit-Requests" }, "X-RateLimit-Limit-Tokens": { "type": "integer", "description": "X-RateLimit-Limit-Tokens" }, "X-RateLimit-Remaining-Requests": { "type": "integer", "description": "X-RateLimit-Remaining-Requests" }, "X-RateLimit-Remaining-Tokens": { "type": "integer", "description": "X-RateLimit-Remaining-Tokens" }, "X-RateLimit-Reset-Requests": { "type": "string", "description": "X-RateLimit-Reset-Requests" }, "X-RateLimit-Reset-Tokens": { "type": "string", "description": "X-RateLimit-Reset-Tokens" } } } } } }, "/v1/audio/translations": { "post": { "security": [ { "ApiKeyAuth": [] } ], "description": "AudioTranslation", "produces": [ "application/json" ], "tags": [ "relay" ], "summary": "AudioTranslation", "parameters": [ { "type": "string", "description": "Model", "name": "model", "in": "formData", "required": true }, { "type": "file", "description": "File", "name": "file", "in": "formData", "required": true }, { "type": "string", "description": "Optional Aiproxy-Channel header", "name": "Aiproxy-Channel", "in": "header" } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/model.SttJSONResponse" }, "headers": { "X-RateLimit-Limit-Requests": { "type": "integer", "description": "X-RateLimit-Limit-Requests" }, "X-RateLimit-Limit-Tokens": { "type": "integer", "description": "X-RateLimit-Limit-Tokens" }, "X-RateLimit-Remaining-Requests": { "type": "integer", "description": "X-RateLimit-Remaining-Requests" }, "X-RateLimit-Remaining-Tokens": { "type": "integer", "description": "X-RateLimit-Remaining-Tokens" }, "X-RateLimit-Reset-Requests": { "type": "string", "description": "X-RateLimit-Reset-Requests" }, "X-RateLimit-Reset-Tokens": { "type": "string", "description": "X-RateLimit-Reset-Tokens" } } } } } }, "/v1/chat/completions": { "post": { "security": [ { "ApiKeyAuth": [] } ], "description": "ChatCompletions", "produces": [ "application/json" ], "tags": [ "relay" ], "summary": "ChatCompletions", "parameters": [ { "description": "Request", "name": "request", "in": "body", "required": true, "schema": { "$ref": "#/definitions/model.GeneralOpenAIRequest" } }, { "type": "string", "description": "Optional Aiproxy-Channel header", "name": "Aiproxy-Channel", "in": "header" } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/model.TextResponse" }, "headers": { "X-RateLimit-Limit-Requests": { "type": "integer", "description": "X-RateLimit-Limit-Requests" }, "X-RateLimit-Limit-Tokens": { "type": "integer", "description": "X-RateLimit-Limit-Tokens" }, "X-RateLimit-Remaining-Requests": { "type": "integer", "description": "X-RateLimit-Remaining-Requests" }, "X-RateLimit-Remaining-Tokens": { "type": "integer", "description": "X-RateLimit-Remaining-Tokens" }, "X-RateLimit-Reset-Requests": { "type": "string", "description": "X-RateLimit-Reset-Requests" }, "X-RateLimit-Reset-Tokens": { "type": "string", "description": "X-RateLimit-Reset-Tokens" } } } } } }, "/v1/completions": { "post": { "security": [ { "ApiKeyAuth": [] } ], "description": "Completions", "produces": [ "application/json" ], "tags": [ "relay" ], "summary": "Completions", "parameters": [ { "description": "Request", "name": "request", "in": "body", "required": true, "schema": { "$ref": "#/definitions/model.GeneralOpenAIRequest" } }, { "type": "string", "description": "Optional Aiproxy-Channel header", "name": "Aiproxy-Channel", "in": "header" } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/model.TextResponse" }, "headers": { "X-RateLimit-Limit-Requests": { "type": "integer", "description": "X-RateLimit-Limit-Requests" }, "X-RateLimit-Limit-Tokens": { "type": "integer", "description": "X-RateLimit-Limit-Tokens" }, "X-RateLimit-Remaining-Requests": { "type": "integer", "description": "X-RateLimit-Remaining-Requests" }, "X-RateLimit-Remaining-Tokens": { "type": "integer", "description": "X-RateLimit-Remaining-Tokens" }, "X-RateLimit-Reset-Requests": { "type": "string", "description": "X-RateLimit-Reset-Requests" }, "X-RateLimit-Reset-Tokens": { "type": "string", "description": "X-RateLimit-Reset-Tokens" } } } } } }, "/v1/dashboard/billing/quota": { "get": { "security": [ { "ApiKeyAuth": [] } ], "description": "Get quota", "produces": [ "application/json" ], "tags": [ "relay" ], "summary": "Get quota", "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/balance.GroupQuota" } } } } }, "/v1/dashboard/billing/subscription": { "get": { "security": [ { "ApiKeyAuth": [] } ], "description": "Get subscription", "produces": [ "application/json" ], "tags": [ "relay" ], "summary": "Get subscription", "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/openai.SubscriptionResponse" } } } } }, "/v1/dashboard/billing/usage": { "get": { "security": [ { "ApiKeyAuth": [] } ], "description": "Get usage", "produces": [ "application/json" ], "tags": [ "relay" ], "summary": "Get usage", "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/openai.UsageResponse" } } } } }, "/v1/embeddings": { "post": { "security": [ { "ApiKeyAuth": [] } ], "description": "Embeddings", "produces": [ "application/json" ], "tags": [ "relay" ], "summary": "Embeddings", "parameters": [ { "description": "Request", "name": "request", "in": "body", "required": true, "schema": { "$ref": "#/definitions/model.EmbeddingRequest" } }, { "type": "string", "description": "Optional Aiproxy-Channel header", "name": "Aiproxy-Channel", "in": "header" } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/model.EmbeddingResponse" }, "headers": { "X-RateLimit-Limit-Requests": { "type": "integer", "description": "X-RateLimit-Limit-Requests" }, "X-RateLimit-Limit-Tokens": { "type": "integer", "description": "X-RateLimit-Limit-Tokens" }, "X-RateLimit-Remaining-Requests": { "type": "integer", "description": "X-RateLimit-Remaining-Requests" }, "X-RateLimit-Remaining-Tokens": { "type": "integer", "description": "X-RateLimit-Remaining-Tokens" }, "X-RateLimit-Reset-Requests": { "type": "string", "description": "X-RateLimit-Reset-Requests" }, "X-RateLimit-Reset-Tokens": { "type": "string", "description": "X-RateLimit-Reset-Tokens" } } } } } }, "/v1/images/edits": { "post": { "security": [ { "ApiKeyAuth": [] } ], "description": "ImagesEdits", "produces": [ "application/json" ], "tags": [ "relay" ], "summary": "ImagesEdits", "parameters": [ { "type": "string", "description": "Prompt", "name": "prompt", "in": "formData", "required": true }, { "type": "string", "description": "Model", "name": "model", "in": "formData", "required": true }, { "type": "file", "description": "Images", "name": "image", "in": "formData", "required": true }, { "type": "string", "description": "Optional Aiproxy-Channel header", "name": "Aiproxy-Channel", "in": "header" } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/model.SttJSONResponse" }, "headers": { "X-RateLimit-Limit-Requests": { "type": "integer", "description": "X-RateLimit-Limit-Requests" }, "X-RateLimit-Limit-Tokens": { "type": "integer", "description": "X-RateLimit-Limit-Tokens" }, "X-RateLimit-Remaining-Requests": { "type": "integer", "description": "X-RateLimit-Remaining-Requests" }, "X-RateLimit-Remaining-Tokens": { "type": "integer", "description": "X-RateLimit-Remaining-Tokens" }, "X-RateLimit-Reset-Requests": { "type": "string", "description": "X-RateLimit-Reset-Requests" }, "X-RateLimit-Reset-Tokens": { "type": "string", "description": "X-RateLimit-Reset-Tokens" } } } } } }, "/v1/images/generations": { "post": { "security": [ { "ApiKeyAuth": [] } ], "description": "ImagesGenerations", "produces": [ "application/json" ], "tags": [ "relay" ], "summary": "ImagesGenerations", "parameters": [ { "description": "Request", "name": "request", "in": "body", "required": true, "schema": { "$ref": "#/definitions/model.ImageRequest" } }, { "type": "string", "description": "Optional Aiproxy-Channel header", "name": "Aiproxy-Channel", "in": "header" } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/model.ImageResponse" }, "headers": { "X-RateLimit-Limit-Requests": { "type": "integer", "description": "X-RateLimit-Limit-Requests" }, "X-RateLimit-Limit-Tokens": { "type": "integer", "description": "X-RateLimit-Limit-Tokens" }, "X-RateLimit-Remaining-Requests": { "type": "integer", "description": "X-RateLimit-Remaining-Requests" }, "X-RateLimit-Remaining-Tokens": { "type": "integer", "description": "X-RateLimit-Remaining-Tokens" }, "X-RateLimit-Reset-Requests": { "type": "string", "description": "X-RateLimit-Reset-Requests" }, "X-RateLimit-Reset-Tokens": { "type": "string", "description": "X-RateLimit-Reset-Tokens" } } } } } }, "/v1/messages": { "post": { "security": [ { "ApiKeyAuth": [] } ], "description": "Anthropic", "produces": [ "application/json" ], "tags": [ "relay" ], "summary": "Anthropic", "parameters": [ { "description": "Request", "name": "request", "in": "body", "required": true, "schema": { "$ref": "#/definitions/model.AnthropicMessageRequest" } }, { "type": "string", "description": "Optional Aiproxy-Channel header", "name": "Aiproxy-Channel", "in": "header" } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/model.TextResponse" }, "headers": { "X-RateLimit-Limit-Requests": { "type": "integer", "description": "X-RateLimit-Limit-Requests" }, "X-RateLimit-Limit-Tokens": { "type": "integer", "description": "X-RateLimit-Limit-Tokens" }, "X-RateLimit-Remaining-Requests": { "type": "integer", "description": "X-RateLimit-Remaining-Requests" }, "X-RateLimit-Remaining-Tokens": { "type": "integer", "description": "X-RateLimit-Remaining-Tokens" }, "X-RateLimit-Reset-Requests": { "type": "string", "description": "X-RateLimit-Reset-Requests" }, "X-RateLimit-Reset-Tokens": { "type": "string", "description": "X-RateLimit-Reset-Tokens" } } } } } }, "/v1/models": { "get": { "security": [ { "ApiKeyAuth": [] } ], "description": "List all models", "produces": [ "application/json" ], "tags": [ "relay" ], "summary": "List models", "responses": { "200": { "description": "OK", "schema": { "type": "object", "properties": { "data": { "type": "array", "items": { "$ref": "#/definitions/controller.OpenAIModels" } }, "object": { "type": "string" } } } } } } }, "/v1/models/{model}": { "get": { "security": [ { "ApiKeyAuth": [] } ], "description": "Retrieve a model", "produces": [ "application/json" ], "tags": [ "relay" ], "summary": "Retrieve model", "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/controller.OpenAIModels" } } } } }, "/v1/parse/pdf": { "post": { "security": [ { "ApiKeyAuth": [] } ], "description": "ParsePdf", "produces": [ "application/json" ], "tags": [ "relay" ], "summary": "ParsePdf", "parameters": [ { "type": "string", "description": "Model", "name": "model", "in": "formData", "required": true }, { "type": "file", "description": "File", "name": "file", "in": "formData", "required": true }, { "type": "string", "description": "Optional Aiproxy-Channel header", "name": "Aiproxy-Channel", "in": "header" } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/model.ParsePdfResponse" }, "headers": { "X-RateLimit-Limit-Requests": { "type": "integer", "description": "X-RateLimit-Limit-Requests" }, "X-RateLimit-Limit-Tokens": { "type": "integer", "description": "X-RateLimit-Limit-Tokens" }, "X-RateLimit-Remaining-Requests": { "type": "integer", "description": "X-RateLimit-Remaining-Requests" }, "X-RateLimit-Remaining-Tokens": { "type": "integer", "description": "X-RateLimit-Remaining-Tokens" }, "X-RateLimit-Reset-Requests": { "type": "string", "description": "X-RateLimit-Reset-Requests" }, "X-RateLimit-Reset-Tokens": { "type": "string", "description": "X-RateLimit-Reset-Tokens" } } } } } }, "/v1/rerank": { "post": { "security": [ { "ApiKeyAuth": [] } ], "description": "Rerank", "produces": [ "application/json" ], "tags": [ "relay" ], "summary": "Rerank", "parameters": [ { "description": "Request", "name": "request", "in": "body", "required": true, "schema": { "$ref": "#/definitions/model.RerankRequest" } }, { "type": "string", "description": "Optional Aiproxy-Channel header", "name": "Aiproxy-Channel", "in": "header" } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/model.RerankResponse" }, "headers": { "X-RateLimit-Limit-Requests": { "type": "integer", "description": "X-RateLimit-Limit-Requests" }, "X-RateLimit-Limit-Tokens": { "type": "integer", "description": "X-RateLimit-Limit-Tokens" }, "X-RateLimit-Remaining-Requests": { "type": "integer", "description": "X-RateLimit-Remaining-Requests" }, "X-RateLimit-Remaining-Tokens": { "type": "integer", "description": "X-RateLimit-Remaining-Tokens" }, "X-RateLimit-Reset-Requests": { "type": "string", "description": "X-RateLimit-Reset-Requests" }, "X-RateLimit-Reset-Tokens": { "type": "string", "description": "X-RateLimit-Reset-Tokens" } } } } } }, "/v1/responses": { "post": { "security": [ { "ApiKeyAuth": [] } ], "description": "Create a new response", "produces": [ "application/json" ], "tags": [ "relay" ], "summary": "Create response", "parameters": [ { "description": "Request", "name": "request", "in": "body", "required": true, "schema": { "$ref": "#/definitions/model.CreateResponseRequest" } }, { "type": "string", "description": "Optional Aiproxy-Channel header", "name": "Aiproxy-Channel", "in": "header" } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/model.Response" }, "headers": { "X-RateLimit-Limit-Requests": { "type": "integer", "description": "X-RateLimit-Limit-Requests" }, "X-RateLimit-Limit-Tokens": { "type": "integer", "description": "X-RateLimit-Limit-Tokens" }, "X-RateLimit-Remaining-Requests": { "type": "integer", "description": "X-RateLimit-Remaining-Requests" }, "X-RateLimit-Remaining-Tokens": { "type": "integer", "description": "X-RateLimit-Remaining-Tokens" }, "X-RateLimit-Reset-Requests": { "type": "string", "description": "X-RateLimit-Reset-Requests" }, "X-RateLimit-Reset-Tokens": { "type": "string", "description": "X-RateLimit-Reset-Tokens" } } } } } }, "/v1/responses/{response_id}": { "get": { "security": [ { "ApiKeyAuth": [] } ], "description": "Get a response by ID", "produces": [ "application/json" ], "tags": [ "relay" ], "summary": "Get response", "parameters": [ { "type": "string", "description": "Response ID", "name": "response_id", "in": "path", "required": true }, { "type": "string", "description": "Optional Aiproxy-Channel header", "name": "Aiproxy-Channel", "in": "header" } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/model.Response" } } } }, "delete": { "security": [ { "ApiKeyAuth": [] } ], "description": "Delete a response by ID", "produces": [ "application/json" ], "tags": [ "relay" ], "summary": "Delete response", "parameters": [ { "type": "string", "description": "Response ID", "name": "response_id", "in": "path", "required": true }, { "type": "string", "description": "Optional Aiproxy-Channel header", "name": "Aiproxy-Channel", "in": "header" } ], "responses": { "204": { "description": "No Content" } } } }, "/v1/responses/{response_id}/cancel": { "post": { "security": [ { "ApiKeyAuth": [] } ], "description": "Cancel a response by ID", "produces": [ "application/json" ], "tags": [ "relay" ], "summary": "Cancel response", "parameters": [ { "type": "string", "description": "Response ID", "name": "response_id", "in": "path", "required": true }, { "type": "string", "description": "Optional Aiproxy-Channel header", "name": "Aiproxy-Channel", "in": "header" } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/model.Response" } } } } }, "/v1/responses/{response_id}/input_items": { "get": { "security": [ { "ApiKeyAuth": [] } ], "description": "Get input items for a response", "produces": [ "application/json" ], "tags": [ "relay" ], "summary": "Get response input items", "parameters": [ { "type": "string", "description": "Response ID", "name": "response_id", "in": "path", "required": true }, { "type": "string", "description": "Optional Aiproxy-Channel header", "name": "Aiproxy-Channel", "in": "header" } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/model.InputItemList" } } } } }, "/v1/video/generations/jobs": { "post": { "security": [ { "ApiKeyAuth": [] } ], "description": "VideoGenerationsJobs", "produces": [ "application/json" ], "tags": [ "relay" ], "summary": "VideoGenerationsJobs", "parameters": [ { "description": "Request", "name": "request", "in": "body", "required": true, "schema": { "$ref": "#/definitions/model.VideoGenerationJobRequest" } }, { "type": "string", "description": "Optional Aiproxy-Channel header", "name": "Aiproxy-Channel", "in": "header" } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/model.VideoGenerationJob" }, "headers": { "X-RateLimit-Limit-Requests": { "type": "integer", "description": "X-RateLimit-Limit-Requests" }, "X-RateLimit-Limit-Tokens": { "type": "integer", "description": "X-RateLimit-Limit-Tokens" }, "X-RateLimit-Remaining-Requests": { "type": "integer", "description": "X-RateLimit-Remaining-Requests" }, "X-RateLimit-Remaining-Tokens": { "type": "integer", "description": "X-RateLimit-Remaining-Tokens" }, "X-RateLimit-Reset-Requests": { "type": "string", "description": "X-RateLimit-Reset-Requests" }, "X-RateLimit-Reset-Tokens": { "type": "string", "description": "X-RateLimit-Reset-Tokens" } } } } } }, "/v1/video/generations/jobs/{id}": { "get": { "security": [ { "ApiKeyAuth": [] } ], "description": "VideoGenerationsGetJobs", "produces": [ "application/json" ], "tags": [ "relay" ], "summary": "VideoGenerationsGetJobs", "parameters": [ { "description": "Request", "name": "request", "in": "body", "required": true, "schema": { "$ref": "#/definitions/model.VideoGenerationJobRequest" } }, { "type": "string", "description": "Optional Aiproxy-Channel header", "name": "Aiproxy-Channel", "in": "header" } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/model.VideoGenerationJob" }, "headers": { "X-RateLimit-Limit-Requests": { "type": "integer", "description": "X-RateLimit-Limit-Requests" }, "X-RateLimit-Limit-Tokens": { "type": "integer", "description": "X-RateLimit-Limit-Tokens" }, "X-RateLimit-Remaining-Requests": { "type": "integer", "description": "X-RateLimit-Remaining-Requests" }, "X-RateLimit-Remaining-Tokens": { "type": "integer", "description": "X-RateLimit-Remaining-Tokens" }, "X-RateLimit-Reset-Requests": { "type": "string", "description": "X-RateLimit-Reset-Requests" }, "X-RateLimit-Reset-Tokens": { "type": "string", "description": "X-RateLimit-Reset-Tokens" } } } } } }, "/v1/video/generations/{id}/content/video": { "get": { "security": [ { "ApiKeyAuth": [] } ], "description": "VideoGenerationsContent", "produces": [ "application/json" ], "tags": [ "relay" ], "summary": "VideoGenerationsContent", "parameters": [ { "description": "Request", "name": "request", "in": "body", "required": true, "schema": { "$ref": "#/definitions/model.VideoGenerationJobRequest" } }, { "type": "string", "description": "Optional Aiproxy-Channel header", "name": "Aiproxy-Channel", "in": "header" } ], "responses": { "200": { "description": "video binary", "schema": { "type": "file" }, "headers": { "X-RateLimit-Limit-Requests": { "type": "integer", "description": "X-RateLimit-Limit-Requests" }, "X-RateLimit-Limit-Tokens": { "type": "integer", "description": "X-RateLimit-Limit-Tokens" }, "X-RateLimit-Remaining-Requests": { "type": "integer", "description": "X-RateLimit-Remaining-Requests" }, "X-RateLimit-Remaining-Tokens": { "type": "integer", "description": "X-RateLimit-Remaining-Tokens" }, "X-RateLimit-Reset-Requests": { "type": "string", "description": "X-RateLimit-Reset-Requests" }, "X-RateLimit-Reset-Tokens": { "type": "string", "description": "X-RateLimit-Reset-Tokens" } } } } } } }, "definitions": { "adaptor.ConfigTemplate": { "type": "object", "properties": { "description": { "type": "string" }, "example": { "type": "string" }, "name": { "type": "string" }, "required": { "type": "boolean" } } }, "adaptors.AdaptorMeta": { "type": "object", "properties": { "configs": { "type": "object", "additionalProperties": { "$ref": "#/definitions/adaptor.ConfigTemplate" } }, "defaultBaseUrl": { "type": "string" }, "keyHelp": { "type": "string" }, "name": { "type": "string" }, "readme": { "type": "string" } } }, "balance.GroupQuota": { "type": "object", "properties": { "remain": { "type": "number" }, "total": { "type": "number" } } }, "controller.AddChannelRequest": { "type": "object", "properties": { "base_url": { "type": "string" }, "configs": { "$ref": "#/definitions/model.ChannelConfigs" }, "key": { "type": "string" }, "model_mapping": { "type": "object", "additionalProperties": { "type": "string" } }, "models": { "type": "array", "items": { "type": "string" } }, "name": { "type": "string" }, "priority": { "type": "integer" }, "sets": { "type": "array", "items": { "type": "string" } }, "status": { "type": "integer" }, "type": { "$ref": "#/definitions/model.ChannelType" } } }, "controller.AddTokenRequest": { "type": "object", "properties": { "models": { "type": "array", "items": { "type": "string" } }, "name": { "type": "string" }, "period_last_update_time": { "type": "integer" }, "period_quota": { "type": "number" }, "period_type": { "type": "string" }, "quota": { "type": "number" }, "subnets": { "type": "array", "items": { "type": "string" } } } }, "controller.BuiltinModelConfig": { "type": "object", "properties": { "config": { "type": "object", "additionalProperties": {} }, "created_at": { "type": "string" }, "exclude_from_tests": { "type": "boolean" }, "force_save_detail": { "type": "boolean" }, "image_prices": { "description": "map[size]price_per_image", "type": "object", "additionalProperties": { "type": "number", "format": "float64" } }, "image_quality_prices": { "description": "map[size]map[quality]price_per_image", "type": "object", "additionalProperties": { "type": "object", "additionalProperties": { "type": "number", "format": "float64" } } }, "max_error_rate": { "type": "number" }, "model": { "type": "string" }, "owner": { "$ref": "#/definitions/model.ModelOwner" }, "plugin": { "type": "object", "additionalProperties": { "type": "object", "additionalProperties": {} } }, "price": { "$ref": "#/definitions/model.Price" }, "retry_times": { "type": "integer" }, "rpm": { "type": "integer" }, "timeout_config": { "$ref": "#/definitions/model.TimeoutConfig" }, "tpm": { "type": "integer" }, "type": { "$ref": "#/definitions/mode.Mode" }, "updated_at": { "type": "string" }, "warn_error_rate": { "type": "number" } } }, "controller.CreateGroupRequest": { "type": "object", "properties": { "available_sets": { "type": "array", "items": { "type": "string" } }, "balance_alert_enabled": { "type": "boolean" }, "balance_alert_threshold": { "type": "number" }, "rpm_ratio": { "type": "number" }, "tpm_ratio": { "type": "number" } } }, "controller.EmbedMCP": { "type": "object", "properties": { "config_templates": { "$ref": "#/definitions/controller.EmbedMCPConfigTemplates" }, "embed_config": { "$ref": "#/definitions/model.MCPEmbeddingConfig" }, "enabled": { "type": "boolean" }, "github_url": { "type": "string" }, "id": { "type": "string" }, "name": { "type": "string" }, "name_cn": { "type": "string" }, "readme": { "type": "string" }, "readme_cn": { "type": "string" }, "readme_cn_url": { "type": "string" }, "readme_url": { "type": "string" }, "tags": { "type": "array", "items": { "type": "string" } } } }, "controller.EmbedMCPConfigTemplate": { "type": "object", "properties": { "description": { "type": "string" }, "example": { "type": "string" }, "name": { "type": "string" }, "required": { "type": "boolean" } } }, "controller.EmbedMCPConfigTemplates": { "type": "object", "additionalProperties": { "$ref": "#/definitions/controller.EmbedMCPConfigTemplate" } }, "controller.EnabledModelChannel": { "type": "object", "properties": { "id": { "type": "integer" }, "name": { "type": "string" }, "type": { "$ref": "#/definitions/model.ChannelType" } } }, "controller.GetModelConfigsByModelsContainsRequest": { "type": "object", "properties": { "models": { "type": "array", "items": { "type": "string" } } } }, "controller.GroupMCPResponse": { "type": "object", "properties": { "created_at": { "type": "string" }, "description": { "type": "string" }, "endpoints": { "$ref": "#/definitions/controller.MCPEndpoint" }, "group_id": { "type": "string" }, "id": { "type": "string" }, "name": { "type": "string" }, "openapi_config": { "$ref": "#/definitions/model.MCPOpenAPIConfig" }, "proxy_config": { "$ref": "#/definitions/model.GroupMCPProxyConfig" }, "status": { "$ref": "#/definitions/model.GroupMCPStatus" }, "type": { "$ref": "#/definitions/model.GroupMCPType" }, "update_at": { "type": "string" } } }, "controller.GroupModel": { "type": "object", "properties": { "config": { "type": "object", "additionalProperties": {} }, "created_at": { "type": "integer" }, "enabled_plugins": { "type": "array", "items": { "type": "string" } }, "image_prices": { "description": "map[size]price_per_image", "type": "object", "additionalProperties": { "type": "number", "format": "float64" } }, "image_quality_prices": { "description": "map[size]map[quality]price_per_image", "type": "object", "additionalProperties": { "type": "object", "additionalProperties": { "type": "number", "format": "float64" } } }, "model": { "type": "string" }, "owner": { "$ref": "#/definitions/model.ModelOwner" }, "price": { "$ref": "#/definitions/model.Price" }, "rpm": { "type": "integer" }, "tpm": { "type": "integer" }, "type": { "$ref": "#/definitions/mode.Mode" }, "updated_at": { "type": "integer" } } }, "controller.GroupPublicMCPDetailResponse": { "type": "object", "properties": { "created_at": { "type": "string" }, "description": { "type": "string" }, "description_cn": { "type": "string" }, "embed_config": { "$ref": "#/definitions/model.MCPEmbeddingConfig" }, "endpoints": { "$ref": "#/definitions/controller.MCPEndpoint" }, "github_url": { "type": "string" }, "hosted": { "type": "boolean" }, "id": { "type": "string" }, "logo_url": { "type": "string" }, "name": { "type": "string" }, "name_cn": { "type": "string" }, "openapi_config": { "$ref": "#/definitions/model.MCPOpenAPIConfig" }, "params": { "type": "object", "additionalProperties": { "type": "string" } }, "price": { "$ref": "#/definitions/model.MCPPrice" }, "proxy_config": { "$ref": "#/definitions/model.PublicMCPProxyConfig" }, "readme": { "type": "string" }, "readme_cn": { "type": "string" }, "readme_cn_url": { "type": "string" }, "readme_url": { "type": "string" }, "reusing": { "type": "object", "additionalProperties": { "$ref": "#/definitions/model.ReusingParam" } }, "status": { "$ref": "#/definitions/model.PublicMCPStatus" }, "tags": { "type": "array", "items": { "type": "string" } }, "test_config": { "description": "only used by list tools", "allOf": [ { "$ref": "#/definitions/model.TestConfig" } ] }, "tools": { "type": "array", "items": { "$ref": "#/definitions/mcp.Tool" } }, "type": { "$ref": "#/definitions/model.PublicMCPType" }, "update_at": { "type": "string" } } }, "controller.GroupPublicMCPResponse": { "type": "object", "properties": { "created_at": { "type": "string" }, "description": { "type": "string" }, "description_cn": { "type": "string" }, "embed_config": { "$ref": "#/definitions/model.MCPEmbeddingConfig" }, "github_url": { "type": "string" }, "hosted": { "type": "boolean" }, "id": { "type": "string" }, "logo_url": { "type": "string" }, "name": { "type": "string" }, "name_cn": { "type": "string" }, "openapi_config": { "$ref": "#/definitions/model.MCPOpenAPIConfig" }, "price": { "$ref": "#/definitions/model.MCPPrice" }, "proxy_config": { "$ref": "#/definitions/model.PublicMCPProxyConfig" }, "readme": { "type": "string" }, "readme_cn": { "type": "string" }, "readme_cn_url": { "type": "string" }, "readme_url": { "type": "string" }, "status": { "$ref": "#/definitions/model.PublicMCPStatus" }, "tags": { "type": "array", "items": { "type": "string" } }, "test_config": { "description": "only used by list tools", "allOf": [ { "$ref": "#/definitions/model.TestConfig" } ] }, "type": { "$ref": "#/definitions/model.PublicMCPType" }, "update_at": { "type": "string" } } }, "controller.GroupResponse": { "type": "object", "properties": { "accessed_at": { "type": "string" }, "available_sets": { "type": "array", "items": { "type": "string" } }, "balance_alert_enabled": { "type": "boolean" }, "balance_alert_threshold": { "type": "number" }, "created_at": { "type": "string" }, "id": { "type": "string" }, "request_count": { "type": "integer" }, "rpm_ratio": { "type": "number" }, "status": { "type": "integer" }, "tpm_ratio": { "type": "number" }, "used_amount": { "type": "number" } } }, "controller.ImportChannelFromOneAPIRequest": { "type": "object", "properties": { "dsn": { "type": "string" } } }, "controller.MCPEndpoint": { "type": "object", "properties": { "host": { "type": "string" }, "sse": { "type": "string" }, "streamable_http": { "type": "string" } } }, "controller.OpenAIModelPermission": { "type": "object", "properties": { "allow_create_engine": { "type": "boolean" }, "allow_fine_tuning": { "type": "boolean" }, "allow_logprobs": { "type": "boolean" }, "allow_sampling": { "type": "boolean" }, "allow_search_indices": { "type": "boolean" }, "allow_view": { "type": "boolean" }, "created": { "type": "integer" }, "group": { "type": "string" }, "id": { "type": "string" }, "is_blocking": { "type": "boolean" }, "object": { "type": "string" }, "organization": { "type": "string" } } }, "controller.OpenAIModels": { "type": "object", "properties": { "created": { "type": "integer" }, "id": { "type": "string" }, "object": { "type": "string" }, "owned_by": { "type": "string" }, "parent": { "type": "string" }, "permission": { "type": "array", "items": { "$ref": "#/definitions/controller.OpenAIModelPermission" } }, "root": { "type": "string" } } }, "controller.PublicMCPResponse": { "type": "object", "properties": { "created_at": { "type": "string" }, "description": { "type": "string" }, "description_cn": { "type": "string" }, "embed_config": { "$ref": "#/definitions/model.MCPEmbeddingConfig" }, "endpoints": { "$ref": "#/definitions/controller.MCPEndpoint" }, "github_url": { "type": "string" }, "id": { "type": "string" }, "logo_url": { "type": "string" }, "name": { "type": "string" }, "name_cn": { "type": "string" }, "openapi_config": { "$ref": "#/definitions/model.MCPOpenAPIConfig" }, "price": { "$ref": "#/definitions/model.MCPPrice" }, "proxy_config": { "$ref": "#/definitions/model.PublicMCPProxyConfig" }, "readme": { "type": "string" }, "readme_cn": { "type": "string" }, "readme_cn_url": { "type": "string" }, "readme_url": { "type": "string" }, "status": { "$ref": "#/definitions/model.PublicMCPStatus" }, "tags": { "type": "array", "items": { "type": "string" } }, "test_config": { "description": "only used by list tools", "allOf": [ { "$ref": "#/definitions/model.TestConfig" } ] }, "type": { "$ref": "#/definitions/model.PublicMCPType" }, "update_at": { "type": "string" } } }, "controller.SaveEmbedMCPRequest": { "type": "object", "properties": { "enabled": { "type": "boolean" }, "id": { "type": "string" }, "init_config": { "type": "object", "additionalProperties": { "type": "string" } } } }, "controller.SaveGroupModelConfigRequest": { "type": "object", "properties": { "force_save_detail": { "type": "boolean" }, "image_prices": { "type": "object", "additionalProperties": { "type": "number", "format": "float64" } }, "model": { "type": "string" }, "override_force_save_detail": { "type": "boolean" }, "override_limit": { "type": "boolean" }, "override_price": { "type": "boolean" }, "override_retry_times": { "type": "boolean" }, "price": { "$ref": "#/definitions/model.Price" }, "retry_times": { "type": "integer" }, "rpm": { "type": "integer" }, "tpm": { "type": "integer" } } }, "controller.SaveModelConfigsRequest": { "type": "object", "properties": { "config": { "type": "object", "additionalProperties": {} }, "created_at": { "type": "string" }, "exclude_from_tests": { "type": "boolean" }, "force_save_detail": { "type": "boolean" }, "image_prices": { "description": "map[size]price_per_image", "type": "object", "additionalProperties": { "type": "number", "format": "float64" } }, "image_quality_prices": { "description": "map[size]map[quality]price_per_image", "type": "object", "additionalProperties": { "type": "object", "additionalProperties": { "type": "number", "format": "float64" } } }, "max_error_rate": { "type": "number" }, "model": { "type": "string" }, "owner": { "$ref": "#/definitions/model.ModelOwner" }, "plugin": { "type": "object", "additionalProperties": { "type": "object", "additionalProperties": {} } }, "price": { "$ref": "#/definitions/model.Price" }, "retry_times": { "type": "integer" }, "rpm": { "type": "integer" }, "timeout_config": { "$ref": "#/definitions/model.TimeoutConfig" }, "tpm": { "type": "integer" }, "type": { "$ref": "#/definitions/mode.Mode" }, "updated_at": { "type": "string" }, "warn_error_rate": { "type": "number" } } }, "controller.StatusData": { "type": "object", "properties": { "startTime": { "type": "integer" } } }, "controller.TestResult": { "type": "object", "properties": { "data": { "$ref": "#/definitions/model.ChannelTest" }, "message": { "type": "string" }, "success": { "type": "boolean" } } }, "controller.TokenResponse": { "type": "object", "properties": { "accessed_at": { "type": "string" }, "created_at": { "type": "string" }, "group": { "type": "string" }, "id": { "type": "integer" }, "key": { "type": "string" }, "models": { "type": "array", "items": { "type": "string" } }, "name": { "type": "string" }, "period_last_update_amount": { "description": "Total usage at last period reset", "type": "number" }, "period_last_update_time": { "description": "Last time period was reset", "type": "string" }, "period_quota": { "type": "number" }, "period_type": { "description": "daily, weekly, monthly, default is monthly", "type": "string" }, "quota": { "type": "number" }, "request_count": { "type": "integer" }, "status": { "type": "integer" }, "subnets": { "type": "array", "items": { "type": "string" } }, "used_amount": { "type": "number" } } }, "controller.UpdateChannelStatusRequest": { "type": "object", "properties": { "status": { "type": "integer" } } }, "controller.UpdateGroupMCPStatusRequest": { "type": "object", "properties": { "status": { "$ref": "#/definitions/model.GroupMCPStatus" } } }, "controller.UpdateGroupRPMRatioRequest": { "type": "object", "properties": { "rpm_ratio": { "type": "number" } } }, "controller.UpdateGroupStatusRequest": { "type": "object", "properties": { "status": { "type": "integer" } } }, "controller.UpdateGroupTPMRatioRequest": { "type": "object", "properties": { "tpm_ratio": { "type": "number" } } }, "controller.UpdateGroupsStatusRequest": { "type": "object", "properties": { "groups": { "type": "array", "items": { "type": "string" } }, "status": { "type": "integer" } } }, "controller.UpdatePublicMCPStatusRequest": { "type": "object", "properties": { "status": { "$ref": "#/definitions/model.PublicMCPStatus" } } }, "controller.UpdateTokenNameRequest": { "type": "object", "properties": { "name": { "type": "string" } } }, "controller.UpdateTokenStatusRequest": { "type": "object", "properties": { "status": { "type": "integer" } } }, "mcp.Meta": { "type": "object", "properties": { "additionalFields": { "description": "AdditionalFields are any fields present in the Meta that are not\notherwise defined in the protocol.", "type": "object", "additionalProperties": {} }, "progressToken": { "description": "If specified, the caller is requesting out-of-band progress\nnotifications for this request (as represented by\nnotifications/progress). The value of this parameter is an\nopaque token that will be attached to any subsequent\nnotifications. The receiver is not obligated to provide these\nnotifications." } } }, "mcp.Tool": { "type": "object", "properties": { "_meta": { "description": "Meta is a metadata object that is reserved by MCP for storing additional information.", "allOf": [ { "$ref": "#/definitions/mcp.Meta" } ] }, "annotations": { "description": "Optional properties describing tool behavior", "allOf": [ { "$ref": "#/definitions/mcp.ToolAnnotation" } ] }, "description": { "description": "A human-readable description of the tool.", "type": "string" }, "inputSchema": { "description": "A JSON Schema object defining the expected parameters for the tool.", "allOf": [ { "$ref": "#/definitions/mcp.ToolInputSchema" } ] }, "name": { "description": "The name of the tool.", "type": "string" }, "outputSchema": { "description": "A JSON Schema object defining the expected output returned by the tool .", "allOf": [ { "$ref": "#/definitions/mcp.ToolOutputSchema" } ] } } }, "mcp.ToolAnnotation": { "type": "object", "properties": { "destructiveHint": { "description": "If true, the tool may perform destructive updates", "type": "boolean" }, "idempotentHint": { "description": "If true, repeated calls with same args have no additional effect", "type": "boolean" }, "openWorldHint": { "description": "If true, tool interacts with external entities", "type": "boolean" }, "readOnlyHint": { "description": "If true, the tool does not modify its environment", "type": "boolean" }, "title": { "description": "Human-readable title for the tool", "type": "string" } } }, "mcp.ToolInputSchema": { "type": "object", "properties": { "$defs": { "type": "object", "additionalProperties": {} }, "properties": { "type": "object", "additionalProperties": {} }, "required": { "type": "array", "items": { "type": "string" } }, "type": { "type": "string" } } }, "mcp.ToolOutputSchema": { "type": "object", "properties": { "$defs": { "type": "object", "additionalProperties": {} }, "properties": { "type": "object", "additionalProperties": {} }, "required": { "type": "array", "items": { "type": "string" } }, "type": { "type": "string" } } }, "middleware.APIResponse": { "type": "object", "properties": { "data": {}, "message": { "type": "string" }, "success": { "type": "boolean" } } }, "mode.Mode": { "type": "integer", "enum": [ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21 ], "x-enum-varnames": [ "Unknown", "ChatCompletions", "Completions", "Embeddings", "Moderations", "ImagesGenerations", "ImagesEdits", "AudioSpeech", "AudioTranscription", "AudioTranslation", "Rerank", "ParsePdf", "Anthropic", "VideoGenerationsJobs", "VideoGenerationsGetJobs", "VideoGenerationsContent", "Responses", "ResponsesGet", "ResponsesDelete", "ResponsesCancel", "ResponsesInputItems", "Gemini" ] }, "model.AnthropicMessageRequest": { "type": "object", "properties": { "messages": { "type": "array", "items": { "$ref": "#/definitions/model.Message" } }, "model": { "type": "string" } } }, "model.Channel": { "type": "object", "properties": { "balance": { "type": "number" }, "balance_threshold": { "type": "number" }, "balance_updated_at": { "type": "string" }, "base_url": { "type": "string" }, "channel_tests": { "type": "array", "items": { "$ref": "#/definitions/model.ChannelTest" } }, "configs": { "$ref": "#/definitions/model.ChannelConfigs" }, "created_at": { "type": "string" }, "enabled_auto_balance_check": { "type": "boolean" }, "id": { "type": "integer" }, "key": { "type": "string" }, "last_test_error_at": { "type": "string" }, "model_mapping": { "type": "object", "additionalProperties": { "type": "string" } }, "models": { "type": "array", "items": { "type": "string" } }, "name": { "type": "string" }, "priority": { "type": "integer" }, "request_count": { "type": "integer" }, "retry_count": { "type": "integer" }, "sets": { "type": "array", "items": { "type": "string" } }, "status": { "type": "integer" }, "type": { "$ref": "#/definitions/model.ChannelType" }, "used_amount": { "type": "number" } } }, "model.ChannelConfigs": { "type": "object", "additionalProperties": {} }, "model.ChannelTest": { "type": "object", "properties": { "actual_model": { "type": "string" }, "channel_id": { "type": "integer" }, "channel_name": { "type": "string" }, "channel_type": { "$ref": "#/definitions/model.ChannelType" }, "code": { "type": "integer" }, "mode": { "$ref": "#/definitions/mode.Mode" }, "model": { "type": "string" }, "response": { "type": "string" }, "success": { "type": "boolean" }, "test_at": { "type": "string" }, "took": { "type": "number" } } }, "model.ChannelType": { "type": "integer", "enum": [ 1, 3, 4, 12, 13, 14, 15, 16, 17, 18, 19, 20, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52 ], "x-enum-varnames": [ "ChannelTypeOpenAI", "ChannelTypeAzure", "ChannelTypeAzure2", "ChannelTypeGoogleGeminiOpenAI", "ChannelTypeBaiduV2", "ChannelTypeAnthropic", "ChannelTypeBaidu", "ChannelTypeZhipu", "ChannelTypeAli", "ChannelTypeXunfei", "ChannelTypeAI360", "ChannelTypeOpenRouter", "ChannelTypeTencent", "ChannelTypeGoogleGemini", "ChannelTypeMoonshot", "ChannelTypeBaichuan", "ChannelTypeMinimax", "ChannelTypeMistral", "ChannelTypeGroq", "ChannelTypeOllama", "ChannelTypeLingyiwanwu", "ChannelTypeStepfun", "ChannelTypeAWS", "ChannelTypeCoze", "ChannelTypeCohere", "ChannelTypeDeepseek", "ChannelTypeCloudflare", "ChannelTypeDoubao", "ChannelTypeNovita", "ChannelTypeVertexAI", "ChannelTypeSiliconflow", "ChannelTypeDoubaoAudio", "ChannelTypeXAI", "ChannelTypeDoc2x", "ChannelTypeJina", "ChannelTypeTextEmbeddingsInference", "ChannelTypeQianfan", "ChannelTypeSangforAICP", "ChannelTypeStreamlake", "ChannelTypeZhipuCoding" ] }, "model.ChartData": { "type": "object", "properties": { "audio_input_tokens": { "type": "integer" }, "cache_creation_tokens": { "type": "integer" }, "cached_tokens": { "type": "integer" }, "exception_count": { "type": "integer" }, "image_input_tokens": { "type": "integer" }, "input_tokens": { "type": "integer" }, "output_tokens": { "type": "integer" }, "reasoning_tokens": { "type": "integer" }, "request_count": { "type": "integer" }, "retry_count": { "type": "integer" }, "status_400_count": { "type": "integer" }, "status_429_count": { "type": "integer" }, "status_4xx_count": { "type": "integer" }, "status_500_count": { "type": "integer" }, "status_5xx_count": { "type": "integer" }, "timestamp": { "type": "integer" }, "total_time_milliseconds": { "type": "integer" }, "total_tokens": { "type": "integer" }, "total_ttfb_milliseconds": { "type": "integer" }, "used_amount": { "type": "number" }, "web_search_count": { "type": "integer" } } }, "model.ChatUsage": { "type": "object", "properties": { "completion_tokens": { "type": "integer" }, "completion_tokens_details": { "$ref": "#/definitions/model.CompletionTokensDetails" }, "prompt_tokens": { "type": "integer" }, "prompt_tokens_details": { "$ref": "#/definitions/model.PromptTokensDetails" }, "total_tokens": { "type": "integer" }, "web_search_count": { "type": "integer" } } }, "model.ClaudeThinkingType": { "type": "string", "enum": [ "enabled", "disabled" ], "x-enum-varnames": [ "ClaudeThinkingTypeEnabled", "ClaudeThinkingTypeDisabled" ] }, "model.CompletionTokensDetails": { "type": "object", "properties": { "accepted_prediction_tokens": { "type": "integer" }, "audio_tokens": { "type": "integer" }, "reasoning_tokens": { "type": "integer" }, "rejected_prediction_tokens": { "type": "integer" } } }, "model.ConditionalPrice": { "type": "object", "properties": { "condition": { "$ref": "#/definitions/model.PriceCondition" }, "price": { "$ref": "#/definitions/model.Price" } } }, "model.CreateResponseRequest": { "type": "object", "properties": { "background": { "type": "boolean" }, "conversation": { "description": "string or object" }, "include": { "type": "array", "items": { "type": "string" } }, "input": {}, "instructions": { "type": "string" }, "max_output_tokens": { "type": "integer" }, "max_tool_calls": { "type": "integer" }, "metadata": { "type": "object", "additionalProperties": {} }, "model": { "type": "string" }, "parallel_tool_calls": { "type": "boolean" }, "previous_response_id": { "type": "string" }, "prompt_cache_key": { "type": "string" }, "safety_identifier": { "type": "string" }, "service_tier": { "type": "string" }, "store": { "type": "boolean" }, "stream": { "type": "boolean" }, "temperature": { "type": "number" }, "text": { "$ref": "#/definitions/model.ResponseText" }, "tool_choice": {}, "tools": { "type": "array", "items": { "$ref": "#/definitions/model.ResponseTool" } }, "top_logprobs": { "type": "integer" }, "top_p": { "type": "number" }, "truncation": { "type": "string" }, "user": { "description": "Deprecated, use prompt_cache_key", "type": "string" } } }, "model.DashboardResponse": { "type": "object", "properties": { "audio_input_tokens": { "type": "integer" }, "cache_creation_tokens": { "type": "integer" }, "cached_tokens": { "type": "integer" }, "channels": { "type": "array", "items": { "type": "integer" } }, "chart_data": { "type": "array", "items": { "$ref": "#/definitions/model.ChartData" } }, "exception_count": { "type": "integer" }, "image_input_tokens": { "type": "integer" }, "input_tokens": { "type": "integer" }, "max_rpm": { "type": "integer" }, "max_tpm": { "type": "integer" }, "models": { "type": "array", "items": { "type": "string" } }, "output_tokens": { "type": "integer" }, "reasoning_tokens": { "type": "integer" }, "request_count": { "type": "integer" }, "retry_count": { "type": "integer" }, "rpm": { "type": "integer" }, "status_400_count": { "type": "integer" }, "status_429_count": { "type": "integer" }, "status_4xx_count": { "type": "integer" }, "status_500_count": { "type": "integer" }, "status_5xx_count": { "type": "integer" }, "total_count": { "description": "use Count.RequestCount instead", "type": "integer" }, "total_time_milliseconds": { "type": "integer" }, "total_tokens": { "type": "integer" }, "total_ttfb_milliseconds": { "type": "integer" }, "tpm": { "type": "integer" }, "used_amount": { "type": "number" }, "web_search_count": { "type": "integer" } } }, "model.Document": { "type": "object", "properties": { "text": { "type": "string" } } }, "model.EmbeddingPromptTokensDetails": { "type": "object", "properties": { "image_tokens": { "type": "integer" }, "text_tokens": { "type": "integer" } } }, "model.EmbeddingRequest": { "type": "object", "properties": { "dimensions": { "type": "integer" }, "encoding_format": { "type": "string" }, "input": { "type": "string" }, "model": { "type": "string" } } }, "model.EmbeddingResponse": { "type": "object", "properties": { "data": { "type": "array", "items": { "$ref": "#/definitions/model.EmbeddingResponseItem" } }, "model": { "type": "string" }, "object": { "type": "string" }, "usage": { "$ref": "#/definitions/model.EmbeddingUsage" } } }, "model.EmbeddingResponseItem": { "type": "object", "properties": { "embedding": { "type": "array", "items": { "type": "number" } }, "index": { "type": "integer" }, "object": { "type": "string" } } }, "model.EmbeddingUsage": { "type": "object", "properties": { "prompt_tokens": { "type": "integer" }, "prompt_tokens_details": { "$ref": "#/definitions/model.EmbeddingPromptTokensDetails" }, "total_tokens": { "type": "integer" } } }, "model.ExtraContent": { "type": "object", "properties": { "google": { "$ref": "#/definitions/model.GoogleExtraContent" } } }, "model.FinishReason": { "type": "string", "enum": [ "stop", "length", "content_filter", "tool_calls", "function_call" ], "x-enum-varnames": [ "FinishReasonStop", "FinishReasonLength", "FinishReasonContentFilter", "FinishReasonToolCalls", "FinishReasonFunctionCall" ] }, "model.Function": { "type": "object", "properties": { "arguments": { "type": "string" }, "description": { "type": "string" }, "name": { "type": "string" }, "parameters": {} } }, "model.GeneralOpenAIRequest": { "type": "object", "properties": { "frequency_penalty": { "type": "number" }, "function_call": {}, "functions": {}, "input": {}, "logit_bias": {}, "logprobs": { "type": "boolean" }, "max_completion_tokens": { "type": "integer" }, "max_tokens": { "type": "integer" }, "messages": { "type": "array", "items": { "$ref": "#/definitions/model.Message" } }, "metadata": {}, "model": { "type": "string" }, "num_ctx": { "type": "integer" }, "presence_penalty": { "type": "number" }, "prompt": {}, "response_format": { "$ref": "#/definitions/model.ResponseFormat" }, "seed": { "type": "number" }, "size": { "type": "string" }, "stop": {}, "stream": { "type": "boolean" }, "stream_options": { "$ref": "#/definitions/model.StreamOptions" }, "temperature": { "type": "number" }, "thinking": { "description": "aiproxy control field", "allOf": [ { "$ref": "#/definitions/model.GeneralThinking" } ] }, "tool_choice": {}, "tools": { "type": "array", "items": { "$ref": "#/definitions/model.Tool" } }, "top_k": { "type": "integer" }, "top_logprobs": { "type": "integer" }, "top_p": { "type": "number" }, "user": { "type": "string" } } }, "model.GeneralThinking": { "type": "object", "properties": { "budget_tokens": { "description": "when type is \"disabled\", this field must be 0", "type": "integer" }, "type": { "$ref": "#/definitions/model.ClaudeThinkingType" } } }, "model.GetGroupLogsResult": { "type": "object", "properties": { "channels": { "type": "array", "items": { "type": "integer" } }, "logs": { "type": "array", "items": { "$ref": "#/definitions/model.Log" } }, "models": { "type": "array", "items": { "type": "string" } }, "token_names": { "type": "array", "items": { "type": "string" } }, "total": { "type": "integer" } } }, "model.GetLogsResult": { "type": "object", "properties": { "channels": { "type": "array", "items": { "type": "integer" } }, "logs": { "type": "array", "items": { "$ref": "#/definitions/model.Log" } }, "total": { "type": "integer" } } }, "model.GoogleExtraContent": { "type": "object", "properties": { "thought_signature": { "type": "string" } } }, "model.Group": { "type": "object", "properties": { "available_sets": { "type": "array", "items": { "type": "string" } }, "balance_alert_enabled": { "type": "boolean" }, "balance_alert_threshold": { "type": "number" }, "created_at": { "type": "string" }, "id": { "type": "string" }, "request_count": { "type": "integer" }, "rpm_ratio": { "type": "number" }, "status": { "type": "integer" }, "tpm_ratio": { "type": "number" }, "used_amount": { "type": "number" } } }, "model.GroupDashboardResponse": { "type": "object", "properties": { "audio_input_tokens": { "type": "integer" }, "cache_creation_tokens": { "type": "integer" }, "cached_tokens": { "type": "integer" }, "channels": { "type": "array", "items": { "type": "integer" } }, "chart_data": { "type": "array", "items": { "$ref": "#/definitions/model.ChartData" } }, "exception_count": { "type": "integer" }, "image_input_tokens": { "type": "integer" }, "input_tokens": { "type": "integer" }, "max_rpm": { "type": "integer" }, "max_tpm": { "type": "integer" }, "models": { "type": "array", "items": { "type": "string" } }, "output_tokens": { "type": "integer" }, "reasoning_tokens": { "type": "integer" }, "request_count": { "type": "integer" }, "retry_count": { "type": "integer" }, "rpm": { "type": "integer" }, "status_400_count": { "type": "integer" }, "status_429_count": { "type": "integer" }, "status_4xx_count": { "type": "integer" }, "status_500_count": { "type": "integer" }, "status_5xx_count": { "type": "integer" }, "token_names": { "type": "array", "items": { "type": "string" } }, "total_count": { "description": "use Count.RequestCount instead", "type": "integer" }, "total_time_milliseconds": { "type": "integer" }, "total_tokens": { "type": "integer" }, "total_ttfb_milliseconds": { "type": "integer" }, "tpm": { "type": "integer" }, "used_amount": { "type": "number" }, "web_search_count": { "type": "integer" } } }, "model.GroupMCP": { "type": "object", "properties": { "created_at": { "type": "string" }, "description": { "type": "string" }, "group_id": { "type": "string" }, "id": { "type": "string" }, "name": { "type": "string" }, "openapi_config": { "$ref": "#/definitions/model.MCPOpenAPIConfig" }, "proxy_config": { "$ref": "#/definitions/model.GroupMCPProxyConfig" }, "status": { "$ref": "#/definitions/model.GroupMCPStatus" }, "type": { "$ref": "#/definitions/model.GroupMCPType" }, "update_at": { "type": "string" } } }, "model.GroupMCPProxyConfig": { "type": "object", "properties": { "headers": { "type": "object", "additionalProperties": { "type": "string" } }, "querys": { "type": "object", "additionalProperties": { "type": "string" } }, "url": { "type": "string" } } }, "model.GroupMCPStatus": { "type": "integer", "enum": [ 1, 2 ], "x-enum-varnames": [ "GroupMCPStatusEnabled", "GroupMCPStatusDisabled" ] }, "model.GroupMCPType": { "type": "string", "enum": [ "mcp_proxy_sse", "mcp_proxy_streamable", "mcp_openapi" ], "x-enum-varnames": [ "GroupMCPTypeProxySSE", "GroupMCPTypeProxyStreamable", "GroupMCPTypeOpenAPI" ] }, "model.GroupModelConfig": { "type": "object", "properties": { "force_save_detail": { "type": "boolean" }, "group_id": { "type": "string" }, "image_prices": { "type": "object", "additionalProperties": { "type": "number", "format": "float64" } }, "model": { "type": "string" }, "override_force_save_detail": { "type": "boolean" }, "override_limit": { "type": "boolean" }, "override_price": { "type": "boolean" }, "override_retry_times": { "type": "boolean" }, "price": { "$ref": "#/definitions/model.Price" }, "retry_times": { "type": "integer" }, "rpm": { "type": "integer" }, "tpm": { "type": "integer" } } }, "model.ImageData": { "type": "object", "properties": { "b64_json": { "type": "string" }, "revised_prompt": { "type": "string" }, "url": { "type": "string" } } }, "model.ImageInputTokensDetails": { "type": "object", "properties": { "image_tokens": { "description": "The number of image tokens in the input prompt.", "type": "integer" }, "text_tokens": { "description": "The number of text tokens in the input prompt.", "type": "integer" } } }, "model.ImageRequest": { "type": "object", "properties": { "background": { "type": "string" }, "model": { "type": "string" }, "moderation": { "type": "string" }, "n": { "type": "integer" }, "output_compression": { "type": "integer" }, "output_format": { "description": "png, jpeg, webp", "type": "string" }, "prompt": { "type": "string" }, "quality": { "description": "auto, high, medium, low, hd, standard", "type": "string" }, "response_format": { "description": "url, b64_json", "type": "string" }, "size": { "description": "1024x1024, 1536x1024, 1024x1536, auto, 256x256, 512x512, 1792x1024, 1024x1792", "type": "string" }, "style": { "description": "vivid, natural", "type": "string" }, "user": { "type": "string" } } }, "model.ImageResponse": { "type": "object", "properties": { "created": { "type": "integer" }, "data": { "type": "array", "items": { "$ref": "#/definitions/model.ImageData" } }, "usage": { "description": "For gpt-image-1 only, the token usage information for the image generation.", "allOf": [ { "$ref": "#/definitions/model.ImageUsage" } ] } } }, "model.ImageUsage": { "type": "object", "properties": { "input_tokens": { "description": "The number of tokens (images and text) in the input prompt.", "type": "integer" }, "input_tokens_details": { "description": "The input tokens detailed information for the image generation.", "allOf": [ { "$ref": "#/definitions/model.ImageInputTokensDetails" } ] }, "output_tokens": { "description": "The number of image tokens in the output image.", "type": "integer" }, "total_tokens": { "description": "The total number of tokens (images and text) used for the image generation.", "type": "integer" } } }, "model.IncompleteDetails": { "type": "object", "properties": { "reason": { "type": "string" } } }, "model.InputContent": { "type": "object", "properties": { "arguments": { "type": "string" }, "call_id": { "description": "Fields for function_result type", "type": "string" }, "id": { "description": "Fields for function_call type", "type": "string" }, "name": { "type": "string" }, "output": { "type": "string" }, "text": { "type": "string" }, "type": { "type": "string" } } }, "model.InputItem": { "type": "object", "properties": { "arguments": { "type": "string" }, "call_id": { "description": "Fields for function_result type", "type": "string" }, "content": { "type": "array", "items": { "$ref": "#/definitions/model.InputContent" } }, "id": { "type": "string" }, "name": { "description": "Fields for function_call type", "type": "string" }, "output": { "type": "string" }, "role": { "type": "string" }, "type": { "type": "string" } } }, "model.InputItemList": { "type": "object", "properties": { "data": { "type": "array", "items": { "$ref": "#/definitions/model.InputItem" } }, "first_id": { "type": "string" }, "has_more": { "type": "boolean" }, "last_id": { "type": "string" }, "object": { "type": "string" } } }, "model.JSONSchema": { "type": "object", "properties": { "description": { "type": "string" }, "name": { "type": "string" }, "schema": { "type": "object", "additionalProperties": {} }, "strict": { "type": "boolean" } } }, "model.Log": { "type": "object", "properties": { "channel": { "type": "integer" }, "code": { "type": "integer" }, "content": { "type": "string" }, "created_at": { "type": "string" }, "endpoint": { "type": "string" }, "group": { "type": "string" }, "id": { "type": "integer" }, "ip": { "type": "string" }, "metadata": { "type": "object", "additionalProperties": { "type": "string" } }, "mode": { "type": "integer" }, "model": { "type": "string" }, "price": { "$ref": "#/definitions/model.Price" }, "request_at": { "type": "string" }, "request_detail": { "$ref": "#/definitions/model.RequestDetail" }, "request_id": { "type": "string" }, "retry_at": { "type": "string" }, "retry_times": { "type": "integer" }, "token_id": { "type": "integer" }, "token_name": { "type": "string" }, "ttfb_milliseconds": { "type": "integer" }, "usage": { "$ref": "#/definitions/model.Usage" }, "used_amount": { "type": "number" }, "user": { "description": "https://platform.openai.com/docs/guides/safety-best-practices#end-user-ids", "type": "string" } } }, "model.MCPEmbeddingConfig": { "type": "object", "properties": { "init": { "type": "object", "additionalProperties": { "type": "string" } }, "reusing": { "type": "object", "additionalProperties": { "$ref": "#/definitions/model.ReusingParam" } } } }, "model.MCPOpenAPIConfig": { "type": "object", "properties": { "authorization": { "type": "string" }, "openapi_content": { "type": "string" }, "openapi_spec": { "type": "string" }, "server_addr": { "type": "string" }, "v2": { "type": "boolean" } } }, "model.MCPPrice": { "type": "object", "properties": { "default_tools_call_price": { "type": "number" }, "tools_call_prices": { "type": "object", "additionalProperties": { "type": "number", "format": "float64" } } } }, "model.Message": { "type": "object", "properties": { "content": {}, "name": { "type": "string" }, "reasoning_content": { "type": "string" }, "role": { "type": "string" }, "signature": { "type": "string" }, "tool_call_id": { "type": "string" }, "tool_calls": { "type": "array", "items": { "$ref": "#/definitions/model.ToolCall" } } } }, "model.ModelConfig": { "type": "object", "properties": { "config": { "type": "object", "additionalProperties": {} }, "created_at": { "type": "string" }, "exclude_from_tests": { "type": "boolean" }, "force_save_detail": { "type": "boolean" }, "image_prices": { "description": "map[size]price_per_image", "type": "object", "additionalProperties": { "type": "number", "format": "float64" } }, "image_quality_prices": { "description": "map[size]map[quality]price_per_image", "type": "object", "additionalProperties": { "type": "object", "additionalProperties": { "type": "number", "format": "float64" } } }, "max_error_rate": { "type": "number" }, "model": { "type": "string" }, "owner": { "$ref": "#/definitions/model.ModelOwner" }, "plugin": { "type": "object", "additionalProperties": { "type": "object", "additionalProperties": {} } }, "price": { "$ref": "#/definitions/model.Price" }, "retry_times": { "type": "integer" }, "rpm": { "type": "integer" }, "timeout_config": { "$ref": "#/definitions/model.TimeoutConfig" }, "tpm": { "type": "integer" }, "type": { "$ref": "#/definitions/mode.Mode" }, "updated_at": { "type": "string" }, "warn_error_rate": { "type": "number" } } }, "model.ModelOwner": { "type": "string", "enum": [ "openai", "alibaba", "tencent", "xunfei", "deepseek", "moonshot", "minimax", "baidu", "google", "baai", "funaudiollm", "doubao", "fishaudio", "chatglm", "stabilityai", "netease", "ai360", "anthropic", "meta", "baichuan", "mistral", "openchat", "microsoft", "defog", "nexusflow", "cohere", "huggingface", "lingyiwanwu", "stepfun", "xai", "doc2x", "jina" ], "x-enum-varnames": [ "ModelOwnerOpenAI", "ModelOwnerAlibaba", "ModelOwnerTencent", "ModelOwnerXunfei", "ModelOwnerDeepSeek", "ModelOwnerMoonshot", "ModelOwnerMiniMax", "ModelOwnerBaidu", "ModelOwnerGoogle", "ModelOwnerBAAI", "ModelOwnerFunAudioLLM", "ModelOwnerDoubao", "ModelOwnerFishAudio", "ModelOwnerChatGLM", "ModelOwnerStabilityAI", "ModelOwnerNetease", "ModelOwnerAI360", "ModelOwnerAnthropic", "ModelOwnerMeta", "ModelOwnerBaichuan", "ModelOwnerMistral", "ModelOwnerOpenChat", "ModelOwnerMicrosoft", "ModelOwnerDefog", "ModelOwnerNexusFlow", "ModelOwnerCohere", "ModelOwnerHuggingFace", "ModelOwnerLingyiWanwu", "ModelOwnerStepFun", "ModelOwnerXAI", "ModelOwnerDoc2x", "ModelOwnerJina" ] }, "model.Option": { "type": "object", "properties": { "key": { "type": "string" }, "value": { "type": "string" } } }, "model.OutputContent": { "type": "object", "properties": { "annotations": { "type": "array", "items": {} }, "text": { "type": "string" }, "type": { "type": "string" } } }, "model.OutputItem": { "type": "object", "properties": { "arguments": { "description": "For function_call type", "type": "string" }, "call_id": { "description": "For function_call type", "type": "string" }, "content": { "type": "array", "items": { "$ref": "#/definitions/model.OutputContent" } }, "id": { "type": "string" }, "name": { "description": "For function_call type", "type": "string" }, "role": { "type": "string" }, "status": { "$ref": "#/definitions/model.ResponseStatus" }, "summary": { "description": "For reasoning type", "type": "array", "items": { "type": "string" } }, "type": { "type": "string" } } }, "model.Params": { "type": "object", "additionalProperties": { "type": "string" } }, "model.ParsePdfResponse": { "type": "object", "properties": { "markdown": { "type": "string" }, "pages": { "type": "integer" } } }, "model.Price": { "type": "object", "properties": { "audio_input_price": { "type": "number" }, "audio_input_price_unit": { "type": "integer" }, "cache_creation_price": { "type": "number" }, "cache_creation_price_unit": { "type": "integer" }, "cached_price": { "type": "number" }, "cached_price_unit": { "type": "integer" }, "conditional_prices": { "type": "array", "items": { "$ref": "#/definitions/model.ConditionalPrice" } }, "image_input_price": { "type": "number" }, "image_input_price_unit": { "type": "integer" }, "input_price": { "type": "number" }, "input_price_unit": { "type": "integer" }, "output_price": { "type": "number" }, "output_price_unit": { "type": "integer" }, "per_request_price": { "type": "number" }, "thinking_mode_output_price": { "description": "when ThinkingModeOutputPrice and ReasoningTokens are not 0, OutputPrice and OutputPriceUnit\nwill be overwritten", "type": "number" }, "thinking_mode_output_price_unit": { "type": "integer" }, "web_search_price": { "type": "number" }, "web_search_price_unit": { "type": "integer" } } }, "model.PriceCondition": { "type": "object", "properties": { "end_time": { "description": "Unix timestamp, 0 means no end limit", "type": "integer" }, "input_token_max": { "type": "integer" }, "input_token_min": { "type": "integer" }, "output_token_max": { "type": "integer" }, "output_token_min": { "type": "integer" }, "start_time": { "description": "Unix timestamp, 0 means no start limit", "type": "integer" } } }, "model.PromptTokensDetails": { "type": "object", "properties": { "audio_tokens": { "type": "integer" }, "cache_creation_tokens": { "type": "integer" }, "cached_tokens": { "type": "integer" } } }, "model.ProxyParamType": { "type": "string", "enum": [ "url", "header", "query" ], "x-enum-varnames": [ "ParamTypeURL", "ParamTypeHeader", "ParamTypeQuery" ] }, "model.PublicMCP": { "type": "object", "properties": { "created_at": { "type": "string" }, "description": { "type": "string" }, "description_cn": { "type": "string" }, "embed_config": { "$ref": "#/definitions/model.MCPEmbeddingConfig" }, "github_url": { "type": "string" }, "id": { "type": "string" }, "logo_url": { "type": "string" }, "name": { "type": "string" }, "name_cn": { "type": "string" }, "openapi_config": { "$ref": "#/definitions/model.MCPOpenAPIConfig" }, "price": { "$ref": "#/definitions/model.MCPPrice" }, "proxy_config": { "$ref": "#/definitions/model.PublicMCPProxyConfig" }, "readme": { "type": "string" }, "readme_cn": { "type": "string" }, "readme_cn_url": { "type": "string" }, "readme_url": { "type": "string" }, "status": { "$ref": "#/definitions/model.PublicMCPStatus" }, "tags": { "type": "array", "items": { "type": "string" } }, "test_config": { "description": "only used by list tools", "allOf": [ { "$ref": "#/definitions/model.TestConfig" } ] }, "type": { "$ref": "#/definitions/model.PublicMCPType" }, "update_at": { "type": "string" } } }, "model.PublicMCPProxyConfig": { "type": "object", "properties": { "headers": { "type": "object", "additionalProperties": { "type": "string" } }, "querys": { "type": "object", "additionalProperties": { "type": "string" } }, "reusing": { "type": "object", "additionalProperties": { "$ref": "#/definitions/model.PublicMCPProxyReusingParam" } }, "url": { "type": "string" } } }, "model.PublicMCPProxyReusingParam": { "type": "object", "properties": { "description": { "type": "string" }, "name": { "type": "string" }, "required": { "type": "boolean" }, "type": { "$ref": "#/definitions/model.ProxyParamType" } } }, "model.PublicMCPReusingParam": { "type": "object", "properties": { "created_at": { "type": "string" }, "group_id": { "type": "string" }, "mcp_id": { "type": "string" }, "params": { "$ref": "#/definitions/model.Params" }, "update_at": { "type": "string" } } }, "model.PublicMCPStatus": { "type": "integer", "enum": [ 1, 2 ], "x-enum-varnames": [ "PublicMCPStatusEnabled", "PublicMCPStatusDisabled" ] }, "model.PublicMCPType": { "type": "string", "enum": [ "mcp_proxy_sse", "mcp_proxy_streamable", "mcp_docs", "mcp_openapi", "mcp_embed" ], "x-enum-comments": { "PublicMCPTypeDocs": "read only" }, "x-enum-descriptions": [ "", "", "read only", "", "" ], "x-enum-varnames": [ "PublicMCPTypeProxySSE", "PublicMCPTypeProxyStreamable", "PublicMCPTypeDocs", "PublicMCPTypeOpenAPI", "PublicMCPTypeEmbed" ] }, "model.RequestDetail": { "type": "object", "properties": { "id": { "type": "integer" }, "log_id": { "type": "integer" }, "request_body": { "type": "string" }, "request_body_truncated": { "type": "boolean" }, "response_body": { "type": "string" }, "response_body_truncated": { "type": "boolean" } } }, "model.RerankMeta": { "type": "object", "properties": { "model": { "type": "string" }, "tokens": { "$ref": "#/definitions/model.RerankMetaTokens" } } }, "model.RerankMetaTokens": { "type": "object", "properties": { "input_tokens": { "type": "integer" }, "output_tokens": { "type": "integer" } } }, "model.RerankRequest": { "type": "object", "properties": { "documents": { "type": "array", "items": { "type": "string" } }, "max_chunks_per_doc": { "type": "integer" }, "model": { "type": "string" }, "overlap_tokens": { "type": "integer" }, "query": { "type": "string" }, "return_documents": { "type": "boolean" }, "top_n": { "type": "integer" } } }, "model.RerankResponse": { "type": "object", "properties": { "id": { "type": "string" }, "meta": { "$ref": "#/definitions/model.RerankMeta" }, "results": { "type": "array", "items": { "$ref": "#/definitions/model.RerankResult" } } } }, "model.RerankResult": { "type": "object", "properties": { "document": { "$ref": "#/definitions/model.Document" }, "index": { "type": "integer" }, "relevance_score": { "type": "number" } } }, "model.Response": { "type": "object", "properties": { "created_at": { "type": "integer" }, "error": { "$ref": "#/definitions/model.ResponseError" }, "id": { "type": "string" }, "incomplete_details": { "$ref": "#/definitions/model.IncompleteDetails" }, "instructions": { "type": "string" }, "max_output_tokens": { "type": "integer" }, "metadata": { "type": "object", "additionalProperties": {} }, "model": { "type": "string" }, "object": { "type": "string" }, "output": { "type": "array", "items": { "$ref": "#/definitions/model.OutputItem" } }, "parallel_tool_calls": { "type": "boolean" }, "previous_response_id": { "type": "string" }, "reasoning": { "$ref": "#/definitions/model.ResponseReasoning" }, "status": { "$ref": "#/definitions/model.ResponseStatus" }, "store": { "type": "boolean" }, "temperature": { "type": "number" }, "text": { "$ref": "#/definitions/model.ResponseText" }, "tool_choice": {}, "tools": { "type": "array", "items": { "$ref": "#/definitions/model.ResponseTool" } }, "top_p": { "type": "number" }, "truncation": { "type": "string" }, "usage": { "$ref": "#/definitions/model.ResponseUsage" }, "user": { "type": "string" } } }, "model.ResponseError": { "type": "object", "properties": { "code": { "type": "string" }, "message": { "type": "string" } } }, "model.ResponseFormat": { "type": "object", "properties": { "json_schema": { "$ref": "#/definitions/model.JSONSchema" }, "type": { "type": "string" } } }, "model.ResponseReasoning": { "type": "object", "properties": { "effort": { "type": "string" }, "summary": { "type": "string" } } }, "model.ResponseStatus": { "type": "string", "enum": [ "in_progress", "completed", "failed", "incomplete", "cancelled" ], "x-enum-varnames": [ "ResponseStatusInProgress", "ResponseStatusCompleted", "ResponseStatusFailed", "ResponseStatusIncomplete", "ResponseStatusCancelled" ] }, "model.ResponseText": { "type": "object", "properties": { "format": { "$ref": "#/definitions/model.ResponseTextFormat" } } }, "model.ResponseTextFormat": { "type": "object", "properties": { "type": { "type": "string" } } }, "model.ResponseTool": { "type": "object", "properties": { "description": { "type": "string" }, "name": { "type": "string" }, "parameters": {}, "type": { "type": "string" } } }, "model.ResponseUsage": { "type": "object", "properties": { "input_tokens": { "type": "integer" }, "input_tokens_details": { "$ref": "#/definitions/model.ResponseUsageDetails" }, "output_tokens": { "type": "integer" }, "output_tokens_details": { "$ref": "#/definitions/model.ResponseUsageDetails" }, "total_tokens": { "type": "integer" } } }, "model.ResponseUsageDetails": { "type": "object", "properties": { "cached_tokens": { "type": "integer" }, "reasoning_tokens": { "type": "integer" } } }, "model.ReusingParam": { "type": "object", "properties": { "description": { "type": "string" }, "name": { "type": "string" }, "required": { "type": "boolean" } } }, "model.StreamOptions": { "type": "object", "properties": { "include_usage": { "type": "boolean" } } }, "model.SttJSONResponse": { "type": "object", "properties": { "text": { "type": "string" } } }, "model.SummaryDataV2": { "type": "object", "properties": { "audio_input_tokens": { "type": "integer" }, "cache_creation_tokens": { "type": "integer" }, "cached_tokens": { "type": "integer" }, "channel_id": { "type": "integer" }, "exception_count": { "type": "integer" }, "group_id": { "type": "string" }, "image_input_tokens": { "type": "integer" }, "input_tokens": { "type": "integer" }, "max_rpm": { "type": "integer" }, "max_tpm": { "type": "integer" }, "model": { "type": "string" }, "output_tokens": { "type": "integer" }, "reasoning_tokens": { "type": "integer" }, "request_count": { "type": "integer" }, "retry_count": { "type": "integer" }, "status_400_count": { "type": "integer" }, "status_429_count": { "type": "integer" }, "status_4xx_count": { "type": "integer" }, "status_500_count": { "type": "integer" }, "status_5xx_count": { "type": "integer" }, "timestamp": { "type": "integer" }, "token_name": { "type": "string" }, "total_time_milliseconds": { "type": "integer" }, "total_tokens": { "type": "integer" }, "total_ttfb_milliseconds": { "type": "integer" }, "used_amount": { "type": "number" }, "web_search_count": { "type": "integer" } } }, "model.TestConfig": { "type": "object", "properties": { "enabled": { "type": "boolean" }, "params": { "$ref": "#/definitions/model.Params" } } }, "model.TextResponse": { "type": "object", "properties": { "choices": { "type": "array", "items": { "$ref": "#/definitions/model.TextResponseChoice" } }, "created": { "type": "integer" }, "id": { "type": "string" }, "model": { "type": "string" }, "object": { "type": "string" }, "usage": { "$ref": "#/definitions/model.ChatUsage" } } }, "model.TextResponseChoice": { "type": "object", "properties": { "finish_reason": { "$ref": "#/definitions/model.FinishReason" }, "index": { "type": "integer" }, "message": { "$ref": "#/definitions/model.Message" }, "text": { "type": "string" } } }, "model.TextToSpeechRequest": { "type": "object", "required": [ "input", "model", "voice" ], "properties": { "input": { "type": "string" }, "model": { "type": "string" }, "response_format": { "type": "string" }, "speed": { "type": "number" }, "stream_format": { "type": "string" }, "voice": { "type": "string" } } }, "model.TimeSummaryDataV2": { "type": "object", "properties": { "summary": { "type": "array", "items": { "$ref": "#/definitions/model.SummaryDataV2" } }, "timestamp": { "type": "integer" } } }, "model.TimeoutConfig": { "type": "object", "properties": { "request_timeout": { "type": "integer" }, "stream_request_timeout": { "type": "integer" } } }, "model.Tool": { "type": "object", "properties": { "function": { "$ref": "#/definitions/model.Function" }, "type": { "type": "string" } } }, "model.ToolCall": { "type": "object", "properties": { "extra_content": { "$ref": "#/definitions/model.ExtraContent" }, "function": { "$ref": "#/definitions/model.Function" }, "id": { "type": "string" }, "index": { "type": "integer" }, "type": { "type": "string" } } }, "model.UpdateGroupRequest": { "type": "object", "properties": { "available_sets": { "type": "array", "items": { "type": "string" } }, "balance_alert_enabled": { "type": "boolean" }, "balance_alert_threshold": { "type": "number" }, "rpm_ratio": { "type": "number" }, "status": { "type": "integer" }, "tpm_ratio": { "type": "number" } } }, "model.UpdateTokenRequest": { "type": "object", "properties": { "models": { "type": "array", "items": { "type": "string" } }, "name": { "type": "string" }, "period_last_update_time": { "type": "integer" }, "period_quota": { "type": "number" }, "period_type": { "type": "string" }, "quota": { "description": "Quota system", "type": "number" }, "status": { "type": "integer" }, "subnets": { "type": "array", "items": { "type": "string" } } } }, "model.Usage": { "type": "object", "properties": { "audio_input_tokens": { "type": "integer" }, "cache_creation_tokens": { "type": "integer" }, "cached_tokens": { "type": "integer" }, "image_input_tokens": { "type": "integer" }, "input_tokens": { "type": "integer" }, "output_tokens": { "type": "integer" }, "reasoning_tokens": { "type": "integer" }, "total_tokens": { "type": "integer" }, "web_search_count": { "type": "integer" } } }, "model.VideoGenerationJob": { "type": "object", "properties": { "created_at": { "type": "integer" }, "expires_at": { "type": "integer" }, "finish_reason": { "type": "string" }, "finished_at": { "type": "integer" }, "generations": { "type": "array", "items": { "$ref": "#/definitions/model.VideoGenerations" } }, "height": { "type": "integer" }, "id": { "type": "string" }, "model": { "type": "string" }, "n_seconds": { "type": "integer" }, "n_variants": { "type": "integer" }, "object": { "type": "string" }, "prompt": { "type": "string" }, "status": { "$ref": "#/definitions/model.VideoGenerationJobStatus" }, "width": { "type": "integer" } } }, "model.VideoGenerationJobRequest": { "type": "object", "properties": { "height": { "type": "integer" }, "model": { "type": "string" }, "n_seconds": { "type": "integer" }, "n_variants": { "type": "integer" }, "prompt": { "type": "string" }, "width": { "type": "integer" } } }, "model.VideoGenerationJobStatus": { "type": "string", "enum": [ "queued", "processing", "running", "succeeded" ], "x-enum-varnames": [ "VideoGenerationJobStatusQueued", "VideoGenerationJobStatusProcessing", "VideoGenerationJobStatusRunning", "VideoGenerationJobStatusSucceeded" ] }, "model.VideoGenerations": { "type": "object", "properties": { "created_at": { "type": "integer" }, "height": { "type": "integer" }, "id": { "type": "string" }, "job_id": { "type": "string" }, "n_seconds": { "type": "integer" }, "object": { "type": "string" }, "prompt": { "type": "string" }, "width": { "type": "integer" } } }, "openai.SubscriptionResponse": { "type": "object", "properties": { "access_until": { "type": "integer" }, "hard_limit_usd": { "type": "number" }, "has_payment_method": { "type": "boolean" }, "object": { "type": "string" }, "soft_limit_usd": { "type": "number" }, "system_hard_limit_usd": { "type": "number" } } }, "openai.UsageResponse": { "type": "object", "properties": { "object": { "type": "string" }, "total_usage": { "description": "DailyCosts []OpenAIUsageDailyCost ` + "`" + `json:\"daily_costs\"` + "`" + `", "type": "number" } } } }, "securityDefinitions": { "ApiKeyAuth": { "type": "apiKey", "name": "Authorization", "in": "header" } } }` // SwaggerInfo holds exported Swagger Info so clients can modify it var SwaggerInfo = &swag.Spec{ Version: "1.0", Host: "", BasePath: "", Schemes: []string{}, Title: "AI Proxy Swagger API", Description: "", InfoInstanceName: "swagger", SwaggerTemplate: docTemplate, LeftDelim: "{{", RightDelim: "}}", } func init() { swag.Register(SwaggerInfo.InstanceName(), SwaggerInfo) }