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

# Create Conversation

> Starts a new conversation with the given model.



## OpenAPI

````yaml POST /conversations
openapi: 3.1.1
info:
  title: QwixAI
  description: >-
    The official QwixAI REST API – Create and interact with AI characters
    programmatically. Built API-first, every feature available in the app is
    accessible via this API.
  license:
    name: MIT
  version: 0.0.1
servers:
  - url: https://api.qwix.chat/api/v1
security:
  - bearerAuth: []
paths:
  /conversations:
    post:
      summary: Create conversation
      description: Starts a new conversation with the given model.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateConversationRequest'
      responses:
        '201':
          description: Conversation created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Conversation'
        '400':
          description: Invalid `modelId`
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorBody'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorBody'
        '404':
          description: Model not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorBody'
components:
  schemas:
    CreateConversationRequest:
      type: object
      required:
        - modelId
      properties:
        modelId:
          type: string
          format: uuid
        encryptionPassword:
          type: string
          minLength: 8
          description: >-
            If set, enables AES-256-GCM encryption for all messages in this
            conversation. The password is not stored; only ciphertext is
            persisted. Use the same password with `encryptionPassword` (POST
            message) and header `X-Conversation-Encryption-Password` (GET
            messages).
    Conversation:
      type: object
      required:
        - id
        - model
        - createdAt
        - encryptionEnabled
      properties:
        id:
          type: string
          format: uuid
        model:
          $ref: '#/components/schemas/ModelSummary'
        createdAt:
          type: string
          format: date-time
        encryptionEnabled:
          type: boolean
          description: >-
            True if the conversation was created with `encryptionPassword`
            (message bodies are encrypted at rest).
    ErrorBody:
      type: object
      properties:
        error:
          type: string
          description: Human-readable error
    ModelSummary:
      type: object
      description: Model embedded in conversation list (id and name only)
      required:
        - id
        - name
      properties:
        id:
          type: string
          format: uuid
        name:
          type: string
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: >-
        JWT from `POST /auth/login`, or an API key via the same header depending
        on client configuration.

````