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

# Create a conversation



## OpenAPI

````yaml /api-reference/openapi.json post /api/v1/user/conversations
openapi: 3.1.0
info:
  title: 4MINDS API
  version: v1
  description: >-
    OpenAPI spec for the 4MINDS-native API (`/api/v1`), generated from the
    Python client's request/response definitions. Successful responses use the
    envelope `{"status":"success","data": ...}`; errors use
    `{"status":"error","message": ...}`.
servers:
  - url: https://api.4minds.ai
security:
  - bearerAuth: []
tags:
  - name: Models
  - name: Conversations
  - name: Datasets
  - name: Evaluations
  - name: Inference
paths:
  /api/v1/user/conversations:
    post:
      tags:
        - Conversations
      summary: Create a conversation
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ConversationCreate'
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                type: object
                required:
                  - status
                  - data
                properties:
                  status:
                    type: string
                    enum:
                      - success
                  data:
                    $ref: '#/components/schemas/Conversation'
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorEnvelope'
        '401':
          description: Invalid or missing API key
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorEnvelope'
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorEnvelope'
        '422':
          description: Validation error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorEnvelope'
        '429':
          description: Rate limited
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorEnvelope'
        '500':
          description: Server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorEnvelope'
components:
  schemas:
    ConversationCreate:
      type: object
      required:
        - model_id
      properties:
        model_id:
          type: integer
        title:
          type: string
          description: Non-empty label for the conversation.
    Conversation:
      additionalProperties: true
      properties:
        id:
          description: The unique string identifier of the conversation thread.
          title: Id
          type: string
        model_id:
          description: The integer ID of the backend model processing this thread.
          exclusiveMinimum: 0
          title: Model Id
          type: integer
        title:
          default: ''
          description: Subject line descriptor of the conversation.
          title: Title
          type: string
        message:
          anyOf:
            - type: string
            - type: 'null'
          default: null
          description: The body content text of the latest conversation block message.
          title: Message
        message_timestamp:
          anyOf:
            - format: date-time
              type: string
            - type: 'null'
          default: null
          description: Timestamp indicating message finalization.
          title: Message Timestamp
        created_at:
          description: Initial thread construction record timestamp.
          format: date-time
          title: Created At
          type: string
        updated_at:
          description: Latest modification tracking timestamp updates.
          format: date-time
          title: Updated At
          type: string
        total_messages:
          description: Accumulated transaction entry tracking total counts.
          minimum: 0
          title: Total Messages
          type: integer
      required:
        - id
        - model_id
        - created_at
        - updated_at
        - total_messages
      title: Conversation
      type: object
    ErrorEnvelope:
      type: object
      required:
        - status
        - message
      properties:
        status:
          type: string
          enum:
            - error
        message:
          type: string
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: >-
        Static, non-expiring API key: `Authorization: Bearer
        <FOURMINDS_API_KEY>`.

````