openapi: 3.1.0
info:
  title: Frasberg Luchii API
  version: "1.0"
  description: Public LLM API for the Luchii model family by FRASBERG INC. Bearer authentication, SSE streaming, OpenAI-compatible.
  contact:
    name: Frasberg
    url: https://frasberg.com
servers:
  - url: https://api.frasberg.com/v1
security:
  - bearerAuth: []
paths:
  /chat/completions:
    post:
      summary: OpenAI-compatible chat completion (SSE streaming supported)
      operationId: createChatCompletion
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required: [model, messages]
              properties:
                model:
                  type: string
                  enum: [luchii-6-plus, luchii-6-mini, luchii-70b, luchii-7b, luchii-1b, luchii-200m]
                messages:
                  type: array
                  items:
                    type: object
                    properties:
                      role: { type: string, enum: [system, user, assistant] }
                      content: { type: string }
                stream: { type: boolean, default: false }
      responses:
        "200":
          description: Chat completion or text/event-stream of chat.completion.chunk
  /embeddings:
    post:
      summary: Create embeddings (luchii-6-embed, 384 dimensions)
      operationId: createEmbedding
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required: [input]
              properties:
                model: { type: string, default: luchii-6-embed }
                input:
                  oneOf: [{ type: string }, { type: array, items: { type: string } }]
      responses:
        "200": { description: Embedding vectors }
  /models:
    get:
      summary: List available Luchii models
      operationId: listModels
      security: []
      responses:
        "200": { description: Model list }
  /chat:
    post:
      summary: Native Luchii streaming chat (SSE, delta format)
      operationId: nativeChat
      responses:
        "200": { description: text/event-stream }
components:
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: luchii-sk-*
