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

# Create New Chat Session



## OpenAPI

````yaml POST /chat/create-chat-session
openapi: 3.1.0
info:
  title: Onyx API
  description: Onyx API for AI-powered enterprise search and chat
  version: Development
servers:
  - url: https://cloud.onyx.app/api
security: []
paths:
  /chat/create-chat-session:
    post:
      tags:
        - public
      summary: Create New Chat Session
      operationId: create_new_chat_session
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ChatSessionCreationRequest'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CreateChatSessionID'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - BearerAuth: []
components:
  schemas:
    ChatSessionCreationRequest:
      properties:
        persona_id:
          type: integer
          title: Persona Id
          default: 0
        description:
          anyOf:
            - type: string
            - type: 'null'
          title: Description
        project_id:
          anyOf:
            - type: integer
            - type: 'null'
          title: Project Id
      type: object
      title: ChatSessionCreationRequest
    CreateChatSessionID:
      properties:
        chat_session_id:
          type: string
          format: uuid
          title: Chat Session Id
      type: object
      required:
        - chat_session_id
      title: CreateChatSessionID
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      description: Authorization header with Bearer token

````