> ## Documentation Index
> Fetch the complete documentation index at: https://docs.aiapi.xiaoliu.fun/llms.txt
> Use this file to discover all available pages before exploring further.

# OpenAI格式

> 使用大语言模型进行对话交互



## OpenAPI

````yaml /api-reference/chat/OpenAI.json POST /v1/chat/completions
openapi: 3.1.0
info:
  title: API
  version: 1.0.0
  description: API 文档，支持绘图、语音生成、视频生成、音乐生成等多种 AIGC 接口。
servers:
  - url: https://aiapi.xiaoliu.fun
    description: 生产服务器
security:
  - bearerAuth: []
paths:
  /v1/chat/completions:
    post:
      tags:
        - 聊天模型
      summary: 对话补全
      description: 使用大语言模型进行对话交互
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                model:
                  type: string
                  description: 模型名称
                messages:
                  type: array
                  items:
                    type: object
                    properties:
                      role:
                        type: string
                      content:
                        type: string
                style:
                  type: string
                  enum:
                    - openai
                    - claude
                    - gemini
                  default: openai
                  description: 接口风格，支持 OpenAI、Claude、Gemini
                stream:
                  type: boolean
                  description: 是否流式
              required:
                - model
                - messages
      responses:
        '200':
          description: 成功响应 (流式)
components:
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer

````