{
  "openapi": "3.1.0",
  "info": {
    "title": "qwenjon HyperQwen API",
    "version": "1.0.0",
    "description": "Curated schema for the exposed inference subset. Not a complete vLLM schema. Read /v1/docs for limits, streaming and tool orchestration."
  },
  "servers": [
    {
      "url": "https://qwenjon.voicelabs.uz/v1"
    }
  ],
  "security": [
    {
      "bearerAuth": []
    }
  ],
  "components": {
    "securitySchemes": {
      "bearerAuth": {
        "type": "http",
        "scheme": "bearer"
      }
    },
    "schemas": {
      "ChatRequest": {
        "type": "object",
        "required": [
          "model",
          "messages"
        ],
        "properties": {
          "model": {
            "type": "string",
            "enum": [
              "qwen3.8-27b"
            ]
          },
          "messages": {
            "type": "array",
            "items": {
              "type": "object",
              "required": [
                "role"
              ],
              "properties": {
                "role": {
                  "type": "string",
                  "enum": [
                    "system",
                    "user",
                    "assistant",
                    "tool"
                  ]
                },
                "content": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "tool_call_id": {
                  "type": "string"
                },
                "tool_calls": {
                  "type": "array",
                  "items": {
                    "type": "object"
                  }
                }
              }
            }
          },
          "max_tokens": {
            "type": "integer",
            "minimum": 1,
            "description": "Output budget including reasoning. Input and output together must fit 65536 tokens."
          },
          "temperature": {
            "type": "number"
          },
          "stream": {
            "type": "boolean",
            "default": false
          },
          "stream_options": {
            "type": "object",
            "properties": {
              "include_usage": {
                "type": "boolean"
              },
              "continuous_usage_stats": {
                "type": "boolean"
              }
            }
          },
          "chat_template_kwargs": {
            "type": "object",
            "properties": {
              "enable_thinking": {
                "type": "boolean"
              },
              "reasoning_effort": {
                "type": "string",
                "enum": [
                  "low",
                  "medium",
                  "xhigh"
                ]
              }
            }
          },
          "response_format": {
            "type": "object",
            "description": "Use type json_schema and a named strict json_schema object for structured output."
          },
          "tools": {
            "type": "array",
            "items": {
              "type": "object"
            }
          },
          "tool_choice": {
            "type": [
              "string",
              "object"
            ]
          }
        }
      }
    }
  },
  "paths": {
    "/models": {
      "get": {
        "summary": "List available models",
        "operationId": "list_available_models",
        "responses": {
          "200": {
            "description": "OpenAI-compatible JSON response, or SSE when stream is true. SSE ends with data: [DONE].",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request or context limit"
          },
          "401": {
            "description": "Missing or invalid API key"
          },
          "429": {
            "description": "Rate or concurrency limit"
          },
          "503": {
            "description": "Model unavailable"
          }
        }
      }
    },
    "/chat/completions": {
      "post": {
        "summary": "Generate a chat response",
        "operationId": "generate_a_chat_response",
        "responses": {
          "200": {
            "description": "OpenAI-compatible JSON response, or SSE when stream is true. SSE ends with data: [DONE].",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              },
              "text/event-stream": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request or context limit"
          },
          "401": {
            "description": "Missing or invalid API key"
          },
          "429": {
            "description": "Rate or concurrency limit"
          },
          "503": {
            "description": "Model unavailable"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ChatRequest"
              }
            }
          }
        }
      }
    },
    "/responses": {
      "post": {
        "summary": "Create a stateless response",
        "operationId": "create_a_stateless_response",
        "responses": {
          "200": {
            "description": "OpenAI-compatible JSON response, or SSE when stream is true. SSE ends with data: [DONE].",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request or context limit"
          },
          "401": {
            "description": "Missing or invalid API key"
          },
          "429": {
            "description": "Rate or concurrency limit"
          },
          "503": {
            "description": "Model unavailable"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "model",
                  "input",
                  "store"
                ],
                "properties": {
                  "model": {
                    "type": "string",
                    "enum": [
                      "qwen3.8-27b"
                    ]
                  },
                  "input": {
                    "type": [
                      "string",
                      "array"
                    ]
                  },
                  "max_output_tokens": {
                    "type": "integer"
                  },
                  "store": {
                    "type": "boolean",
                    "const": false
                  }
                }
              }
            }
          }
        }
      }
    },
    "/completions": {
      "post": {
        "summary": "Generate legacy text completions",
        "operationId": "generate_legacy_text_completions",
        "responses": {
          "200": {
            "description": "OpenAI-compatible JSON response, or SSE when stream is true. SSE ends with data: [DONE].",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              },
              "text/event-stream": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request or context limit"
          },
          "401": {
            "description": "Missing or invalid API key"
          },
          "429": {
            "description": "Rate or concurrency limit"
          },
          "503": {
            "description": "Model unavailable"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "model",
                  "prompt"
                ],
                "properties": {
                  "model": {
                    "type": "string",
                    "enum": [
                      "qwen3.8-27b"
                    ]
                  },
                  "prompt": {
                    "type": "string"
                  },
                  "max_tokens": {
                    "type": "integer"
                  },
                  "stream": {
                    "type": "boolean"
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}
