{"openapi": "3.1.0", "info": {"title": "Internal LLM Gateway", "description": "OpenAI-compatible inference proxy for internal applications. Authenticate with a bearer API key. Request quotas apply per key.", "version": "1.4.2", "contact": {"name": "Platform team", "email": "paul@darkport.co.uk"}}, "servers": [{"url": "https://chat.whitfieldadvisory.com", "description": "Production"}], "security": [{"bearerAuth": []}], "components": {"securitySchemes": {"bearerAuth": {"type": "http", "scheme": "bearer", "bearerFormat": "API key"}}, "schemas": {"ChatMessage": {"type": "object", "required": ["role", "content"], "properties": {"role": {"type": "string", "enum": ["system", "user", "assistant", "tool"]}, "content": {"type": "string"}, "name": {"type": "string"}}}, "ChatCompletionRequest": {"type": "object", "required": ["model", "messages"], "properties": {"model": {"type": "string", "example": "gpt-4o"}, "messages": {"type": "array", "items": {"$ref": "#/components/schemas/ChatMessage"}}, "temperature": {"type": "number", "default": 1.0}, "max_tokens": {"type": "integer"}, "stream": {"type": "boolean", "default": false}, "top_p": {"type": "number", "default": 1.0}, "frequency_penalty": {"type": "number", "default": 0.0}, "presence_penalty": {"type": "number", "default": 0.0}, "stop": {"type": "array", "items": {"type": "string"}}, "user": {"type": "string"}}}, "ChatCompletionResponse": {"type": "object", "properties": {"id": {"type": "string"}, "object": {"type": "string", "example": "chat.completion"}, "created": {"type": "integer"}, "model": {"type": "string"}, "choices": {"type": "array", "items": {"type": "object"}}, "usage": {"type": "object"}}}, "EmbeddingRequest": {"type": "object", "required": ["model", "input"], "properties": {"model": {"type": "string", "example": "text-embedding-3-small"}, "input": {"oneOf": [{"type": "string"}, {"type": "array", "items": {"type": "string"}}]}, "encoding_format": {"type": "string", "enum": ["float", "base64"]}}}, "ModelList": {"type": "object", "properties": {"object": {"type": "string", "example": "list"}, "data": {"type": "array", "items": {"type": "object"}}}}}}, "paths": {"/v1/models": {"get": {"summary": "List available models", "operationId": "listModels", "responses": {"200": {"description": "Model list", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ModelList"}}}}}}}, "/v1/chat/completions": {"post": {"summary": "Create a chat completion", "operationId": "createChatCompletion", "requestBody": {"required": true, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ChatCompletionRequest"}}}}, "responses": {"200": {"description": "Completion", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ChatCompletionResponse"}}, "text/event-stream": {"schema": {"type": "string"}}}}}}}, "/v1/completions": {"post": {"summary": "Create a (legacy) text completion", "operationId": "createCompletion", "requestBody": {"required": true, "content": {"application/json": {"schema": {"type": "object"}}}}, "responses": {"200": {"description": "Completion"}}}}, "/v1/embeddings": {"post": {"summary": "Create embeddings", "operationId": "createEmbedding", "requestBody": {"required": true, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/EmbeddingRequest"}}}}, "responses": {"200": {"description": "Embeddings"}}}}}}