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

# LLM 接口

> Chat Completions 接入边界。

> 能力按服务端配置逐项启用。未启用操作返回 503 且不创建任务；音乐积分扣除当前未启用。

## 当前行为

接口校验密钥后因未配置真实 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.
    No client submission idempotency or max_credits. Enabled Suno operations use
    PayAPI and durable task processing. Media uses R2: uploads 24 hours,
    generated files 14 days, task logs 30 days. Music credit deduction is
    disabled. Unconfigured operations and LLM return 503.
servers:
  - url: https://apistable.com
    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.