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

# OpenAI Format - Simple Chat

> - Generic simple Chat Completions API reference for all OpenAI-compatible models
- Minimal parameters for quick start
- Text conversations: single or multi-turn context
- System prompts: customize AI role and behavior
- Supports streaming and non-streaming responses




## OpenAPI

````yaml openapi/en/openai-format-simple-chat.json POST /v1/chat/completions
openapi: 3.1.0
info:
  title: OpenAI Format - Simple Chat
  version: '1.0'
servers:
  - url: https://api.aihubmax.com
security:
  - BearerAuth: []
paths:
  /v1/chat/completions:
    post:
      tags:
        - Text Series > OpenAI Format
      summary: OpenAI Format - Simple Chat
      description: >
        - Generic simple Chat Completions API reference for all
        OpenAI-compatible models

        - Minimal parameters for quick start

        - Text conversations: single or multi-turn context

        - System prompts: customize AI role and behavior

        - Supports streaming and non-streaming responses
      operationId: openai-format-simple-chat
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SimpleChatRequest'
            examples:
              single-turn:
                summary: Single Turn
                description: Basic single-turn Q&A
                value:
                  model: gpt-5.4
                  messages:
                    - role: user
                      content: Explain quantum computing in one sentence
              multi-turn:
                summary: Multi-turn
                description: Multi-turn conversation with context
                value:
                  model: gpt-5.4
                  messages:
                    - role: system
                      content: You are a professional fitness coach
                    - role: user
                      content: I want to lose fat and can exercise 3 days per week
                    - role: assistant
                      content: >-
                        Great! For a 3-day fat loss plan, I recommend full-body
                        strength training combined with HIIT. Do you have any
                        prior fitness experience?
                    - role: user
                      content: Some basics - I can do push-ups and squats
              streaming:
                summary: Streaming
                description: Enable streaming for real-time content generation
                value:
                  model: gpt-5.4
                  messages:
                    - role: user
                      content: Write a short poem about spring
                  stream: true
              with-image:
                summary: With Image
                description: Send an image for model analysis (vision)
                value:
                  model: gpt-5.4
                  messages:
                    - role: user
                      content:
                        - type: text
                          text: What's in this image? Please describe in detail
                        - type: image_url
                          image_url:
                            url: >-
                              https://upload.wikimedia.org/wikipedia/commons/thumb/3/3a/Cat03.jpg/1200px-Cat03.jpg
      responses:
        '200':
          $ref: '#/components/responses/ChatCompletionSuccess'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '402':
          $ref: '#/components/responses/PaymentRequired'
        '403':
          $ref: '#/components/responses/Forbidden'
        '429':
          $ref: '#/components/responses/TooManyRequests'
        '500':
          $ref: '#/components/responses/InternalServerError'
components:
  schemas:
    SimpleChatRequest:
      type: object
      required:
        - model
        - messages
      properties:
        model:
          type: string
          description: Model name, e.g. gpt-5.4, deepseek-chat, claude-sonnet-4-6, etc.
          example: gpt-5.4
        messages:
          type: array
          description: List of messages in the conversation
          items:
            type: object
            required:
              - role
              - content
            properties:
              role:
                type: string
                description: Role of the message sender
                enum:
                  - system
                  - user
                  - assistant
              content:
                type: string
                description: Content of the message
        stream:
          type: boolean
          description: Whether to stream the response
          default: false
        temperature:
          type: number
          description: Sampling temperature (0-2)
          minimum: 0
          maximum: 2
        max_tokens:
          type: integer
          description: Maximum number of tokens to generate
        top_p:
          type: number
          description: Nucleus sampling parameter (0-1)
          minimum: 0
          maximum: 1
    ChatCompletionResponse:
      type: object
      properties:
        id:
          type: string
          description: Unique completion ID
          example: chatcmpl-abc123
        object:
          type: string
          description: Object type
          enum:
            - chat.completion
        created:
          type: integer
          description: Creation timestamp
          example: 1757165031
        model:
          type: string
          description: Model used
        choices:
          type: array
          items:
            type: object
            properties:
              index:
                type: integer
                description: Choice index
                example: 0
              message:
                type: object
                properties:
                  role:
                    type: string
                    example: assistant
                  content:
                    type: string
                    example: Hello! How can I help you today?
              finish_reason:
                type: string
                description: Reason the generation stopped
                enum:
                  - stop
                  - length
                  - content_filter
                example: stop
        usage:
          type: object
          description: Token usage statistics
          properties:
            prompt_tokens:
              type: integer
              description: Number of tokens in the prompt
              example: 10
            completion_tokens:
              type: integer
              description: Number of tokens in the completion
              example: 50
            total_tokens:
              type: integer
              description: Total number of tokens used
              example: 60
    ErrorResponse400:
      type: object
      properties:
        error:
          type: object
          properties:
            message:
              type: string
              example: Invalid request parameters
            type:
              type: string
              example: invalid_request_error
    ErrorResponse401:
      type: object
      properties:
        error:
          type: object
          properties:
            message:
              type: string
              example: Invalid API key
            type:
              type: string
              example: authentication_error
    ErrorResponse403:
      type: object
      properties:
        error:
          type: object
          properties:
            message:
              type: string
              example: Access denied
            type:
              type: string
              example: permission_error
    ErrorResponse429:
      type: object
      properties:
        error:
          type: object
          properties:
            message:
              type: string
              example: Rate limit exceeded
            type:
              type: string
              example: rate_limit_error
    ErrorResponse500:
      type: object
      properties:
        error:
          type: object
          properties:
            message:
              type: string
              example: Internal server error
            type:
              type: string
              example: server_error
  responses:
    ChatCompletionSuccess:
      description: Chat completion response
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ChatCompletionResponse'
    BadRequest:
      description: Bad Request
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse400'
    Unauthorized:
      description: Unauthorized
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse401'
    PaymentRequired:
      description: Insufficient balance
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse400'
    Forbidden:
      description: Forbidden
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse403'
    TooManyRequests:
      description: Too Many Requests
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse429'
    InternalServerError:
      description: Internal Server Error
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse500'
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      description: |
        ## All APIs require Bearer Token authentication ##

        Add to request header:

        `Authorization: Bearer YOUR_API_KEY`

````