| { |
| "openapi": "3.0.3", |
| "info": { |
| "title": "Helion-2.5-Rnd Inference API", |
| "description": "Advanced language model inference API for DeepXR/Helion-2.5-Rnd. Provides chat completions, text generation, and model information endpoints.", |
| "version": "2.5.0-rnd", |
| "contact": { |
| "name": "DeepXR Support", |
| "email": "support@deepxr.ai", |
| "url": "https://deepxr.ai" |
| }, |
| "license": { |
| "name": "Apache 2.0", |
| "url": "https://www.apache.org/licenses/LICENSE-2.0.html" |
| } |
| }, |
| "servers": [ |
| { |
| "url": "http://localhost:8000", |
| "description": "Local development server" |
| }, |
| { |
| "url": "https://api.deepxr.ai", |
| "description": "Production server" |
| } |
| ], |
| "tags": [ |
| { |
| "name": "chat", |
| "description": "Chat completion endpoints" |
| }, |
| { |
| "name": "completions", |
| "description": "Text completion endpoints" |
| }, |
| { |
| "name": "models", |
| "description": "Model information endpoints" |
| }, |
| { |
| "name": "health", |
| "description": "Health check endpoints" |
| } |
| ], |
| "paths": { |
| "/": { |
| "get": { |
| "summary": "Root endpoint", |
| "description": "Returns basic model information", |
| "tags": ["models"], |
| "responses": { |
| "200": { |
| "description": "Success", |
| "content": { |
| "application/json": { |
| "schema": { |
| "type": "object", |
| "properties": { |
| "model": { |
| "type": "string", |
| "example": "DeepXR/Helion-2.5-Rnd" |
| }, |
| "version": { |
| "type": "string", |
| "example": "2.5.0-rnd" |
| }, |
| "status": { |
| "type": "string", |
| "example": "ready" |
| }, |
| "type": { |
| "type": "string", |
| "example": "research" |
| } |
| } |
| } |
| } |
| } |
| } |
| } |
| } |
| }, |
| "/health": { |
| "get": { |
| "summary": "Health check", |
| "description": "Returns server health status", |
| "tags": ["health"], |
| "responses": { |
| "200": { |
| "description": "Healthy", |
| "content": { |
| "application/json": { |
| "schema": { |
| "type": "object", |
| "properties": { |
| "status": { |
| "type": "string", |
| "example": "healthy" |
| }, |
| "model": { |
| "type": "string", |
| "example": "DeepXR/Helion-2.5-Rnd" |
| }, |
| "requests_served": { |
| "type": "integer", |
| "example": 1234 |
| }, |
| "uptime_seconds": { |
| "type": "integer", |
| "example": 86400 |
| } |
| } |
| } |
| } |
| } |
| }, |
| "503": { |
| "description": "Unhealthy" |
| } |
| } |
| } |
| }, |
| "/v1/models": { |
| "get": { |
| "summary": "List available models", |
| "description": "Returns list of available models", |
| "tags": ["models"], |
| "responses": { |
| "200": { |
| "description": "Success", |
| "content": { |
| "application/json": { |
| "schema": { |
| "type": "object", |
| "properties": { |
| "object": { |
| "type": "string", |
| "example": "list" |
| }, |
| "data": { |
| "type": "array", |
| "items": { |
| "$ref": "#/components/schemas/Model" |
| } |
| } |
| } |
| } |
| } |
| } |
| } |
| } |
| } |
| }, |
| "/v1/chat/completions": { |
| "post": { |
| "summary": "Create chat completion", |
| "description": "Generate a chat completion response", |
| "tags": ["chat"], |
| "requestBody": { |
| "required": true, |
| "content": { |
| "application/json": { |
| "schema": { |
| "$ref": "#/components/schemas/ChatCompletionRequest" |
| } |
| } |
| } |
| }, |
| "responses": { |
| "200": { |
| "description": "Success", |
| "content": { |
| "application/json": { |
| "schema": { |
| "$ref": "#/components/schemas/ChatCompletionResponse" |
| } |
| }, |
| "text/event-stream": { |
| "schema": { |
| "$ref": "#/components/schemas/ChatCompletionChunk" |
| } |
| } |
| } |
| }, |
| "400": { |
| "description": "Bad request" |
| }, |
| "500": { |
| "description": "Server error" |
| } |
| } |
| } |
| }, |
| "/v1/completions": { |
| "post": { |
| "summary": "Create text completion", |
| "description": "Generate a text completion", |
| "tags": ["completions"], |
| "requestBody": { |
| "required": true, |
| "content": { |
| "application/json": { |
| "schema": { |
| "$ref": "#/components/schemas/CompletionRequest" |
| } |
| } |
| } |
| }, |
| "responses": { |
| "200": { |
| "description": "Success", |
| "content": { |
| "application/json": { |
| "schema": { |
| "$ref": "#/components/schemas/CompletionResponse" |
| } |
| } |
| } |
| } |
| } |
| } |
| } |
| }, |
| "components": { |
| "schemas": { |
| "Model": { |
| "type": "object", |
| "properties": { |
| "id": { |
| "type": "string", |
| "example": "DeepXR/Helion-2.5-Rnd" |
| }, |
| "object": { |
| "type": "string", |
| "example": "model" |
| }, |
| "created": { |
| "type": "integer", |
| "example": 1706659200 |
| }, |
| "owned_by": { |
| "type": "string", |
| "example": "DeepXR" |
| } |
| } |
| }, |
| "ChatMessage": { |
| "type": "object", |
| "required": ["role", "content"], |
| "properties": { |
| "role": { |
| "type": "string", |
| "enum": ["system", "user", "assistant"], |
| "description": "The role of the message author" |
| }, |
| "content": { |
| "type": "string", |
| "description": "The content of the message" |
| }, |
| "name": { |
| "type": "string", |
| "description": "Optional name for the participant" |
| } |
| } |
| }, |
| "ChatCompletionRequest": { |
| "type": "object", |
| "required": ["messages"], |
| "properties": { |
| "model": { |
| "type": "string", |
| "default": "DeepXR/Helion-2.5-Rnd", |
| "description": "Model identifier" |
| }, |
| "messages": { |
| "type": "array", |
| "items": { |
| "$ref": "#/components/schemas/ChatMessage" |
| }, |
| "description": "List of messages in the conversation" |
| }, |
| "temperature": { |
| "type": "number", |
| "minimum": 0, |
| "maximum": 2, |
| "default": 0.7, |
| "description": "Sampling temperature" |
| }, |
| "top_p": { |
| "type": "number", |
| "minimum": 0, |
| "maximum": 1, |
| "default": 0.9, |
| "description": "Nucleus sampling parameter" |
| }, |
| "top_k": { |
| "type": "integer", |
| "minimum": 0, |
| "default": 50, |
| "description": "Top-k sampling parameter" |
| }, |
| "max_tokens": { |
| "type": "integer", |
| "minimum": 1, |
| "maximum": 131072, |
| "default": 4096, |
| "description": "Maximum tokens to generate" |
| }, |
| "stream": { |
| "type": "boolean", |
| "default": false, |
| "description": "Whether to stream the response" |
| }, |
| "stop": { |
| "type": "array", |
| "items": { |
| "type": "string" |
| }, |
| "description": "Stop sequences" |
| }, |
| "presence_penalty": { |
| "type": "number", |
| "minimum": -2, |
| "maximum": 2, |
| "default": 0, |
| "description": "Presence penalty" |
| }, |
| "frequency_penalty": { |
| "type": "number", |
| "minimum": -2, |
| "maximum": 2, |
| "default": 0, |
| "description": "Frequency penalty" |
| }, |
| "repetition_penalty": { |
| "type": "number", |
| "minimum": 1, |
| "maximum": 2, |
| "default": 1.1, |
| "description": "Repetition penalty" |
| }, |
| "n": { |
| "type": "integer", |
| "minimum": 1, |
| "maximum": 10, |
| "default": 1, |
| "description": "Number of completions to generate" |
| } |
| } |
| }, |
| "ChatCompletionResponse": { |
| "type": "object", |
| "properties": { |
| "id": { |
| "type": "string", |
| "description": "Unique identifier" |
| }, |
| "object": { |
| "type": "string", |
| "example": "chat.completion" |
| }, |
| "created": { |
| "type": "integer", |
| "description": "Unix timestamp" |
| }, |
| "model": { |
| "type": "string", |
| "example": "DeepXR/Helion-2.5-Rnd" |
| }, |
| "choices": { |
| "type": "array", |
| "items": { |
| "type": "object", |
| "properties": { |
| "index": { |
| "type": "integer" |
| }, |
| "message": { |
| "$ref": "#/components/schemas/ChatMessage" |
| }, |
| "finish_reason": { |
| "type": "string", |
| "enum": ["stop", "length", "content_filter"] |
| } |
| } |
| } |
| }, |
| "usage": { |
| "type": "object", |
| "properties": { |
| "prompt_tokens": { |
| "type": "integer" |
| }, |
| "completion_tokens": { |
| "type": "integer" |
| }, |
| "total_tokens": { |
| "type": "integer" |
| } |
| } |
| } |
| } |
| }, |
| "ChatCompletionChunk": { |
| "type": "object", |
| "properties": { |
| "id": { |
| "type": "string" |
| }, |
| "object": { |
| "type": "string", |
| "example": "chat.completion.chunk" |
| }, |
| "created": { |
| "type": "integer" |
| }, |
| "model": { |
| "type": "string" |
| }, |
| "choices": { |
| "type": "array", |
| "items": { |
| "type": "object", |
| "properties": { |
| "index": { |
| "type": "integer" |
| }, |
| "delta": { |
| "type": "object", |
| "properties": { |
| "role": { |
| "type": "string" |
| }, |
| "content": { |
| "type": "string" |
| } |
| } |
| }, |
| "finish_reason": { |
| "type": "string", |
| "nullable": true |
| } |
| } |
| } |
| } |
| } |
| }, |
| "CompletionRequest": { |
| "type": "object", |
| "required": ["prompt"], |
| "properties": { |
| "model": { |
| "type": "string", |
| "default": "DeepXR/Helion-2.5-Rnd" |
| }, |
| "prompt": { |
| "oneOf": [ |
| { |
| "type": "string" |
| }, |
| { |
| "type": "array", |
| "items": { |
| "type": "string" |
| } |
| } |
| ], |
| "description": "Input prompt(s)" |
| }, |
| "temperature": { |
| "type": "number", |
| "minimum": 0, |
| "maximum": 2, |
| "default": 0.7 |
| }, |
| "top_p": { |
| "type": "number", |
| "minimum": 0, |
| "maximum": 1, |
| "default": 0.9 |
| }, |
| "max_tokens": { |
| "type": "integer", |
| "minimum": 1, |
| "default": 4096 |
| }, |
| "stream": { |
| "type": "boolean", |
| "default": false |
| }, |
| "stop": { |
| "type": "array", |
| "items": { |
| "type": "string" |
| } |
| }, |
| "n": { |
| "type": "integer", |
| "minimum": 1, |
| "default": 1 |
| } |
| } |
| }, |
| "CompletionResponse": { |
| "type": "object", |
| "properties": { |
| "id": { |
| "type": "string" |
| }, |
| "object": { |
| "type": "string", |
| "example": "text_completion" |
| }, |
| "created": { |
| "type": "integer" |
| }, |
| "model": { |
| "type": "string" |
| }, |
| "choices": { |
| "type": "array", |
| "items": { |
| "type": "object", |
| "properties": { |
| "text": { |
| "type": "string" |
| }, |
| "index": { |
| "type": "integer" |
| }, |
| "finish_reason": { |
| "type": "string" |
| } |
| } |
| } |
| }, |
| "usage": { |
| "type": "object", |
| "properties": { |
| "prompt_tokens": { |
| "type": "integer" |
| }, |
| "completion_tokens": { |
| "type": "integer" |
| }, |
| "total_tokens": { |
| "type": "integer" |
| } |
| } |
| } |
| } |
| } |
| }, |
| "securitySchemes": { |
| "ApiKeyAuth": { |
| "type": "apiKey", |
| "in": "header", |
| "name": "Authorization", |
| "description": "API key authentication. Use 'Bearer YOUR_API_KEY'" |
| } |
| } |
| }, |
| "security": [ |
| { |
| "ApiKeyAuth": [] |
| } |
| ] |
| } |