{
    "schemes": [],
    "swagger": "2.0",
    "info": {
        "description": "",
        "title": "Qevron Swagger API",
        "contact": {},
        "version": "2.59.1"
    },
    "host": "app.qevron.ai",
    "basePath": "/",
    "paths": {
        "/api/admin/key/rotate": {
            "post": {
                "security": [
                    {
                        "ApiKeyAuth": []
                    }
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "admin"
                ],
                "summary": "Rotate the admin key",
                "responses": {
                    "200": {
                        "description": "OK",
                        "schema": {
                            "$ref": "#/definitions/middleware.APIResponse"
                        }
                    }
                }
            }
        },
        "/api/audit/logs": {
            "get": {
                "security": [
                    {
                        "ApiKeyAuth": []
                    }
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "audit"
                ],
                "summary": "List audit log entries",
                "parameters": [
                    {
                        "type": "string",
                        "description": "Filter by resource_type (e.g. cluster_node)",
                        "name": "resource_type",
                        "in": "query"
                    },
                    {
                        "type": "string",
                        "description": "Filter by resource_id",
                        "name": "resource_id",
                        "in": "query"
                    },
                    {
                        "type": "integer",
                        "description": "Filter by admin_id",
                        "name": "admin_id",
                        "in": "query"
                    },
                    {
                        "type": "string",
                        "description": "Filter by action (CREATE|UPDATE|DELETE)",
                        "name": "action",
                        "in": "query"
                    },
                    {
                        "type": "string",
                        "description": "Only logs after this RFC3339 timestamp",
                        "name": "since",
                        "in": "query"
                    },
                    {
                        "type": "integer",
                        "description": "Max rows (default 100, cap 500)",
                        "name": "limit",
                        "in": "query"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "schema": {
                            "allOf": [
                                {
                                    "$ref": "#/definitions/middleware.APIResponse"
                                },
                                {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "allOf": [
                                                {
                                                    "$ref": "#/definitions/gin.H"
                                                },
                                                {
                                                    "type": "object",
                                                    "properties": {
                                                        "logs": {
                                                            "type": "array",
                                                            "items": {
                                                                "$ref": "#/definitions/model.AuditLog"
                                                            }
                                                        },
                                                        "total": {
                                                            "type": "integer"
                                                        }
                                                    }
                                                }
                                            ]
                                        }
                                    }
                                }
                            ]
                        }
                    }
                }
            }
        },
        "/api/callekit/monitor/cost-stats": {
            "get": {
                "security": [
                    {
                        "ApiKeyAuth": []
                    }
                ],
                "description": "Returns aggregated call statistics for cost estimation",
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "callekit"
                ],
                "summary": "Get call cost statistics",
                "parameters": [
                    {
                        "type": "string",
                        "description": "Filter by team ID",
                        "name": "teamId",
                        "in": "query"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "schema": {
                            "$ref": "#/definitions/middleware.APIResponse"
                        }
                    }
                }
            }
        },
        "/api/capabilities": {
            "get": {
                "tags": [
                    "Capability"
                ],
                "summary": "List capabilities (admin)",
                "responses": {
                    "200": {
                        "description": "OK",
                        "schema": {
                            "allOf": [
                                {
                                    "$ref": "#/definitions/middleware.APIResponse"
                                },
                                {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "array",
                                            "items": {
                                                "$ref": "#/definitions/capability.Capability"
                                            }
                                        }
                                    }
                                }
                            ]
                        }
                    }
                }
            }
        },
        "/api/capabilities/status": {
            "get": {
                "tags": [
                    "Capability"
                ],
                "summary": "Capability status aggregate (admin)",
                "responses": {
                    "200": {
                        "description": "OK",
                        "schema": {
                            "allOf": [
                                {
                                    "$ref": "#/definitions/middleware.APIResponse"
                                },
                                {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "array",
                                            "items": {
                                                "$ref": "#/definitions/controller.CapabilityStatus"
                                            }
                                        }
                                    }
                                }
                            ]
                        }
                    }
                }
            }
        },
        "/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"
                                        }
                                    }
                                }
                            ]
                        }
                    }
                }
            }
        },
        "/api/channel/{id}/custom_test": {
            "post": {
                "security": [
                    {
                        "ApiKeyAuth": []
                    }
                ],
                "description": "The caller supplies the raw upstream JSON body; the result is appended to test history with source=\"custom\".",
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "channel"
                ],
                "summary": "Run a custom-payload test against one model",
                "parameters": [
                    {
                        "type": "integer",
                        "description": "Channel ID",
                        "name": "id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "description": "Custom test payload",
                        "name": "body",
                        "in": "body",
                        "required": true,
                        "schema": {
                            "$ref": "#/definitions/controller.CustomTestRequest"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "schema": {
                            "allOf": [
                                {
                                    "$ref": "#/definitions/middleware.APIResponse"
                                },
                                {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "$ref": "#/definitions/model.ChannelTest"
                                        }
                                    }
                                }
                            ]
                        }
                    }
                }
            }
        },
        "/api/channel/{id}/custom_test_multipart": {
            "post": {
                "security": [
                    {
                        "ApiKeyAuth": []
                    }
                ],
                "description": "Accepts multipart/form-data. The `model` form field selects the model; every other field is forwarded as-is. Used for images.edits and audio.transcriptions/translations.",
                "consumes": [
                    "multipart/form-data"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "channel"
                ],
                "summary": "Run a custom multipart/form-data test against one model",
                "parameters": [
                    {
                        "type": "integer",
                        "description": "Channel ID",
                        "name": "id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "type": "string",
                        "description": "Model name",
                        "name": "model",
                        "in": "formData",
                        "required": true
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "schema": {
                            "allOf": [
                                {
                                    "$ref": "#/definitions/middleware.APIResponse"
                                },
                                {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "$ref": "#/definitions/model.ChannelTest"
                                        }
                                    }
                                }
                            ]
                        }
                    }
                }
            }
        },
        "/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}/tests": {
            "get": {
                "security": [
                    {
                        "ApiKeyAuth": []
                    }
                ],
                "description": "Returns the latest stored test result for each model that has ever been tested against the given channel.",
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "channel"
                ],
                "summary": "List recent channel test results",
                "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": {
                                                "$ref": "#/definitions/model.ChannelTest"
                                            }
                                        }
                                    }
                                }
                            ]
                        }
                    }
                }
            }
        },
        "/api/channel/{id}/tests/history": {
            "get": {
                "security": [
                    {
                        "ApiKeyAuth": []
                    }
                ],
                "description": "Returns up to `limit` test results for the given channel (and optionally a specific model), newest first.",
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "channel"
                ],
                "summary": "Paginated test history for a channel",
                "parameters": [
                    {
                        "type": "integer",
                        "description": "Channel ID",
                        "name": "id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "type": "string",
                        "description": "Filter by model name",
                        "name": "model",
                        "in": "query"
                    },
                    {
                        "type": "integer",
                        "description": "Max rows (default 50, max 200)",
                        "name": "limit",
                        "in": "query"
                    },
                    {
                        "type": "integer",
                        "description": "Unix-millis cutoff — newest test included is older than this",
                        "name": "before",
                        "in": "query"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "schema": {
                            "allOf": [
                                {
                                    "$ref": "#/definitions/middleware.APIResponse"
                                },
                                {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "array",
                                            "items": {
                                                "$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": {
                                                "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 (currently disabled - MongoDB backend does not support direct SQL import)",
                "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/samples/{type}": {
            "get": {
                "security": [
                    {
                        "ApiKeyAuth": []
                    }
                ],
                "description": "Returns curl + JSON snippets shaped for qevron's OpenAI-compatible endpoint. Pass `?model=` to substitute the actual model name; otherwise the first builtin model of the adaptor is used.",
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "channels"
                ],
                "summary": "Get a copy-paste sample request for a channel type",
                "parameters": [
                    {
                        "type": "integer",
                        "description": "Channel type ID",
                        "name": "type",
                        "in": "path",
                        "required": true
                    },
                    {
                        "type": "string",
                        "description": "Model name override",
                        "name": "model",
                        "in": "query"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "schema": {
                            "allOf": [
                                {
                                    "$ref": "#/definitions/middleware.APIResponse"
                                },
                                {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "$ref": "#/definitions/samples.Samples"
                                        }
                                    }
                                }
                            ]
                        }
                    }
                }
            }
        },
        "/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": {
                                                "type": "object",
                                                "properties": {
                                                    "channels": {
                                                        "type": "array",
                                                        "items": {
                                                            "$ref": "#/definitions/model.Channel"
                                                        }
                                                    },
                                                    "total": {
                                                        "type": "integer"
                                                    }
                                                }
                                            }
                                        }
                                    }
                                }
                            ]
                        }
                    }
                }
            }
        },
        "/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/cluster/assignments": {
            "get": {
                "security": [
                    {
                        "ApiKeyAuth": []
                    }
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "cluster"
                ],
                "summary": "List channel→model→server assignments",
                "parameters": [
                    {
                        "type": "integer",
                        "description": "Filter by channel id",
                        "name": "channel_id",
                        "in": "query"
                    },
                    {
                        "type": "integer",
                        "description": "Filter by node id",
                        "name": "node_id",
                        "in": "query"
                    },
                    {
                        "type": "string",
                        "description": "Filter by model name",
                        "name": "model_name",
                        "in": "query"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "schema": {
                            "allOf": [
                                {
                                    "$ref": "#/definitions/middleware.APIResponse"
                                },
                                {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "allOf": [
                                                {
                                                    "$ref": "#/definitions/gin.H"
                                                },
                                                {
                                                    "type": "object",
                                                    "properties": {
                                                        "assignments": {
                                                            "type": "array",
                                                            "items": {
                                                                "$ref": "#/definitions/model.ClusterAssignment"
                                                            }
                                                        },
                                                        "total": {
                                                            "type": "integer"
                                                        }
                                                    }
                                                }
                                            ]
                                        }
                                    }
                                }
                            ]
                        }
                    }
                }
            },
            "post": {
                "security": [
                    {
                        "ApiKeyAuth": []
                    }
                ],
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "cluster"
                ],
                "summary": "Create a channel→model→server assignment",
                "parameters": [
                    {
                        "description": "Assignment",
                        "name": "body",
                        "in": "body",
                        "required": true,
                        "schema": {
                            "$ref": "#/definitions/controller.ClusterAssignmentRequest"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "schema": {
                            "allOf": [
                                {
                                    "$ref": "#/definitions/middleware.APIResponse"
                                },
                                {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "$ref": "#/definitions/model.ClusterAssignment"
                                        }
                                    }
                                }
                            ]
                        }
                    }
                }
            }
        },
        "/api/cluster/assignments/bulk-move": {
            "post": {
                "security": [
                    {
                        "ApiKeyAuth": []
                    }
                ],
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "cluster"
                ],
                "summary": "Move multiple assignments to the same target server",
                "parameters": [
                    {
                        "description": "Bulk move target",
                        "name": "body",
                        "in": "body",
                        "required": true,
                        "schema": {
                            "$ref": "#/definitions/controller.BulkMoveAssignmentRequest"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "schema": {
                            "allOf": [
                                {
                                    "$ref": "#/definitions/middleware.APIResponse"
                                },
                                {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "$ref": "#/definitions/controller.BulkMoveAssignmentResponse"
                                        }
                                    }
                                }
                            ]
                        }
                    }
                }
            }
        },
        "/api/cluster/assignments/{id}": {
            "put": {
                "security": [
                    {
                        "ApiKeyAuth": []
                    }
                ],
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "cluster"
                ],
                "summary": "Update assignment",
                "parameters": [
                    {
                        "type": "integer",
                        "description": "Assignment ID",
                        "name": "id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "description": "Assignment",
                        "name": "body",
                        "in": "body",
                        "required": true,
                        "schema": {
                            "$ref": "#/definitions/controller.ClusterAssignmentRequest"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "schema": {
                            "allOf": [
                                {
                                    "$ref": "#/definitions/middleware.APIResponse"
                                },
                                {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "$ref": "#/definitions/model.ClusterAssignment"
                                        }
                                    }
                                }
                            ]
                        }
                    }
                }
            },
            "delete": {
                "security": [
                    {
                        "ApiKeyAuth": []
                    }
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "cluster"
                ],
                "summary": "Delete assignment",
                "parameters": [
                    {
                        "type": "integer",
                        "description": "Assignment ID",
                        "name": "id",
                        "in": "path",
                        "required": true
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "schema": {
                            "$ref": "#/definitions/middleware.APIResponse"
                        }
                    }
                }
            }
        },
        "/api/cluster/assignments/{id}/control": {
            "post": {
                "security": [
                    {
                        "ApiKeyAuth": []
                    }
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "cluster"
                ],
                "summary": "Start/stop/restart the runtime backing an assignment",
                "parameters": [
                    {
                        "type": "integer",
                        "description": "Assignment ID",
                        "name": "id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "type": "string",
                        "description": "start|stop|restart",
                        "name": "action",
                        "in": "query",
                        "required": true
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "schema": {
                            "$ref": "#/definitions/middleware.APIResponse"
                        }
                    }
                }
            }
        },
        "/api/cluster/assignments/{id}/deploy": {
            "post": {
                "security": [
                    {
                        "ApiKeyAuth": []
                    }
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "cluster"
                ],
                "summary": "Deploy a runtime's systemd unit onto the assignment's node",
                "parameters": [
                    {
                        "type": "integer",
                        "description": "Assignment ID",
                        "name": "id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "type": "boolean",
                        "description": "Start the unit immediately",
                        "name": "start_now",
                        "in": "query"
                    },
                    {
                        "type": "boolean",
                        "description": "Enable the unit (default true)",
                        "name": "enable_now",
                        "in": "query"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "schema": {
                            "$ref": "#/definitions/middleware.APIResponse"
                        }
                    }
                }
            },
            "delete": {
                "security": [
                    {
                        "ApiKeyAuth": []
                    }
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "cluster"
                ],
                "summary": "Remove a runtime's systemd unit from the assignment's node",
                "parameters": [
                    {
                        "type": "integer",
                        "description": "Assignment ID",
                        "name": "id",
                        "in": "path",
                        "required": true
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "schema": {
                            "$ref": "#/definitions/middleware.APIResponse"
                        }
                    }
                }
            }
        },
        "/api/cluster/assignments/{id}/logs": {
            "get": {
                "security": [
                    {
                        "ApiKeyAuth": []
                    }
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "cluster"
                ],
                "summary": "Fetch journalctl tail for the runtime backing an assignment",
                "parameters": [
                    {
                        "type": "integer",
                        "description": "Assignment ID",
                        "name": "id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "type": "integer",
                        "description": "Number of lines (default 100, max 1000)",
                        "name": "tail",
                        "in": "query"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "schema": {
                            "$ref": "#/definitions/middleware.APIResponse"
                        }
                    }
                }
            }
        },
        "/api/cluster/assignments/{id}/logs/stream": {
            "get": {
                "security": [
                    {
                        "ApiKeyAuth": []
                    }
                ],
                "produces": [
                    "text/event-stream"
                ],
                "tags": [
                    "cluster"
                ],
                "summary": "Stream live journal output for an assignment's runtime",
                "parameters": [
                    {
                        "type": "integer",
                        "description": "Assignment ID",
                        "name": "id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "type": "integer",
                        "description": "Initial backlog lines (default 50, max 200)",
                        "name": "tail",
                        "in": "query"
                    }
                ],
                "responses": {}
            }
        },
        "/api/cluster/assignments/{id}/logs/ticket": {
            "post": {
                "security": [
                    {
                        "ApiKeyAuth": []
                    }
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "cluster"
                ],
                "summary": "Issue a single-use ticket for an assignment's logs stream",
                "parameters": [
                    {
                        "type": "integer",
                        "description": "Assignment ID",
                        "name": "id",
                        "in": "path",
                        "required": true
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "schema": {
                            "$ref": "#/definitions/middleware.APIResponse"
                        }
                    }
                }
            }
        },
        "/api/cluster/assignments/{id}/move": {
            "post": {
                "security": [
                    {
                        "ApiKeyAuth": []
                    }
                ],
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "cluster"
                ],
                "summary": "Move an assignment's runtime to a different server",
                "parameters": [
                    {
                        "type": "integer",
                        "description": "Assignment ID",
                        "name": "id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "description": "Move target",
                        "name": "body",
                        "in": "body",
                        "required": true,
                        "schema": {
                            "$ref": "#/definitions/controller.MoveAssignmentRequest"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "schema": {
                            "allOf": [
                                {
                                    "$ref": "#/definitions/middleware.APIResponse"
                                },
                                {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "$ref": "#/definitions/controller.MoveAssignmentResponse"
                                        }
                                    }
                                }
                            ]
                        }
                    }
                }
            }
        },
        "/api/cluster/assignments/{id}/service-status": {
            "get": {
                "security": [
                    {
                        "ApiKeyAuth": []
                    }
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "cluster"
                ],
                "summary": "Fetch live systemd status for an assignment",
                "parameters": [
                    {
                        "type": "integer",
                        "description": "Assignment ID",
                        "name": "id",
                        "in": "path",
                        "required": true
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "schema": {
                            "$ref": "#/definitions/middleware.APIResponse"
                        }
                    }
                }
            }
        },
        "/api/cluster/credentials": {
            "get": {
                "security": [
                    {
                        "ApiKeyAuth": []
                    }
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "cluster"
                ],
                "summary": "List SSH credentials across the cluster",
                "responses": {
                    "200": {
                        "description": "OK",
                        "schema": {
                            "allOf": [
                                {
                                    "$ref": "#/definitions/middleware.APIResponse"
                                },
                                {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "allOf": [
                                                {
                                                    "$ref": "#/definitions/gin.H"
                                                },
                                                {
                                                    "type": "object",
                                                    "properties": {
                                                        "credentials": {
                                                            "type": "array",
                                                            "items": {
                                                                "$ref": "#/definitions/model.SSHCredential"
                                                            }
                                                        },
                                                        "encryption_configured": {
                                                            "type": "boolean"
                                                        },
                                                        "total": {
                                                            "type": "integer"
                                                        }
                                                    }
                                                }
                                            ]
                                        }
                                    }
                                }
                            ]
                        }
                    }
                }
            }
        },
        "/api/cluster/gpus": {
            "get": {
                "security": [
                    {
                        "ApiKeyAuth": []
                    }
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "cluster"
                ],
                "summary": "List GPUs across all cluster nodes",
                "responses": {
                    "200": {
                        "description": "OK",
                        "schema": {
                            "allOf": [
                                {
                                    "$ref": "#/definitions/middleware.APIResponse"
                                },
                                {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "allOf": [
                                                {
                                                    "$ref": "#/definitions/gin.H"
                                                },
                                                {
                                                    "type": "object",
                                                    "properties": {
                                                        "gpus": {
                                                            "type": "array",
                                                            "items": {
                                                                "$ref": "#/definitions/controller.GPUView"
                                                            }
                                                        },
                                                        "total": {
                                                            "type": "integer"
                                                        }
                                                    }
                                                }
                                            ]
                                        }
                                    }
                                }
                            ]
                        }
                    }
                }
            }
        },
        "/api/cluster/health": {
            "get": {
                "security": [
                    {
                        "ApiKeyAuth": []
                    }
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "cluster"
                ],
                "summary": "Cluster-wide health overview",
                "responses": {
                    "200": {
                        "description": "OK",
                        "schema": {
                            "$ref": "#/definitions/middleware.APIResponse"
                        }
                    }
                }
            }
        },
        "/api/cluster/nodes": {
            "get": {
                "security": [
                    {
                        "ApiKeyAuth": []
                    }
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "cluster"
                ],
                "summary": "List cluster nodes",
                "responses": {
                    "200": {
                        "description": "OK",
                        "schema": {
                            "allOf": [
                                {
                                    "$ref": "#/definitions/middleware.APIResponse"
                                },
                                {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "allOf": [
                                                {
                                                    "$ref": "#/definitions/gin.H"
                                                },
                                                {
                                                    "type": "object",
                                                    "properties": {
                                                        "nodes": {
                                                            "type": "array",
                                                            "items": {
                                                                "$ref": "#/definitions/model.ClusterNode"
                                                            }
                                                        },
                                                        "total": {
                                                            "type": "integer"
                                                        }
                                                    }
                                                }
                                            ]
                                        }
                                    }
                                }
                            ]
                        }
                    }
                }
            },
            "post": {
                "security": [
                    {
                        "ApiKeyAuth": []
                    }
                ],
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "cluster"
                ],
                "summary": "Create a cluster node",
                "parameters": [
                    {
                        "description": "Node",
                        "name": "body",
                        "in": "body",
                        "required": true,
                        "schema": {
                            "$ref": "#/definitions/controller.ClusterNodeRequest"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "schema": {
                            "allOf": [
                                {
                                    "$ref": "#/definitions/middleware.APIResponse"
                                },
                                {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "$ref": "#/definitions/model.ClusterNode"
                                        }
                                    }
                                }
                            ]
                        }
                    }
                }
            }
        },
        "/api/cluster/nodes/{id}": {
            "get": {
                "security": [
                    {
                        "ApiKeyAuth": []
                    }
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "cluster"
                ],
                "summary": "Get a cluster node by ID",
                "parameters": [
                    {
                        "type": "integer",
                        "description": "Node ID",
                        "name": "id",
                        "in": "path",
                        "required": true
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "schema": {
                            "allOf": [
                                {
                                    "$ref": "#/definitions/middleware.APIResponse"
                                },
                                {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "$ref": "#/definitions/model.ClusterNode"
                                        }
                                    }
                                }
                            ]
                        }
                    }
                }
            },
            "put": {
                "security": [
                    {
                        "ApiKeyAuth": []
                    }
                ],
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "cluster"
                ],
                "summary": "Update a cluster node",
                "parameters": [
                    {
                        "type": "integer",
                        "description": "Node ID",
                        "name": "id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "description": "Node",
                        "name": "body",
                        "in": "body",
                        "required": true,
                        "schema": {
                            "$ref": "#/definitions/controller.ClusterNodeRequest"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "schema": {
                            "allOf": [
                                {
                                    "$ref": "#/definitions/middleware.APIResponse"
                                },
                                {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "$ref": "#/definitions/model.ClusterNode"
                                        }
                                    }
                                }
                            ]
                        }
                    }
                }
            },
            "delete": {
                "security": [
                    {
                        "ApiKeyAuth": []
                    }
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "cluster"
                ],
                "summary": "Soft-delete a cluster node",
                "parameters": [
                    {
                        "type": "integer",
                        "description": "Node ID",
                        "name": "id",
                        "in": "path",
                        "required": true
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "schema": {
                            "$ref": "#/definitions/middleware.APIResponse"
                        }
                    }
                }
            }
        },
        "/api/cluster/nodes/{id}/agent-token": {
            "post": {
                "security": [
                    {
                        "ApiKeyAuth": []
                    }
                ],
                "description": "Generates a 32-byte random bearer token, stores it AES-GCM\nencrypted on the node, and returns the plaintext exactly once.",
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "cluster"
                ],
                "summary": "Issue or rotate the agent bearer token for a node",
                "parameters": [
                    {
                        "type": "integer",
                        "description": "Node ID",
                        "name": "id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "description": "Optional endpoint/token override",
                        "name": "body",
                        "in": "body",
                        "schema": {
                            "$ref": "#/definitions/controller.AgentTokenRequest"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "schema": {
                            "$ref": "#/definitions/middleware.APIResponse"
                        }
                    }
                }
            },
            "delete": {
                "security": [
                    {
                        "ApiKeyAuth": []
                    }
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "cluster"
                ],
                "summary": "Revoke the agent token and revert collector to SSH",
                "parameters": [
                    {
                        "type": "integer",
                        "description": "Node ID",
                        "name": "id",
                        "in": "path",
                        "required": true
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "schema": {
                            "$ref": "#/definitions/middleware.APIResponse"
                        }
                    }
                }
            }
        },
        "/api/cluster/nodes/{id}/agent-token/test": {
            "post": {
                "security": [
                    {
                        "ApiKeyAuth": []
                    }
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "cluster"
                ],
                "summary": "Test the stored agent token against the live agent endpoint",
                "parameters": [
                    {
                        "type": "integer",
                        "description": "Node ID",
                        "name": "id",
                        "in": "path",
                        "required": true
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "schema": {
                            "$ref": "#/definitions/middleware.APIResponse"
                        }
                    }
                }
            }
        },
        "/api/cluster/nodes/{id}/agent/install": {
            "post": {
                "security": [
                    {
                        "ApiKeyAuth": []
                    }
                ],
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "cluster"
                ],
                "summary": "Install qevron-agent on a node via SSH",
                "parameters": [
                    {
                        "type": "integer",
                        "description": "Node ID",
                        "name": "id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "description": "Optional override",
                        "name": "body",
                        "in": "body",
                        "schema": {
                            "$ref": "#/definitions/controller.AgentInstallRequest"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "schema": {
                            "$ref": "#/definitions/middleware.APIResponse"
                        }
                    }
                }
            }
        },
        "/api/cluster/nodes/{id}/collect": {
            "post": {
                "security": [
                    {
                        "ApiKeyAuth": []
                    }
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "cluster"
                ],
                "summary": "Trigger SSH metric collection for a node",
                "parameters": [
                    {
                        "type": "integer",
                        "description": "Node ID",
                        "name": "id",
                        "in": "path",
                        "required": true
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "schema": {
                            "$ref": "#/definitions/middleware.APIResponse"
                        }
                    }
                }
            }
        },
        "/api/cluster/nodes/{id}/credential": {
            "get": {
                "security": [
                    {
                        "ApiKeyAuth": []
                    }
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "cluster"
                ],
                "summary": "Get SSH credential metadata for a node",
                "parameters": [
                    {
                        "type": "integer",
                        "description": "Node ID",
                        "name": "id",
                        "in": "path",
                        "required": true
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "schema": {
                            "allOf": [
                                {
                                    "$ref": "#/definitions/middleware.APIResponse"
                                },
                                {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "$ref": "#/definitions/model.SSHCredential"
                                        }
                                    }
                                }
                            ]
                        }
                    }
                }
            },
            "post": {
                "security": [
                    {
                        "ApiKeyAuth": []
                    }
                ],
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "cluster"
                ],
                "summary": "Create or replace SSH credential for a node",
                "parameters": [
                    {
                        "type": "integer",
                        "description": "Node ID",
                        "name": "id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "description": "Credential",
                        "name": "body",
                        "in": "body",
                        "required": true,
                        "schema": {
                            "$ref": "#/definitions/controller.CredentialUpsertRequest"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "schema": {
                            "allOf": [
                                {
                                    "$ref": "#/definitions/middleware.APIResponse"
                                },
                                {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "$ref": "#/definitions/model.SSHCredential"
                                        }
                                    }
                                }
                            ]
                        }
                    }
                }
            },
            "delete": {
                "security": [
                    {
                        "ApiKeyAuth": []
                    }
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "cluster"
                ],
                "summary": "Delete SSH credential for a node",
                "parameters": [
                    {
                        "type": "integer",
                        "description": "Node ID",
                        "name": "id",
                        "in": "path",
                        "required": true
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "schema": {
                            "$ref": "#/definitions/middleware.APIResponse"
                        }
                    }
                }
            }
        },
        "/api/cluster/nodes/{id}/credential/test": {
            "post": {
                "security": [
                    {
                        "ApiKeyAuth": []
                    }
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "cluster"
                ],
                "summary": "Test SSH connection",
                "parameters": [
                    {
                        "type": "integer",
                        "description": "Node ID",
                        "name": "id",
                        "in": "path",
                        "required": true
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "schema": {
                            "allOf": [
                                {
                                    "$ref": "#/definitions/middleware.APIResponse"
                                },
                                {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "allOf": [
                                                {
                                                    "$ref": "#/definitions/gin.H"
                                                },
                                                {
                                                    "type": "object",
                                                    "properties": {
                                                        "error_summary": {
                                                            "type": "string"
                                                        },
                                                        "status": {
                                                            "type": "string"
                                                        }
                                                    }
                                                }
                                            ]
                                        }
                                    }
                                }
                            ]
                        }
                    }
                }
            }
        },
        "/api/cluster/nodes/{id}/health": {
            "get": {
                "security": [
                    {
                        "ApiKeyAuth": []
                    }
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "cluster"
                ],
                "summary": "Latest health snapshots for a node",
                "parameters": [
                    {
                        "type": "integer",
                        "description": "Node ID",
                        "name": "id",
                        "in": "path",
                        "required": true
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "schema": {
                            "allOf": [
                                {
                                    "$ref": "#/definitions/middleware.APIResponse"
                                },
                                {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "allOf": [
                                                {
                                                    "$ref": "#/definitions/gin.H"
                                                },
                                                {
                                                    "type": "object",
                                                    "properties": {
                                                        "collector_status": {
                                                            "type": "string"
                                                        },
                                                        "snapshots": {
                                                            "type": "array",
                                                            "items": {
                                                                "$ref": "#/definitions/model.ClusterHealthSnapshot"
                                                            }
                                                        }
                                                    }
                                                }
                                            ]
                                        }
                                    }
                                }
                            ]
                        }
                    }
                }
            }
        },
        "/api/cluster/nodes/{id}/heartbeat": {
            "post": {
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "cluster"
                ],
                "summary": "Receive agent heartbeat (agent → core)",
                "parameters": [
                    {
                        "type": "string",
                        "description": "Bearer \u003cagent-token\u003e",
                        "name": "Authorization",
                        "in": "header",
                        "required": true
                    },
                    {
                        "type": "integer",
                        "description": "Node ID",
                        "name": "id",
                        "in": "path",
                        "required": true
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "schema": {
                            "$ref": "#/definitions/middleware.APIResponse"
                        }
                    }
                }
            }
        },
        "/api/cluster/reconcile": {
            "post": {
                "security": [
                    {
                        "ApiKeyAuth": []
                    }
                ],
                "description": "Probes each active assignment, records its actual_state, and\nsafely auto-heals stale channel base_urls (dead-current +\nlive-expected only). Normally runs on a timer; this triggers it.",
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "cluster"
                ],
                "summary": "Run a cluster drift-reconcile pass now",
                "responses": {
                    "200": {
                        "description": "OK",
                        "schema": {
                            "allOf": [
                                {
                                    "$ref": "#/definitions/middleware.APIResponse"
                                },
                                {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "$ref": "#/definitions/task.ReconcileSummary"
                                        }
                                    }
                                }
                            ]
                        }
                    }
                }
            }
        },
        "/api/cluster/runtimes": {
            "get": {
                "security": [
                    {
                        "ApiKeyAuth": []
                    }
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "cluster"
                ],
                "summary": "List cluster runtimes",
                "responses": {
                    "200": {
                        "description": "OK",
                        "schema": {
                            "allOf": [
                                {
                                    "$ref": "#/definitions/middleware.APIResponse"
                                },
                                {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "allOf": [
                                                {
                                                    "$ref": "#/definitions/gin.H"
                                                },
                                                {
                                                    "type": "object",
                                                    "properties": {
                                                        "runtimes": {
                                                            "type": "array",
                                                            "items": {
                                                                "$ref": "#/definitions/model.ClusterRuntime"
                                                            }
                                                        },
                                                        "total": {
                                                            "type": "integer"
                                                        }
                                                    }
                                                }
                                            ]
                                        }
                                    }
                                }
                            ]
                        }
                    }
                }
            },
            "post": {
                "security": [
                    {
                        "ApiKeyAuth": []
                    }
                ],
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "cluster"
                ],
                "summary": "Create a cluster runtime",
                "parameters": [
                    {
                        "description": "Runtime",
                        "name": "body",
                        "in": "body",
                        "required": true,
                        "schema": {
                            "$ref": "#/definitions/controller.ClusterRuntimeRequest"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "schema": {
                            "allOf": [
                                {
                                    "$ref": "#/definitions/middleware.APIResponse"
                                },
                                {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "$ref": "#/definitions/model.ClusterRuntime"
                                        }
                                    }
                                }
                            ]
                        }
                    }
                }
            }
        },
        "/api/cluster/runtimes/{key}": {
            "get": {
                "security": [
                    {
                        "ApiKeyAuth": []
                    }
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "cluster"
                ],
                "summary": "Get cluster runtime by key",
                "parameters": [
                    {
                        "type": "string",
                        "description": "Runtime key",
                        "name": "key",
                        "in": "path",
                        "required": true
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "schema": {
                            "allOf": [
                                {
                                    "$ref": "#/definitions/middleware.APIResponse"
                                },
                                {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "$ref": "#/definitions/model.ClusterRuntime"
                                        }
                                    }
                                }
                            ]
                        }
                    }
                }
            },
            "put": {
                "security": [
                    {
                        "ApiKeyAuth": []
                    }
                ],
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "cluster"
                ],
                "summary": "Update cluster runtime",
                "parameters": [
                    {
                        "type": "string",
                        "description": "Runtime key",
                        "name": "key",
                        "in": "path",
                        "required": true
                    },
                    {
                        "description": "Runtime",
                        "name": "body",
                        "in": "body",
                        "required": true,
                        "schema": {
                            "$ref": "#/definitions/controller.ClusterRuntimeRequest"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "schema": {
                            "allOf": [
                                {
                                    "$ref": "#/definitions/middleware.APIResponse"
                                },
                                {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "$ref": "#/definitions/model.ClusterRuntime"
                                        }
                                    }
                                }
                            ]
                        }
                    }
                }
            },
            "delete": {
                "security": [
                    {
                        "ApiKeyAuth": []
                    }
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "cluster"
                ],
                "summary": "Delete cluster runtime",
                "parameters": [
                    {
                        "type": "string",
                        "description": "Runtime key",
                        "name": "key",
                        "in": "path",
                        "required": true
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "schema": {
                            "$ref": "#/definitions/middleware.APIResponse"
                        }
                    }
                }
            }
        },
        "/api/cluster/status/current": {
            "get": {
                "security": [
                    {
                        "ApiKeyAuth": []
                    }
                ],
                "tags": [
                    "cluster"
                ],
                "summary": "One-shot live cluster status snapshot (SSE polling fallback)",
                "responses": {}
            }
        },
        "/api/cluster/status/stream": {
            "get": {
                "security": [
                    {
                        "ApiKeyAuth": []
                    }
                ],
                "produces": [
                    "text/event-stream"
                ],
                "tags": [
                    "cluster"
                ],
                "summary": "Stream live cluster node/service status",
                "responses": {}
            }
        },
        "/api/cluster/status/ticket": {
            "post": {
                "security": [
                    {
                        "ApiKeyAuth": []
                    }
                ],
                "tags": [
                    "cluster"
                ],
                "summary": "Mint a one-shot ticket for the cluster status SSE stream",
                "responses": {}
            }
        },
        "/api/cluster/storage": {
            "get": {
                "security": [
                    {
                        "ApiKeyAuth": []
                    }
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "cluster"
                ],
                "summary": "List storage mounts across all cluster nodes",
                "responses": {
                    "200": {
                        "description": "OK",
                        "schema": {
                            "allOf": [
                                {
                                    "$ref": "#/definitions/middleware.APIResponse"
                                },
                                {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "allOf": [
                                                {
                                                    "$ref": "#/definitions/gin.H"
                                                },
                                                {
                                                    "type": "object",
                                                    "properties": {
                                                        "mounts": {
                                                            "type": "array",
                                                            "items": {
                                                                "$ref": "#/definitions/controller.StorageView"
                                                            }
                                                        },
                                                        "total": {
                                                            "type": "integer"
                                                        }
                                                    }
                                                }
                                            ]
                                        }
                                    }
                                }
                            ]
                        }
                    }
                }
            }
        },
        "/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",
                        "description": "Start second timestamp",
                        "name": "start_timestamp",
                        "in": "query"
                    },
                    {
                        "type": "integer",
                        "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"
                    },
                    {
                        "type": "string",
                        "description": "Comma-separated list of fields to select (e.g., request_count,exception_count,cache_hit_count). Available: request_count,retry_count,exception_count,status4xx_count,status5xx_count,status400_count,status429_count,status500_count,cache_hit_count,input_tokens,image_input_tokens,audio_input_tokens,output_tokens,image_output_tokens,cached_tokens,cache_creation_tokens,total_tokens,web_search_count,used_amount,total_time,total_ttfb. Groups: count,usage,time,all",
                        "name": "fields",
                        "in": "query"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "schema": {
                            "allOf": [
                                {
                                    "$ref": "#/definitions/middleware.APIResponse"
                                },
                                {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "$ref": "#/definitions/model.DashboardResponse"
                                        }
                                    }
                                }
                            ]
                        }
                    }
                }
            }
        },
        "/api/dashboard/breakdown": {
            "get": {
                "security": [
                    {
                        "ApiKeyAuth": []
                    }
                ],
                "description": "Aggregates cp_logs in the time range into by_model and by_token usage\n(request_count, total_tokens, used_amount), for the monitor distribution\nchart and the per-key panel. Optional model / token_name narrow the result.",
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "dashboard"
                ],
                "summary": "Per-model and per-token (API key) usage breakdown",
                "parameters": [
                    {
                        "type": "integer",
                        "description": "Start (unix seconds)",
                        "name": "start_timestamp",
                        "in": "query"
                    },
                    {
                        "type": "integer",
                        "description": "End (unix seconds)",
                        "name": "end_timestamp",
                        "in": "query"
                    },
                    {
                        "type": "string",
                        "description": "Filter by model",
                        "name": "model",
                        "in": "query"
                    },
                    {
                        "type": "string",
                        "description": "Filter by API key (token) name",
                        "name": "token_name",
                        "in": "query"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "schema": {
                            "allOf": [
                                {
                                    "$ref": "#/definitions/middleware.APIResponse"
                                },
                                {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "$ref": "#/definitions/model.UsageBreakdown"
                                        }
                                    }
                                }
                            ]
                        }
                    }
                }
            }
        },
        "/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",
                        "description": "Start second timestamp",
                        "name": "start_timestamp",
                        "in": "query"
                    },
                    {
                        "type": "integer",
                        "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"
                    },
                    {
                        "type": "string",
                        "description": "Comma-separated list of fields to select (e.g., request_count,exception_count,cache_hit_count). Available: request_count,retry_count,exception_count,status4xx_count,status5xx_count,status400_count,status429_count,status500_count,cache_hit_count,input_tokens,image_input_tokens,audio_input_tokens,output_tokens,image_output_tokens,cached_tokens,cache_creation_tokens,total_tokens,web_search_count,used_amount,total_time,total_ttfb. Groups: count,usage,time,all",
                        "name": "fields",
                        "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",
                        "description": "Start timestamp",
                        "name": "start_timestamp",
                        "in": "query"
                    },
                    {
                        "type": "integer",
                        "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"
                    },
                    {
                        "type": "string",
                        "description": "Comma-separated list of fields to select (e.g., request_count,exception_count,cache_hit_count). Available: request_count,retry_count,exception_count,status4xx_count,status5xx_count,status400_count,status429_count,status500_count,cache_hit_count,input_tokens,image_input_tokens,audio_input_tokens,output_tokens,image_output_tokens,cached_tokens,cache_creation_tokens,total_tokens,web_search_count,used_amount,total_time,total_ttfb. Groups: count,usage,time,all",
                        "name": "fields",
                        "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",
                        "description": "Start timestamp",
                        "name": "start_timestamp",
                        "in": "query"
                    },
                    {
                        "type": "integer",
                        "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"
                    },
                    {
                        "type": "string",
                        "description": "Comma-separated list of fields to select (e.g., request_count,exception_count,cache_hit_count). Available: request_count,retry_count,exception_count,status4xx_count,status5xx_count,status400_count,status429_count,status500_count,cache_hit_count,input_tokens,image_input_tokens,audio_input_tokens,output_tokens,image_output_tokens,cached_tokens,cache_creation_tokens,total_tokens,web_search_count,used_amount,total_time,total_ttfb. Groups: count,usage,time,all",
                        "name": "fields",
                        "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": {
                                                "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": {
                                                "type": "object",
                                                "properties": {
                                                    "groups": {
                                                        "type": "array",
                                                        "items": {
                                                            "$ref": "#/definitions/controller.GroupResponse"
                                                        }
                                                    },
                                                    "total": {
                                                        "type": "integer"
                                                    }
                                                }
                                            }
                                        }
                                    }
                                }
                            ]
                        }
                    }
                }
            }
        },
        "/api/guest/channels": {
            "get": {
                "description": "Returns sanitized channel information for the guest documentation page. Supports filtering by type.",
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "guest"
                ],
                "summary": "Get public channel list",
                "parameters": [
                    {
                        "type": "string",
                        "description": "Filter by channel type number",
                        "name": "type",
                        "in": "query"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "schema": {
                            "allOf": [
                                {
                                    "$ref": "#/definitions/middleware.APIResponse"
                                },
                                {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "array",
                                            "items": {
                                                "$ref": "#/definitions/controller.GuestChannel"
                                            }
                                        }
                                    }
                                }
                            ]
                        }
                    }
                }
            }
        },
        "/api/guest/models": {
            "get": {
                "description": "Returns sanitized model configurations for the guest documentation page. Supports filtering by type and owner.",
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "guest"
                ],
                "summary": "Get public model list",
                "parameters": [
                    {
                        "type": "string",
                        "description": "Filter by model type (chat, embedding, image, tts, stt, rerank)",
                        "name": "type",
                        "in": "query"
                    },
                    {
                        "type": "string",
                        "description": "Filter by model owner/provider",
                        "name": "owner",
                        "in": "query"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "schema": {
                            "allOf": [
                                {
                                    "$ref": "#/definitions/middleware.APIResponse"
                                },
                                {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "array",
                                            "items": {
                                                "$ref": "#/definitions/controller.GuestModel"
                                            }
                                        }
                                    }
                                }
                            ]
                        }
                    }
                }
            }
        },
        "/api/guest/stats": {
            "get": {
                "description": "Returns sanitized system statistics for the guest documentation page",
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "guest"
                ],
                "summary": "Get public system stats",
                "responses": {
                    "200": {
                        "description": "OK",
                        "schema": {
                            "allOf": [
                                {
                                    "$ref": "#/definitions/middleware.APIResponse"
                                },
                                {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "$ref": "#/definitions/controller.GuestStats"
                                        }
                                    }
                                }
                            ]
                        }
                    }
                }
            }
        },
        "/api/health": {
            "get": {
                "description": "Liveness + dependency health: mongo/redis reachability and the count of auto-disabled channels. Returns 503 when a critical dependency is down. No auth — for consumers (e.g. CalleKit) to poll.",
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "misc"
                ],
                "summary": "Health check (dependencies)",
                "responses": {
                    "200": {
                        "description": "OK",
                        "schema": {
                            "type": "object"
                        }
                    }
                }
            }
        },
        "/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": {
                                                "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": {
                                                "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": {
                                                "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,
                            60,
                            61,
                            62
                        ],
                        "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": {
                                                "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": {
                                                "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"
                                                }
                                            }
                                        }
                                    }
                                }
                            ]
                        }
                    }
                }
            },
            "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"
                                                }
                                            }
                                        }
                                    }
                                }
                            ]
                        }
                    }
                }
            }
        },
        "/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"
                                            }
                                        }
                                    }
                                }
                            ]
                        }
                    }
                }
            }
        },
        "/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"
                                                }
                                            }
                                        }
                                    }
                                }
                            ]
                        }
                    }
                }
            },
            "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/provider/discover": {
            "post": {
                "security": [
                    {
                        "ApiKeyAuth": []
                    }
                ],
                "description": "Validates API key and discovers available models from a provider",
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "provider"
                ],
                "summary": "Discover models from a provider",
                "parameters": [
                    {
                        "description": "Discovery request",
                        "name": "request",
                        "in": "body",
                        "required": true,
                        "schema": {
                            "$ref": "#/definitions/controller.DiscoverRequest"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "schema": {
                            "allOf": [
                                {
                                    "$ref": "#/definitions/middleware.APIResponse"
                                },
                                {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "$ref": "#/definitions/controller.DiscoverResponse"
                                        }
                                    }
                                }
                            ]
                        }
                    }
                }
            }
        },
        "/api/proxies/sync": {
            "post": {
                "security": [
                    {
                        "ApiKeyAuth": []
                    }
                ],
                "description": "Admin: immediately re-pull every enabled webshare-proxy channel's list\n(the same work the hourly task does) and return a per-channel summary.\nUse after adding or editing a proxy source channel.",
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "admin"
                ],
                "summary": "Refresh proxy pools now",
                "responses": {
                    "200": {
                        "description": "OK",
                        "schema": {
                            "type": "object"
                        }
                    }
                }
            }
        },
        "/api/search": {
            "get": {
                "security": [
                    {
                        "ApiKeyAuth": []
                    }
                ],
                "description": "Searches tokens, channels, models, users, and SIP numbers",
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "search"
                ],
                "summary": "Global search across all resources",
                "parameters": [
                    {
                        "type": "string",
                        "description": "Search query (min 2 chars)",
                        "name": "q",
                        "in": "query",
                        "required": true
                    },
                    {
                        "type": "integer",
                        "description": "Max results per category (default 5)",
                        "name": "limit",
                        "in": "query"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "schema": {
                            "allOf": [
                                {
                                    "$ref": "#/definitions/middleware.APIResponse"
                                },
                                {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "$ref": "#/definitions/controller.searchResponse"
                                        }
                                    }
                                }
                            ]
                        }
                    }
                }
            }
        },
        "/api/sip_number/": {
            "post": {
                "security": [
                    {
                        "ApiKeyAuth": []
                    }
                ],
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "sip_number"
                ],
                "summary": "Create a new SIP number",
                "parameters": [
                    {
                        "description": "SIP number data",
                        "name": "body",
                        "in": "body",
                        "required": true,
                        "schema": {
                            "$ref": "#/definitions/controller.CreateSipNumberRequest"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "schema": {
                            "$ref": "#/definitions/middleware.APIResponse"
                        }
                    }
                }
            }
        },
        "/api/sip_number/{id}": {
            "get": {
                "security": [
                    {
                        "ApiKeyAuth": []
                    }
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "sip_number"
                ],
                "summary": "Get a SIP number by ID",
                "parameters": [
                    {
                        "type": "integer",
                        "description": "SIP Number ID",
                        "name": "id",
                        "in": "path",
                        "required": true
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "schema": {
                            "$ref": "#/definitions/middleware.APIResponse"
                        }
                    }
                }
            },
            "put": {
                "security": [
                    {
                        "ApiKeyAuth": []
                    }
                ],
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "sip_number"
                ],
                "summary": "Update a SIP number",
                "parameters": [
                    {
                        "type": "integer",
                        "description": "SIP Number ID",
                        "name": "id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "description": "Updated fields",
                        "name": "body",
                        "in": "body",
                        "required": true,
                        "schema": {
                            "$ref": "#/definitions/controller.UpdateSipNumberRequest"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "schema": {
                            "$ref": "#/definitions/middleware.APIResponse"
                        }
                    }
                }
            },
            "delete": {
                "security": [
                    {
                        "ApiKeyAuth": []
                    }
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "sip_number"
                ],
                "summary": "Delete a SIP number (soft delete)",
                "parameters": [
                    {
                        "type": "integer",
                        "description": "SIP Number ID",
                        "name": "id",
                        "in": "path",
                        "required": true
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "schema": {
                            "$ref": "#/definitions/middleware.APIResponse"
                        }
                    }
                }
            }
        },
        "/api/sip_number/{id}/allocate": {
            "post": {
                "security": [
                    {
                        "ApiKeyAuth": []
                    }
                ],
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "sip_number"
                ],
                "summary": "Allocate a SIP number to a team",
                "parameters": [
                    {
                        "type": "integer",
                        "description": "SIP Number ID",
                        "name": "id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "description": "Team ID",
                        "name": "body",
                        "in": "body",
                        "required": true,
                        "schema": {
                            "$ref": "#/definitions/controller.AllocateSipNumberRequest"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "schema": {
                            "$ref": "#/definitions/middleware.APIResponse"
                        }
                    }
                }
            }
        },
        "/api/sip_number/{id}/assignment": {
            "patch": {
                "security": [
                    {
                        "ApiKeyAuth": []
                    }
                ],
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "sip_number"
                ],
                "summary": "Update SIP number assignment fields (for Platform sync)",
                "parameters": [
                    {
                        "type": "integer",
                        "description": "SIP Number ID",
                        "name": "id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "description": "Assignment fields",
                        "name": "body",
                        "in": "body",
                        "required": true,
                        "schema": {
                            "$ref": "#/definitions/controller.UpdateAssignmentRequest"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "schema": {
                            "$ref": "#/definitions/middleware.APIResponse"
                        }
                    }
                }
            }
        },
        "/api/sip_number/{id}/deallocate": {
            "post": {
                "security": [
                    {
                        "ApiKeyAuth": []
                    }
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "sip_number"
                ],
                "summary": "Deallocate a SIP number from its team",
                "parameters": [
                    {
                        "type": "integer",
                        "description": "SIP Number ID",
                        "name": "id",
                        "in": "path",
                        "required": true
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "schema": {
                            "$ref": "#/definitions/middleware.APIResponse"
                        }
                    }
                }
            }
        },
        "/api/sip_numbers/": {
            "get": {
                "security": [
                    {
                        "ApiKeyAuth": []
                    }
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "sip_number"
                ],
                "summary": "Get paginated list of SIP numbers",
                "parameters": [
                    {
                        "type": "integer",
                        "description": "Page number",
                        "name": "p",
                        "in": "query"
                    },
                    {
                        "type": "integer",
                        "description": "Items per page",
                        "name": "per_page",
                        "in": "query"
                    },
                    {
                        "type": "string",
                        "description": "Filter by status",
                        "name": "status",
                        "in": "query"
                    },
                    {
                        "type": "string",
                        "description": "Search keyword",
                        "name": "keyword",
                        "in": "query"
                    }
                ],
                "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": {
                                                "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": {
                                                "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": {
                                                "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": {
                                                "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}/rotate": {
            "post": {
                "description": "Mints a new key for the token; the old key stays valid for `grace_hours` (default 24, max 168) so the consumer can cut over without downtime. Returns the new key (shown once) and the old key's expiry.",
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "token"
                ],
                "summary": "Rotate a token's key (zero-downtime)",
                "parameters": [
                    {
                        "type": "integer",
                        "description": "Token ID",
                        "name": "id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "type": "integer",
                        "description": "Grace window in hours (default 24)",
                        "name": "grace_hours",
                        "in": "query"
                    }
                ],
                "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"
                        }
                    }
                }
            }
        },
        "/api/tokens/{id}/usage": {
            "get": {
                "description": "Aggregated usage (requests, errors, cost, avg TTFB, per-model breakdown) for a single token over the last `days` (default 30, max 365).",
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "token"
                ],
                "summary": "Token usage summary",
                "parameters": [
                    {
                        "type": "integer",
                        "description": "Token ID",
                        "name": "id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "type": "integer",
                        "description": "Look-back window in days (default 30)",
                        "name": "days",
                        "in": "query"
                    }
                ],
                "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/diarization": {
            "post": {
                "security": [
                    {
                        "ApiKeyAuth": []
                    }
                ],
                "description": "Speaker diarization (who-spoke-when) for an uploaded audio file",
                "consumes": [
                    "multipart/form-data"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "relay"
                ],
                "summary": "AudioDiarization",
                "parameters": [
                    {
                        "type": "string",
                        "description": "Model",
                        "name": "model",
                        "in": "formData",
                        "required": true
                    },
                    {
                        "type": "file",
                        "description": "Audio file",
                        "name": "file",
                        "in": "formData",
                        "required": true
                    },
                    {
                        "type": "string",
                        "description": "Optional Qevron-Channel header",
                        "name": "Qevron-Channel",
                        "in": "header"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "schema": {
                            "$ref": "#/definitions/model.SttJSONResponse"
                        }
                    }
                }
            }
        },
        "/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 Qevron-Channel header",
                        "name": "Qevron-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 Qevron-Channel header",
                        "name": "Qevron-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 Qevron-Channel header",
                        "name": "Qevron-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/voices": {
            "get": {
                "security": [
                    {
                        "ApiKeyAuth": []
                    }
                ],
                "description": "Returns the speakers (voices) a local TTS model supports — built-in plus the caller's own custom voices — and whether the engine supports creating custom speakers.",
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "audio"
                ],
                "summary": "List supported speakers for a TTS model",
                "parameters": [
                    {
                        "type": "string",
                        "description": "TTS model name",
                        "name": "model",
                        "in": "query",
                        "required": true
                    }
                ],
                "responses": {}
            },
            "post": {
                "security": [
                    {
                        "ApiKeyAuth": []
                    }
                ],
                "description": "Creates a tenant-scoped custom voice from a reference clip (multipart: label + file). Available for engines that support custom speakers (e.g. blab-tts). The returned voice id is usable in the `voice` field of /v1/audio/speech.",
                "consumes": [
                    "multipart/form-data"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "audio"
                ],
                "summary": "Create a custom (cloned) voice for a TTS model",
                "parameters": [
                    {
                        "type": "string",
                        "description": "TTS model name",
                        "name": "model",
                        "in": "query",
                        "required": true
                    },
                    {
                        "type": "string",
                        "description": "Voice name",
                        "name": "label",
                        "in": "formData",
                        "required": true
                    },
                    {
                        "type": "file",
                        "description": "Reference audio clip",
                        "name": "file",
                        "in": "formData",
                        "required": true
                    }
                ],
                "responses": {}
            }
        },
        "/v1/audio/voices/{id}": {
            "delete": {
                "security": [
                    {
                        "ApiKeyAuth": []
                    }
                ],
                "description": "Removes a tenant-scoped custom voice the caller created. A tenant may only delete its OWN voices (built-ins and other tenants' voices are rejected). Used to reap ephemeral voices such as dubbing's per-speaker clones.",
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "audio"
                ],
                "summary": "Delete one of the caller's custom voices",
                "parameters": [
                    {
                        "type": "string",
                        "description": "Voice id (as returned by create / list)",
                        "name": "id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "type": "string",
                        "description": "TTS model name",
                        "name": "model",
                        "in": "query",
                        "required": true
                    }
                ],
                "responses": {}
            }
        },
        "/v1/capabilities": {
            "get": {
                "tags": [
                    "Capability"
                ],
                "summary": "List capabilities (SDK / user)",
                "responses": {
                    "200": {
                        "description": "OK",
                        "schema": {
                            "$ref": "#/definitions/gin.H"
                        }
                    }
                }
            }
        },
        "/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 Qevron-Channel header",
                        "name": "Qevron-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 Qevron-Channel header",
                        "name": "Qevron-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 Qevron-Channel header",
                        "name": "Qevron-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 Qevron-Channel header",
                        "name": "Qevron-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 Qevron-Channel header",
                        "name": "Qevron-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 Qevron-Channel header",
                        "name": "Qevron-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/models/{model}/load": {
            "get": {
                "description": "Read-only saturation of a model across its serving instances (slots busy/total, busy flag). Lets a client warn the user or defer a heavy job when the model is at capacity.",
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "models"
                ],
                "summary": "Live model load / saturation",
                "parameters": [
                    {
                        "type": "string",
                        "description": "Model name",
                        "name": "model",
                        "in": "path",
                        "required": true
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "schema": {
                            "$ref": "#/definitions/controller.modelLoadResponse"
                        }
                    }
                }
            }
        },
        "/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 Qevron-Channel header",
                        "name": "Qevron-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/pricing": {
            "get": {
                "security": [
                    {
                        "ApiKeyAuth": []
                    }
                ],
                "description": "Returns the SELLING price of every model this API key can access, in\ncustomer-facing units (per 1M tokens / 1M characters / minute / image).\nPrices are already group-adjusted and include the platform markup — i.e.\nexactly what you are billed. Cost basis is never exposed. Same model set\nas GET /v1/models.",
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "relay"
                ],
                "summary": "List model pricing",
                "responses": {
                    "200": {
                        "description": "OK",
                        "schema": {
                            "type": "object",
                            "properties": {
                                "data": {
                                    "type": "array",
                                    "items": {
                                        "type": "object"
                                    }
                                },
                                "object": {
                                    "type": "string"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/v1/pricing/{model}": {
            "get": {
                "security": [
                    {
                        "ApiKeyAuth": []
                    }
                ],
                "description": "Returns the SELLING price for a single model (group-adjusted + markup),\nin customer-facing units. 404 if the key cannot access the model.",
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "relay"
                ],
                "summary": "Retrieve model pricing",
                "responses": {
                    "200": {
                        "description": "OK",
                        "schema": {
                            "type": "object"
                        }
                    }
                }
            }
        },
        "/v1/proxies": {
            "get": {
                "security": [
                    {
                        "ApiKeyAuth": []
                    }
                ],
                "description": "Returns the HTTP proxy pool(s) this API key can access (Webshare-backed).\nEach entry has host, port, username, password and a ready-to-use proxy_url\n(http://user:pass@host:port). Access is opt-in: the key must list the pool\nname (e.g. \"proxy\") in its allowed models. Use ?format=text for raw\nhost:port:username:password lines.",
                "produces": [
                    "application/json",
                    "text/plain"
                ],
                "tags": [
                    "relay"
                ],
                "summary": "List proxies",
                "responses": {
                    "200": {
                        "description": "OK",
                        "schema": {
                            "type": "object",
                            "properties": {
                                "count": {
                                    "type": "integer"
                                },
                                "data": {
                                    "type": "array",
                                    "items": {
                                        "type": "object"
                                    }
                                },
                                "object": {
                                    "type": "string"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/v1/proxies/rotate": {
            "get": {
                "security": [
                    {
                        "ApiKeyAuth": []
                    }
                ],
                "description": "Returns ONE proxy from the accessible pool, round-robin per call. Optional\n?pool=\u003cname\u003e picks a specific accessible pool; ?format=text returns a single\nhost:port:username:password line. 404 if the key has no accessible proxies.",
                "produces": [
                    "application/json",
                    "text/plain"
                ],
                "tags": [
                    "relay"
                ],
                "summary": "Rotate proxy",
                "responses": {
                    "200": {
                        "description": "OK",
                        "schema": {
                            "type": "object"
                        }
                    }
                }
            }
        },
        "/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 Qevron-Channel header",
                        "name": "Qevron-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 Qevron-Channel header",
                        "name": "Qevron-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 Qevron-Channel header",
                        "name": "Qevron-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 Qevron-Channel header",
                        "name": "Qevron-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 Qevron-Channel header",
                        "name": "Qevron-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 Qevron-Channel header",
                        "name": "Qevron-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 Qevron-Channel header",
                        "name": "Qevron-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 Qevron-Channel header",
                        "name": "Qevron-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 Qevron-Channel header",
                        "name": "Qevron-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"
                            }
                        }
                    }
                }
            }
        },
        "/v1/vision/background": {
            "post": {
                "security": [
                    {
                        "ApiKeyAuth": []
                    }
                ],
                "description": "Returns {image:\"data:image/...;base64,...\"} normalized from the underlying images-edits relay (spook-background is type=6).",
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "vision"
                ],
                "summary": "Background removal / replacement",
                "responses": {}
            }
        },
        "/v1/vision/detect": {
            "post": {
                "security": [
                    {
                        "ApiKeyAuth": []
                    }
                ],
                "description": "Returns {detections:[{label,score,bbox}]} normalized from the underlying chat-completions relay.",
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "vision"
                ],
                "summary": "Object detection",
                "responses": {}
            }
        },
        "/v1/vision/ocr": {
            "post": {
                "security": [
                    {
                        "ApiKeyAuth": []
                    }
                ],
                "description": "Returns {text, blocks:[...]} normalized from the underlying chat-completions relay.",
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "vision"
                ],
                "summary": "OCR — text from image",
                "responses": {}
            }
        }
    },
    "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"
                }
            }
        },
        "capability.Capability": {
            "type": "object",
            "properties": {
                "category": {
                    "type": "string"
                },
                "default_request_shape": {
                    "type": "object",
                    "additionalProperties": {}
                },
                "display_name": {
                    "type": "object",
                    "additionalProperties": {
                        "type": "string"
                    }
                },
                "endpoint_template": {
                    "type": "string"
                },
                "key": {
                    "type": "string"
                },
                "model_type": {
                    "type": "integer"
                },
                "preferred_models": {
                    "description": "PreferredModels is a curated hint list — the capability status / SDK\ndiscovery endpoints pick the first reachable entry as recommended_model.\nAvoids the \"alphabetical pick returns spook-detect for LLM_CHAT\" trap.",
                    "type": "array",
                    "items": {
                        "type": "string"
                    }
                },
                "relay_mode": {
                    "$ref": "#/definitions/mode.Mode"
                },
                "sdk_example": {
                    "type": "string"
                },
                "supported_providers": {
                    "type": "array",
                    "items": {
                        "$ref": "#/definitions/model.ChannelType"
                    }
                },
                "supports_streaming": {
                    "type": "boolean"
                }
            }
        },
        "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"
                },
                "rpm": {
                    "type": "integer"
                },
                "subnets": {
                    "type": "array",
                    "items": {
                        "type": "string"
                    }
                },
                "tpm": {
                    "type": "integer"
                }
            }
        },
        "controller.AgentInstallRequest": {
            "type": "object",
            "properties": {
                "agent_binary_path": {
                    "type": "string"
                },
                "endpoint": {
                    "type": "string"
                }
            }
        },
        "controller.AgentTokenRequest": {
            "type": "object",
            "properties": {
                "endpoint": {
                    "type": "string"
                },
                "token": {
                    "type": "string"
                }
            }
        },
        "controller.AllocateSipNumberRequest": {
            "type": "object",
            "required": [
                "team_id"
            ],
            "properties": {
                "team_id": {
                    "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"
                    }
                },
                "image_quality_prices": {
                    "description": "map[size]map[quality]price_per_image",
                    "type": "object",
                    "additionalProperties": {
                        "type": "object",
                        "additionalProperties": {
                            "type": "number"
                        }
                    }
                },
                "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.BulkMoveAssignmentItem": {
            "type": "object",
            "properties": {
                "error": {
                    "$ref": "#/definitions/controller.moveError"
                },
                "id": {
                    "type": "integer"
                },
                "ok": {
                    "type": "boolean"
                },
                "response": {
                    "$ref": "#/definitions/controller.MoveAssignmentResponse"
                }
            }
        },
        "controller.BulkMoveAssignmentRequest": {
            "type": "object",
            "required": [
                "assignment_ids",
                "target_node_id"
            ],
            "properties": {
                "assignment_ids": {
                    "type": "array",
                    "maxItems": 50,
                    "minItems": 1,
                    "items": {
                        "type": "integer"
                    }
                },
                "start_after_move": {
                    "type": "boolean"
                },
                "target_channel_id": {
                    "type": "integer"
                },
                "target_gpu_index": {
                    "type": "integer"
                },
                "target_node_id": {
                    "type": "integer"
                }
            }
        },
        "controller.BulkMoveAssignmentResponse": {
            "type": "object",
            "properties": {
                "failed_count": {
                    "type": "integer"
                },
                "items": {
                    "type": "array",
                    "items": {
                        "$ref": "#/definitions/controller.BulkMoveAssignmentItem"
                    }
                },
                "moved_count": {
                    "type": "integer"
                },
                "total": {
                    "type": "integer"
                }
            }
        },
        "controller.CapabilityStatus": {
            "type": "object",
            "properties": {
                "capability": {
                    "$ref": "#/definitions/capability.Capability"
                },
                "channel_count": {
                    "type": "integer"
                },
                "error_rate": {
                    "type": "number"
                },
                "model_count": {
                    "type": "integer"
                },
                "p95_latency_ms": {
                    "type": "number"
                },
                "recommended_model": {
                    "type": "string"
                },
                "requests_last_hour": {
                    "description": "Request metrics — populated in Pillar 7 once cp_usages aggregation lands.",
                    "type": "integer"
                },
                "status": {
                    "description": "ACTIVE | DEGRADED | DOWN | INACTIVE",
                    "type": "string"
                }
            }
        },
        "controller.ClusterAssignmentRequest": {
            "type": "object",
            "required": [
                "channel_id",
                "model_name",
                "node_id",
                "runtime_key"
            ],
            "properties": {
                "capacity_hints": {
                    "$ref": "#/definitions/model.CapHints"
                },
                "channel_id": {
                    "type": "integer"
                },
                "gpu_index": {
                    "type": "integer"
                },
                "model_name": {
                    "type": "string"
                },
                "node_id": {
                    "type": "integer"
                },
                "notes": {
                    "type": "string"
                },
                "runtime_key": {
                    "type": "string"
                },
                "state": {
                    "type": "string",
                    "enum": [
                        "planned",
                        "active",
                        "disabled",
                        "maintenance"
                    ]
                }
            }
        },
        "controller.ClusterNodeRequest": {
            "type": "object",
            "required": [
                "node_key"
            ],
            "properties": {
                "capture_devices": {
                    "type": "array",
                    "items": {
                        "$ref": "#/definitions/model.NodeCaptureDevice"
                    }
                },
                "cpu": {
                    "$ref": "#/definitions/model.NodeCPU"
                },
                "display_name": {
                    "type": "string"
                },
                "gpus": {
                    "type": "array",
                    "items": {
                        "$ref": "#/definitions/model.NodeGPU"
                    }
                },
                "model": {
                    "type": "string"
                },
                "network_ifaces": {
                    "type": "array",
                    "items": {
                        "$ref": "#/definitions/model.NodeNetworkIface"
                    }
                },
                "node_key": {
                    "type": "string"
                },
                "notes": {
                    "type": "string"
                },
                "ram_gb": {
                    "type": "integer"
                },
                "status": {
                    "type": "string",
                    "enum": [
                        "active",
                        "maintenance",
                        "decommissioned"
                    ]
                },
                "storage_mounts": {
                    "type": "array",
                    "items": {
                        "$ref": "#/definitions/model.NodeStorageMount"
                    }
                },
                "supported_runtimes": {
                    "type": "array",
                    "items": {
                        "type": "string"
                    }
                },
                "vendor": {
                    "type": "string"
                }
            }
        },
        "controller.ClusterRuntimeRequest": {
            "type": "object",
            "required": [
                "key"
            ],
            "properties": {
                "auto_route_channel": {
                    "type": "boolean"
                },
                "category": {
                    "description": "Category — UI grouping (telephony/platform/vision/embedding/...). See\nmodel.ClusterRuntime.Category.",
                    "type": "string",
                    "maxLength": 32
                },
                "default_port": {
                    "type": "integer",
                    "maximum": 65535,
                    "minimum": 1
                },
                "default_vram_gb": {
                    "description": "VRAM suggestion populated into assignment forms when this runtime is\npicked. Zero = no suggestion (model.ClusterRuntime.DefaultVRAMGB).",
                    "type": "integer",
                    "maximum": 1024,
                    "minimum": 0
                },
                "description": {
                    "type": "string",
                    "maxLength": 512
                },
                "display_name": {
                    "type": "string"
                },
                "env": {
                    "type": "object",
                    "additionalProperties": {
                        "type": "string"
                    }
                },
                "exec_start": {
                    "description": "Phase D template fields — see model.ClusterRuntime godoc. AtLeast one of\nExecStart or ServiceTemplate is required for a Deploy.",
                    "type": "string",
                    "maxLength": 2048
                },
                "health_url": {
                    "type": "string",
                    "maxLength": 255
                },
                "key": {
                    "type": "string",
                    "maxLength": 64,
                    "minLength": 1
                },
                "notes": {
                    "type": "string"
                },
                "process_pattern": {
                    "type": "string",
                    "maxLength": 128
                },
                "requires_gpu": {
                    "description": "Tier flag — when true, validateRuntimeFitsNode rejects assignments on\nCPU-only target nodes (model.ClusterRuntime.RequiresGPU). Pointer so\nPUT can distinguish \"unset\" from \"explicitly false\".",
                    "type": "boolean"
                },
                "service_name": {
                    "type": "string",
                    "maxLength": 128
                },
                "service_template": {
                    "type": "string",
                    "maxLength": 8192
                },
                "user": {
                    "type": "string",
                    "maxLength": 64
                },
                "working_dir": {
                    "type": "string",
                    "maxLength": 512
                }
            }
        },
        "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.CreateSipNumberRequest": {
            "type": "object",
            "required": [
                "name",
                "number"
            ],
            "properties": {
                "name": {
                    "type": "string"
                },
                "number": {
                    "type": "string"
                },
                "provider_address": {
                    "type": "string"
                },
                "provider_allowed_addresses": {
                    "type": "array",
                    "items": {
                        "type": "string"
                    }
                },
                "provider_auth_password": {
                    "type": "string"
                },
                "provider_auth_username": {
                    "type": "string"
                }
            }
        },
        "controller.CredentialUpsertRequest": {
            "type": "object",
            "required": [
                "auth_type",
                "port",
                "username"
            ],
            "properties": {
                "auth_type": {
                    "type": "string",
                    "enum": [
                        "password",
                        "private_key"
                    ]
                },
                "host": {
                    "type": "string",
                    "maxLength": 255
                },
                "passphrase": {
                    "type": "string"
                },
                "password": {
                    "type": "string"
                },
                "port": {
                    "type": "integer",
                    "maximum": 65535,
                    "minimum": 1
                },
                "private_key": {
                    "type": "string"
                },
                "timeout_sec": {
                    "type": "integer",
                    "maximum": 120,
                    "minimum": 1
                },
                "username": {
                    "type": "string",
                    "maxLength": 128,
                    "minLength": 1
                }
            }
        },
        "controller.CustomTestRequest": {
            "type": "object",
            "properties": {
                "body": {
                    "type": "array",
                    "items": {
                        "type": "integer"
                    }
                },
                "model": {
                    "type": "string"
                }
            }
        },
        "controller.DiscoverModelItem": {
            "type": "object",
            "properties": {
                "already_registered": {
                    "type": "boolean"
                },
                "config": {
                    "type": "object",
                    "additionalProperties": {}
                },
                "model": {
                    "type": "string"
                },
                "owner": {
                    "type": "string"
                },
                "price": {
                    "$ref": "#/definitions/model.Price"
                },
                "type": {
                    "type": "integer"
                }
            }
        },
        "controller.DiscoverRequest": {
            "type": "object",
            "properties": {
                "base_url": {
                    "type": "string"
                },
                "channel_type": {
                    "$ref": "#/definitions/model.ChannelType"
                },
                "key": {
                    "type": "string"
                }
            }
        },
        "controller.DiscoverResponse": {
            "type": "object",
            "properties": {
                "error": {
                    "type": "string"
                },
                "model_endpoints": {
                    "type": "object",
                    "additionalProperties": {
                        "type": "string"
                    }
                },
                "models": {
                    "type": "array",
                    "items": {
                        "$ref": "#/definitions/controller.DiscoverModelItem"
                    }
                },
                "source": {
                    "type": "string"
                },
                "valid": {
                    "type": "boolean"
                }
            }
        },
        "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.GPUView": {
            "type": "object",
            "properties": {
                "index": {
                    "type": "integer"
                },
                "model": {
                    "type": "string"
                },
                "node_id": {
                    "type": "integer"
                },
                "node_key": {
                    "type": "string"
                },
                "vendor": {
                    "type": "string"
                },
                "vram_gb": {
                    "type": "integer"
                }
            }
        },
        "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"
                    }
                },
                "image_quality_prices": {
                    "description": "map[size]map[quality]price_per_image",
                    "type": "object",
                    "additionalProperties": {
                        "type": "object",
                        "additionalProperties": {
                            "type": "number"
                        }
                    }
                },
                "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.GuestChannel": {
            "type": "object",
            "properties": {
                "models": {
                    "type": "array",
                    "items": {
                        "type": "string"
                    }
                },
                "name": {
                    "type": "string"
                },
                "status": {
                    "type": "integer"
                },
                "type": {
                    "type": "integer"
                },
                "type_name": {
                    "type": "string"
                }
            }
        },
        "controller.GuestModel": {
            "type": "object",
            "properties": {
                "config": {
                    "$ref": "#/definitions/controller.GuestModelConfig"
                },
                "model": {
                    "type": "string"
                },
                "owner": {
                    "type": "string"
                },
                "rpm": {
                    "type": "integer"
                },
                "served_by": {
                    "type": "array",
                    "items": {
                        "type": "string"
                    }
                },
                "tpm": {
                    "type": "integer"
                },
                "type": {
                    "type": "integer"
                }
            }
        },
        "controller.GuestModelConfig": {
            "type": "object",
            "properties": {
                "max_context_tokens": {
                    "type": "integer"
                },
                "max_input_tokens": {
                    "type": "integer"
                },
                "max_output_tokens": {
                    "type": "integer"
                },
                "support_formats": {
                    "type": "string"
                },
                "tool_choice": {
                    "type": "boolean"
                },
                "vision": {
                    "type": "boolean"
                }
            }
        },
        "controller.GuestStats": {
            "type": "object",
            "properties": {
                "channel_count": {
                    "type": "integer"
                },
                "model_count": {
                    "type": "integer"
                },
                "model_types": {
                    "type": "array",
                    "items": {
                        "type": "string"
                    }
                },
                "provider_count": {
                    "type": "integer"
                },
                "providers": {
                    "type": "array",
                    "items": {
                        "type": "string"
                    }
                },
                "start_time": {
                    "type": "integer"
                }
            }
        },
        "controller.ImportChannelFromOneAPIRequest": {
            "type": "object",
            "properties": {
                "dsn": {
                    "type": "string"
                }
            }
        },
        "controller.MCPEndpoint": {
            "type": "object",
            "properties": {
                "host": {
                    "type": "string"
                },
                "sse": {
                    "type": "string"
                },
                "streamable_http": {
                    "type": "string"
                }
            }
        },
        "controller.MoveAssignmentRequest": {
            "type": "object",
            "required": [
                "target_node_id"
            ],
            "properties": {
                "start_after_move": {
                    "type": "boolean"
                },
                "target_channel_id": {
                    "type": "integer"
                },
                "target_gpu_index": {
                    "type": "integer"
                },
                "target_node_id": {
                    "type": "integer"
                }
            }
        },
        "controller.MoveAssignmentResponse": {
            "type": "object",
            "properties": {
                "final_state": {
                    "description": "FinalState transitions:\n  moved                                  — every step OK\n  failed                                 — step 1 deploy fail (source untouched)\n  failed_rolled_back                     — a step failed; target undeployed,\n                                           source intact/restored\n  failed_rolled_back_source_restarted    — step 4 fail; target undeployed +\n                                           source restarted\n  failed_rolled_back_source_redeployed   — step 5 DB error; target undeployed\n                                           + source re-deployed to match DB\n  failed_concurrent_modification         — step 5 CAS miss (another writer\n                                           re-bound/deleted the assignment)\n  failed_rollback_dirty                  — a rollback action itself failed",
                    "type": "string"
                },
                "from_channel": {
                    "type": "integer"
                },
                "from_node": {
                    "type": "string"
                },
                "id": {
                    "type": "integer"
                },
                "steps": {
                    "type": "array",
                    "items": {
                        "$ref": "#/definitions/controller.MoveStep"
                    }
                },
                "to_channel": {
                    "type": "integer"
                },
                "to_node": {
                    "type": "string"
                }
            }
        },
        "controller.MoveStep": {
            "type": "object",
            "properties": {
                "active": {
                    "type": "string"
                },
                "details": {
                    "type": "object",
                    "additionalProperties": true
                },
                "error": {
                    "type": "string"
                },
                "ms": {
                    "type": "integer"
                },
                "ok": {
                    "type": "boolean"
                },
                "step": {
                    "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"
                },
                "modality": {
                    "type": "string"
                },
                "object": {
                    "type": "string"
                },
                "owned_by": {
                    "type": "string"
                },
                "parent": {
                    "type": "string"
                },
                "permission": {
                    "type": "array",
                    "items": {
                        "$ref": "#/definitions/controller.OpenAIModelPermission"
                    }
                },
                "root": {
                    "type": "string"
                },
                "type": {
                    "description": "Type is the cp_model_configs relay-mode int (1=LLM, 3=embedding, 5=image,\n6=image_edit, 7=tts, 8=stt, 10=rerank). Modality is a human-readable label.\nBoth are Qevron extensions to the OpenAI model object so API consumers (incl.\nAI agents reading /v1/models) can discover what each model does; OpenAI SDKs\nignore unknown fields, so this stays backward-compatible.",
                    "type": "integer"
                }
            }
        },
        "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"
                    }
                },
                "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"
                    }
                },
                "image_quality_prices": {
                    "description": "map[size]map[quality]price_per_image",
                    "type": "object",
                    "additionalProperties": {
                        "type": "object",
                        "additionalProperties": {
                            "type": "number"
                        }
                    }
                },
                "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.StorageView": {
            "type": "object",
            "properties": {
                "fs_type": {
                    "type": "string"
                },
                "node_id": {
                    "type": "integer"
                },
                "node_key": {
                    "type": "string"
                },
                "path": {
                    "type": "string"
                },
                "role": {
                    "type": "string"
                },
                "size_gb": {
                    "type": "integer"
                }
            }
        },
        "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"
                },
                "previous_key": {
                    "description": "Key rotation: during a grace window after rotation, the superseded key\n(PreviousKey) still authenticates until PreviousKeyExpiresAt (unix secs),\nso a consumer can cut over to the new key without downtime.",
                    "type": "string"
                },
                "previous_key_expires_at": {
                    "type": "integer"
                },
                "quota": {
                    "type": "number"
                },
                "request_count": {
                    "type": "integer"
                },
                "rpm": {
                    "description": "Per-token rate limits (per model). 0 = no token-level cap (group limits\nstill apply). Enforced in middleware as an INDEPENDENT cap on top of the\ngroup's rpm/tpm — protects against a single token (e.g. a runaway voice\nloop) exhausting capacity even within group limits.",
                    "type": "integer"
                },
                "status": {
                    "type": "integer"
                },
                "subnets": {
                    "type": "array",
                    "items": {
                        "type": "string"
                    }
                },
                "tpm": {
                    "type": "integer"
                },
                "used_amount": {
                    "type": "number"
                }
            }
        },
        "controller.UpdateAssignmentRequest": {
            "type": "object",
            "properties": {
                "app_id": {
                    "type": "string"
                },
                "dispatch_rule_id": {
                    "type": "string"
                },
                "outbound_trunk_id": {
                    "type": "string"
                },
                "sip_trunk_id": {
                    "type": "string"
                },
                "status": {
                    "type": "string"
                },
                "team_id": {
                    "type": "string"
                }
            }
        },
        "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.UpdateSipNumberRequest": {
            "type": "object",
            "properties": {
                "name": {
                    "type": "string"
                },
                "provider_address": {
                    "type": "string"
                },
                "provider_allowed_addresses": {
                    "type": "array",
                    "items": {
                        "type": "string"
                    }
                },
                "provider_auth_password": {
                    "type": "string"
                },
                "provider_auth_username": {
                    "type": "string"
                }
            }
        },
        "controller.UpdateTokenNameRequest": {
            "type": "object",
            "properties": {
                "name": {
                    "type": "string"
                }
            }
        },
        "controller.UpdateTokenStatusRequest": {
            "type": "object",
            "properties": {
                "status": {
                    "type": "integer"
                }
            }
        },
        "controller.instanceLoad": {
            "type": "object",
            "properties": {
                "channel_id": {
                    "type": "integer"
                },
                "context_length": {
                    "type": "integer"
                },
                "healthy": {
                    "type": "boolean"
                },
                "name": {
                    "type": "string"
                },
                "queue_depth": {
                    "type": "integer"
                },
                "slots_busy": {
                    "type": "integer"
                },
                "slots_observable": {
                    "type": "boolean"
                },
                "slots_total": {
                    "type": "integer"
                }
            }
        },
        "controller.modelLoadResponse": {
            "type": "object",
            "properties": {
                "busy": {
                    "type": "boolean"
                },
                "context_length": {
                    "type": "integer"
                },
                "est_wait_ms": {
                    "type": "integer"
                },
                "healthy_instances": {
                    "type": "integer"
                },
                "instances": {
                    "type": "array",
                    "items": {
                        "$ref": "#/definitions/controller.instanceLoad"
                    }
                },
                "model": {
                    "type": "string"
                },
                "queue_depth": {
                    "type": "integer"
                },
                "slots_busy": {
                    "type": "integer"
                },
                "slots_observable": {
                    "type": "boolean"
                },
                "slots_total": {
                    "type": "integer"
                },
                "total_instances": {
                    "type": "integer"
                }
            }
        },
        "controller.moveError": {
            "type": "object",
            "properties": {
                "details": {
                    "type": "object",
                    "additionalProperties": true
                },
                "message": {
                    "type": "string"
                },
                "status": {
                    "type": "integer"
                }
            }
        },
        "controller.searchChannelResult": {
            "type": "object",
            "properties": {
                "id": {
                    "type": "integer"
                },
                "name": {
                    "type": "string"
                },
                "status": {
                    "type": "integer"
                },
                "type": {
                    "type": "integer"
                }
            }
        },
        "controller.searchModelResult": {
            "type": "object",
            "properties": {
                "model": {
                    "type": "string"
                },
                "owner": {
                    "type": "string"
                },
                "type": {
                    "type": "integer"
                }
            }
        },
        "controller.searchResponse": {
            "type": "object",
            "properties": {
                "channels": {
                    "type": "array",
                    "items": {
                        "$ref": "#/definitions/controller.searchChannelResult"
                    }
                },
                "models": {
                    "type": "array",
                    "items": {
                        "$ref": "#/definitions/controller.searchModelResult"
                    }
                },
                "sip_numbers": {
                    "type": "array",
                    "items": {
                        "$ref": "#/definitions/controller.searchSipNumberResult"
                    }
                },
                "tokens": {
                    "type": "array",
                    "items": {
                        "$ref": "#/definitions/controller.searchTokenResult"
                    }
                },
                "users": {
                    "type": "array",
                    "items": {
                        "$ref": "#/definitions/controller.searchUserResult"
                    }
                }
            }
        },
        "controller.searchSipNumberResult": {
            "type": "object",
            "properties": {
                "id": {
                    "type": "integer"
                },
                "name": {
                    "type": "string"
                },
                "number": {
                    "type": "string"
                },
                "status": {
                    "type": "string"
                }
            }
        },
        "controller.searchTokenResult": {
            "type": "object",
            "properties": {
                "id": {
                    "type": "integer"
                },
                "name": {
                    "type": "string"
                },
                "status": {
                    "type": "integer"
                }
            }
        },
        "controller.searchUserResult": {
            "type": "object",
            "properties": {
                "display_name": {
                    "type": "string"
                },
                "id": {
                    "type": "integer"
                },
                "role": {
                    "type": "string"
                },
                "username": {
                    "type": "string"
                }
            }
        },
        "gin.H": {
            "type": "object",
            "additionalProperties": {}
        },
        "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,
                22,
                23
            ],
            "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",
                "AudioVoiceConversion",
                "AudioDiarization"
            ]
        },
        "model.AnthropicMessageRequest": {
            "type": "object",
            "properties": {
                "messages": {
                    "type": "array",
                    "items": {
                        "$ref": "#/definitions/model.Message"
                    }
                },
                "model": {
                    "type": "string"
                }
            }
        },
        "model.AuditLog": {
            "type": "object",
            "properties": {
                "action": {
                    "type": "string"
                },
                "admin_id": {
                    "type": "integer"
                },
                "admin_name": {
                    "type": "string"
                },
                "changes": {
                    "type": "object",
                    "additionalProperties": true
                },
                "id": {
                    "type": "integer"
                },
                "ip_address": {
                    "type": "string"
                },
                "resource_id": {
                    "type": "string"
                },
                "resource_type": {
                    "type": "string"
                },
                "timestamp": {
                    "type": "string"
                }
            }
        },
        "model.CapHints": {
            "type": "object",
            "properties": {
                "ram_gb_required": {
                    "type": "integer"
                },
                "vram_gb_required": {
                    "type": "integer"
                }
            }
        },
        "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"
                },
                "request": {
                    "type": "string"
                },
                "request_headers": {
                    "type": "object",
                    "additionalProperties": {
                        "type": "string"
                    }
                },
                "response": {
                    "type": "string"
                },
                "response_headers": {
                    "type": "object",
                    "additionalProperties": {
                        "type": "string"
                    }
                },
                "source": {
                    "description": "\"auto\" | \"custom\"",
                    "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,
                60,
                61,
                62
            ],
            "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",
                "ChannelTypeArpanet",
                "ChannelTypeLlamaCpp",
                "ChannelTypeWebshareProxy"
            ]
        },
        "model.ChartData": {
            "type": "object",
            "properties": {
                "audio_input_tokens": {
                    "type": "integer"
                },
                "cache_creation_tokens": {
                    "type": "integer"
                },
                "cache_hit_count": {
                    "type": "integer"
                },
                "cached_tokens": {
                    "type": "integer"
                },
                "exception_count": {
                    "type": "integer"
                },
                "image_input_tokens": {
                    "type": "integer"
                },
                "image_output_tokens": {
                    "type": "integer"
                },
                "input_tokens": {
                    "type": "integer"
                },
                "output_tokens": {
                    "type": "integer"
                },
                "provider_amount": {
                    "type": "number"
                },
                "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.ClusterAssignment": {
            "type": "object",
            "properties": {
                "actual_state": {
                    "description": "ActualState is the reconciler's observed runtime state (running / degraded\n/ stopped / starting / failed / unknown — the ClusterAssignmentActual*\nconstants), distinct from the desired State. Surfaces silent drift\n(State=active but unit dead/crash-looping) in the API + UI. Updated by the\nreconciler WITHOUT bumping updated_at (see SetClusterAssignmentActualState).",
                    "type": "string"
                },
                "actual_state_at": {
                    "type": "string"
                },
                "capacity_hints": {
                    "$ref": "#/definitions/model.CapHints"
                },
                "channel_id": {
                    "type": "integer"
                },
                "created_at": {
                    "type": "string"
                },
                "created_by": {
                    "type": "integer"
                },
                "gpu_index": {
                    "type": "integer"
                },
                "id": {
                    "type": "integer"
                },
                "model_name": {
                    "type": "string"
                },
                "node_id": {
                    "type": "integer"
                },
                "notes": {
                    "type": "string"
                },
                "runtime_key": {
                    "type": "string"
                },
                "state": {
                    "type": "string"
                },
                "updated_at": {
                    "type": "string"
                }
            }
        },
        "model.ClusterHealthSnapshot": {
            "type": "object",
            "properties": {
                "cpu_load": {
                    "type": "number"
                },
                "created_at": {
                    "type": "string"
                },
                "disk": {
                    "type": "array",
                    "items": {
                        "$ref": "#/definitions/model.DiskStat"
                    }
                },
                "gpu_stats": {
                    "type": "array",
                    "items": {
                        "$ref": "#/definitions/model.GPUStat"
                    }
                },
                "hostname": {
                    "type": "string"
                },
                "id": {
                    "type": "integer"
                },
                "net_ifaces": {
                    "type": "array",
                    "items": {
                        "$ref": "#/definitions/model.NetIfaceStat"
                    }
                },
                "node_id": {
                    "type": "integer"
                },
                "ram_used_gb": {
                    "type": "number"
                },
                "reachable": {
                    "type": "boolean"
                },
                "services": {
                    "type": "object",
                    "additionalProperties": {
                        "type": "string"
                    }
                },
                "source": {
                    "type": "string"
                },
                "uname": {
                    "type": "string"
                },
                "uptime": {
                    "type": "string"
                }
            }
        },
        "model.ClusterNode": {
            "type": "object",
            "properties": {
                "agent_endpoint": {
                    "description": "Agent-based collection (Phase A+B). When CollectorKind==\"agent\" the\nSSH collector path is bypassed and the agent at AgentEndpoint is polled\nwith the bearer in AgentTokenEncrypted. AES-GCM ciphertext format from\ncore/common/crypto/secret.go (`aesgcm:v1$\u003cbase64\u003e`). Empty for legacy /\nSSH-only nodes.",
                    "type": "string"
                },
                "capture_devices": {
                    "type": "array",
                    "items": {
                        "$ref": "#/definitions/model.NodeCaptureDevice"
                    }
                },
                "collector_kind": {
                    "type": "string"
                },
                "cpu": {
                    "$ref": "#/definitions/model.NodeCPU"
                },
                "created_at": {
                    "type": "string"
                },
                "display_name": {
                    "type": "string"
                },
                "gpus": {
                    "type": "array",
                    "items": {
                        "$ref": "#/definitions/model.NodeGPU"
                    }
                },
                "id": {
                    "type": "integer"
                },
                "last_heartbeat_at": {
                    "type": "string"
                },
                "model": {
                    "type": "string"
                },
                "network_ifaces": {
                    "type": "array",
                    "items": {
                        "$ref": "#/definitions/model.NodeNetworkIface"
                    }
                },
                "node_key": {
                    "type": "string"
                },
                "notes": {
                    "type": "string"
                },
                "ram_gb": {
                    "type": "integer"
                },
                "status": {
                    "type": "string"
                },
                "storage_mounts": {
                    "type": "array",
                    "items": {
                        "$ref": "#/definitions/model.NodeStorageMount"
                    }
                },
                "supported_runtimes": {
                    "description": "SupportedRuntimes is an optional operator-curated allowlist of runtime\nkeys this node can actually RUN (its env/venv is provisioned for them).\nThe agent's allowed_units is uniform across nodes and only gates systemctl\n— it does NOT mean the node can serve the model (e.g. a node may lack the\npython env). Empty/nil = unrestricted: deploy/move are allowed and the\nreadiness gate is the safety net. When non-empty, deploy/move to this node\nfor a runtime NOT in the list are rejected fast (node_runtime_unsupported).",
                    "type": "array",
                    "items": {
                        "type": "string"
                    }
                },
                "updated_at": {
                    "type": "string"
                },
                "vendor": {
                    "type": "string"
                }
            }
        },
        "model.ClusterRuntime": {
            "type": "object",
            "properties": {
                "auto_route_channel": {
                    "description": "AutoRouteChannel — when nil (default) or true, a successful service\nstart triggers cp_channels.base_url to be swung onto the node hosting\nthe service. Operators flip this to false to keep the channel pinned\nto its current upstream (useful when a runtime serves planned-only\nrows that shouldn't take live traffic).",
                    "type": "boolean"
                },
                "category": {
                    "description": "Category — data-driven grouping for the cluster UI (e.g. \"telephony\",\n\"platform\", \"vision\", \"embedding\"). Drives the CalleKit \"Servers\" tab\n(category==\"telephony\") and the assignments-table category filter.\nEmpty = uncategorized.",
                    "type": "string"
                },
                "created_at": {
                    "type": "string"
                },
                "default_port": {
                    "type": "integer"
                },
                "default_vram_gb": {
                    "description": "DefaultVRAMGB — initial suggestion populated into the assignment form\nwhen this runtime is selected. Operators can override per-assignment.\nZero means \"no suggestion\" (sentinel matches CapHints.VRAMGBRequired).",
                    "type": "integer"
                },
                "description": {
                    "type": "string"
                },
                "display_name": {
                    "type": "string"
                },
                "env": {
                    "type": "object",
                    "additionalProperties": {
                        "type": "string"
                    }
                },
                "exec_start": {
                    "description": "Phase D — service template (renders into a systemd unit on the target\nagent via POST /v1/services/:key/install). At least one of ExecStart or\nServiceTemplate is required for a Deploy to work; ServiceTemplate, when\nnon-empty, is an advanced override that the agent writes verbatim and\nthe structured ExecStart/Env/etc fields are ignored.",
                    "type": "string"
                },
                "health_url": {
                    "type": "string"
                },
                "id": {
                    "type": "integer"
                },
                "key": {
                    "type": "string"
                },
                "notes": {
                    "type": "string"
                },
                "process_pattern": {
                    "type": "string"
                },
                "requires_gpu": {
                    "description": "RequiresGPU — tier flag enforced by validateRuntimeFitsNode on\nCreate/Update/Move. When true, the target ClusterNode must declare\nat least one entry in its GPUs array; otherwise the operation is\nrejected with HTTP 422 and reason=\"tier_mismatch\". Defaults to false\nso a freshly-seeded runtime is assumed CPU-friendly until proven\notherwise.",
                    "type": "boolean"
                },
                "service_name": {
                    "type": "string"
                },
                "service_template": {
                    "type": "string"
                },
                "updated_at": {
                    "type": "string"
                },
                "user": {
                    "type": "string"
                },
                "working_dir": {
                    "type": "string"
                }
            }
        },
        "model.CompletionTokensDetails": {
            "type": "object",
            "properties": {
                "accepted_prediction_tokens": {
                    "type": "integer"
                },
                "audio_tokens": {
                    "type": "integer"
                },
                "image_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"
                },
                "cache_hit_count": {
                    "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"
                },
                "image_output_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": {
                    "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.DiskStat": {
            "type": "object",
            "properties": {
                "avail_bytes": {
                    "type": "integer"
                },
                "fs": {
                    "type": "string"
                },
                "mount": {
                    "type": "string"
                },
                "total_bytes": {
                    "type": "integer"
                },
                "used_bytes": {
                    "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.GPUStat": {
            "type": "object",
            "properties": {
                "driver": {
                    "type": "string"
                },
                "index": {
                    "type": "integer"
                },
                "power_w": {
                    "type": "number"
                },
                "temp_c": {
                    "type": "integer"
                },
                "util_pct": {
                    "type": "number"
                },
                "vram_used_mb": {
                    "type": "integer"
                }
            }
        },
        "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": "qevron 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"
                },
                "cache_hit_count": {
                    "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"
                },
                "image_output_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": {
                    "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"
                    }
                },
                "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.ImageOutputTokensDetails": {
            "type": "object",
            "properties": {
                "image_tokens": {
                    "description": "The number of image output tokens generated by the model.",
                    "type": "integer"
                },
                "text_tokens": {
                    "description": "The number of text output tokens generated by the model.",
                    "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"
                },
                "output_tokens_details": {
                    "description": "The output token details for the image generation.",
                    "allOf": [
                        {
                            "$ref": "#/definitions/model.ImageOutputTokensDetails"
                        }
                    ]
                },
                "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"
                },
                "provider_amount": {
                    "type": "number"
                },
                "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"
                    }
                }
            }
        },
        "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"
                    }
                },
                "image_quality_prices": {
                    "description": "map[size]map[quality]price_per_image",
                    "type": "object",
                    "additionalProperties": {
                        "type": "object",
                        "additionalProperties": {
                            "type": "number"
                        }
                    }
                },
                "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",
                "llamacpp",
                "arpanet"
            ],
            "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",
                "ModelOwnerLlamaCpp",
                "ModelOwnerArpanet"
            ]
        },
        "model.NetIfaceStat": {
            "type": "object",
            "properties": {
                "ips": {
                    "type": "array",
                    "items": {
                        "type": "string"
                    }
                },
                "name": {
                    "type": "string"
                },
                "state": {
                    "type": "string"
                }
            }
        },
        "model.NodeCPU": {
            "type": "object",
            "properties": {
                "cores": {
                    "type": "integer"
                },
                "sockets": {
                    "type": "integer"
                },
                "threads": {
                    "type": "integer"
                }
            }
        },
        "model.NodeCaptureDevice": {
            "type": "object",
            "properties": {
                "channels": {
                    "type": "integer"
                },
                "model": {
                    "type": "string"
                },
                "type": {
                    "type": "string"
                },
                "vendor": {
                    "type": "string"
                }
            }
        },
        "model.NodeGPU": {
            "type": "object",
            "properties": {
                "index": {
                    "type": "integer"
                },
                "model": {
                    "type": "string"
                },
                "vendor": {
                    "type": "string"
                },
                "vram_gb": {
                    "type": "integer"
                }
            }
        },
        "model.NodeNetworkIface": {
            "type": "object",
            "properties": {
                "ip": {
                    "type": "string"
                },
                "label": {
                    "type": "string"
                }
            }
        },
        "model.NodeStorageMount": {
            "type": "object",
            "properties": {
                "fs_type": {
                    "type": "string"
                },
                "path": {
                    "type": "string"
                },
                "role": {
                    "type": "string"
                },
                "size_gb": {
                    "type": "integer"
                }
            }
        },
        "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"
                },
                "image_output_price": {
                    "type": "number"
                },
                "image_output_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": {
                    "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-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.SSHCredential": {
            "type": "object",
            "properties": {
                "auth_type": {
                    "type": "string"
                },
                "created_at": {
                    "type": "string"
                },
                "has_passphrase": {
                    "type": "boolean"
                },
                "has_password": {
                    "type": "boolean"
                },
                "has_private_key": {
                    "type": "boolean"
                },
                "host": {
                    "type": "string"
                },
                "id": {
                    "type": "integer"
                },
                "last_error_summary": {
                    "type": "string"
                },
                "last_tested_at": {
                    "type": "string"
                },
                "last_tested_status": {
                    "type": "string"
                },
                "node_id": {
                    "type": "integer"
                },
                "port": {
                    "type": "integer"
                },
                "timeout_sec": {
                    "type": "integer"
                },
                "updated_at": {
                    "type": "string"
                },
                "username": {
                    "type": "string"
                }
            }
        },
        "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"
                },
                "cache_hit_count": {
                    "type": "integer"
                },
                "cached_tokens": {
                    "type": "integer"
                },
                "channel_id": {
                    "type": "integer"
                },
                "exception_count": {
                    "type": "integer"
                },
                "group_id": {
                    "type": "string"
                },
                "image_input_tokens": {
                    "type": "integer"
                },
                "image_output_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"
                },
                "temperature": {
                    "description": "Optional XTTS voice-tuning knobs (blab-tts only; other engines ignore them). The relay\nforwards them verbatim via the Sonic AST passthrough — these fields are declared for clarity.",
                    "type": "number"
                },
                "top_p": {
                    "type": "number"
                },
                "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"
                },
                "rpm": {
                    "description": "Per-token rate limits (per model). Pointer so an explicit 0 clears the cap.",
                    "type": "integer"
                },
                "status": {
                    "type": "integer"
                },
                "subnets": {
                    "type": "array",
                    "items": {
                        "type": "string"
                    }
                },
                "tpm": {
                    "type": "integer"
                }
            }
        },
        "model.Usage": {
            "type": "object",
            "properties": {
                "audio_input_tokens": {
                    "type": "integer"
                },
                "cache_creation_tokens": {
                    "type": "integer"
                },
                "cached_tokens": {
                    "type": "integer"
                },
                "image_input_tokens": {
                    "type": "integer"
                },
                "image_output_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.UsageBreakdown": {
            "type": "object",
            "properties": {
                "by_model": {
                    "type": "array",
                    "items": {
                        "$ref": "#/definitions/model.UsageBreakdownEntry"
                    }
                },
                "by_token": {
                    "type": "array",
                    "items": {
                        "$ref": "#/definitions/model.UsageBreakdownEntry"
                    }
                }
            }
        },
        "model.UsageBreakdownEntry": {
            "type": "object",
            "properties": {
                "name": {
                    "type": "string"
                },
                "request_count": {
                    "type": "integer"
                },
                "total_tokens": {
                    "type": "integer"
                },
                "used_amount": {
                    "type": "number"
                }
            }
        },
        "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"
                }
            }
        },
        "samples.Samples": {
            "type": "object",
            "properties": {
                "curl": {
                    "type": "string"
                },
                "json": {
                    "type": "string"
                },
                "mode": {
                    "type": "string"
                },
                "note": {
                    "type": "string"
                }
            }
        },
        "task.ReconcileSummary": {
            "type": "object",
            "properties": {
                "channels_healed": {
                    "type": "integer"
                },
                "checked": {
                    "type": "integer"
                },
                "reopen_failed": {
                    "type": "integer"
                },
                "reopened": {
                    "type": "integer"
                },
                "restart_failed": {
                    "type": "integer"
                },
                "restarted": {
                    "type": "integer"
                },
                "skipped": {
                    "type": "integer"
                },
                "state_changed": {
                    "type": "integer"
                }
            }
        }
    },
    "securityDefinitions": {
        "ApiKeyAuth": {
            "type": "apiKey",
            "name": "Authorization",
            "in": "header"
        }
    }
}