> ## 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 integration

> Chat Completions integration boundary.

## Current behavior

The endpoint validates the API key and returns HTTP 503 with code 50301 because no real LLM supplier is configured. It does not create an SSE stream or fabricate text. Future request/response compatibility must be verified per model. Do not send media output\_count or fallback fields here.


## 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.