{ "swagger": "2.0", "info": { "description": "OpenAI-compatible and Anthropic-compatible LLM proxy/gateway with Bifrost mapping.", "title": "LLM Gateway API", "termsOfService": "http://swagger.io/terms/", "contact": { "name": "optoant", "email": "admin@optoant.local" }, "license": { "name": "MIT", "url": "https://opensource.org/licenses/MIT" }, "version": "1.0" }, "host": "localhost:8000", "basePath": "/", "paths": { "/anthropic/{path}": { "post": { "description": "Converts Anthropic Messages API requests to OpenAI format, forwards to OPENAI_BACKEND, and converts the response back to Anthropic format.", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "anthropic" ], "summary": "Anthropic-compatible proxy", "parameters": [ { "type": "string", "description": "Anthropic API path (e.g. v1/messages)", "name": "path", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "type": "object", "additionalProperties": true } }, "400": { "description": "Bad Request", "schema": { "type": "object", "additionalProperties": { "type": "string" } } }, "502": { "description": "Bad Gateway", "schema": { "type": "object", "additionalProperties": { "type": "string" } } } } } }, "/health": { "get": { "description": "Returns service health status, database connectivity, and active configuration.", "produces": [ "application/json" ], "tags": [ "health" ], "summary": "Health check", "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/handlers.HealthResponse" } } } } }, "/v1/{path}": { "post": { "description": "Forwards any /v1/* request to the configured OpenAI-compatible backend (e.g. DeepSeek).", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "openai" ], "summary": "OpenAI-compatible proxy", "parameters": [ { "type": "string", "description": "OpenAI API path (e.g. chat/completions)", "name": "path", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "type": "object", "additionalProperties": true } }, "502": { "description": "Bad Gateway", "schema": { "type": "object", "additionalProperties": { "type": "string" } } } } } } }, "definitions": { "handlers.HealthResponse": { "type": "object", "properties": { "config": { "type": "object", "properties": { "openai_backend": { "type": "string" }, "port": { "type": "string" } } }, "database": { "type": "string" }, "status": { "type": "string" } } } }, "securityDefinitions": { "BearerAuth": { "type": "apiKey", "name": "Authorization", "in": "header" } } }