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

# LLM 接口

> Chat Completions 接入边界。

## 当前行为

接口校验密钥后因未配置真实 LLM 返回 HTTP 503、业务 code 50301，不创建 SSE 或编造文本。未来兼容范围须逐模型验证；不要传媒体 output\_count 或 fallback 参数。


## OpenAPI

````yaml openapi.json POST /api/v1/chat/completions
openapi: 3.1.0
info:
  title: APIstable API
  version: 1.0.0-preview
  description: >-
    Public /api/v1 protocol. Valid API keys have the same account-scoped access.
    Read the selected model documentation for its ID, supported inputs, result
    format and availability before submitting. No client submission idempotency
    or max_credits. Availability, pricing, file retention and callback formats
    follow the selected model contract. Unconfigured operations return 503.
servers:
  - url: https://apistable.ai
    description: APIstable API
security: []
paths:
  /api/v1/chat/completions:
    post:
      summary: LLM integration placeholder
      description: >-
        No live LLM or SSE is implemented. Authenticates and returns 503. Future
        compatibility must be documented per model; this envelope does not
        promise full OpenAI compatibility.
      operationId: createChatCompletion
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - model
                - messages
              properties:
                model:
                  type: string
                messages:
                  type: array
                  items:
                    type: object
                stream:
                  type: boolean
                  default: false
      responses:
        '401':
          description: Invalid or revoked API key.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '503':
          description: '50301: Service/provider unavailable. No live submission or charge.'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      security:
        - bearerAuth: []
components:
  schemas:
    Error:
      type: object
      required:
        - code
        - msg
        - data
      properties:
        code:
          type: integer
        msg:
          type: string
        data:
          type: 'null'
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: >-
        Every valid key can submit and query its own account. Revoked keys are
        rejected.

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.