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

# Aichat2 Conversations



## OpenAPI

````yaml /openapi/aichat.json post /aichat2/conversations
openapi: 3.0.0
info:
  title: AI Dialogue
  version: 1.0.0
  description: API reference for AI Dialogue on Ace Data Cloud.
servers:
  - url: https://api.acedata.cloud
    description: Ace Data Cloud API
security:
  - bearerAuth: []
paths:
  /aichat2/conversations:
    post:
      summary: Aichat2 Conversations
      parameters:
        - in: header
          name: accept
          schema:
            enum:
              - application/json
              - application/x-ndjson
              - text/event-stream
            type: string
          required: false
          description: Aichat2 Conversations Param Accept
      requestBody:
        content:
          application/json:
            schema:
              type: object
              required:
                - model
              properties:
                action:
                  type: string
                  enum:
                    - chat
                    - retrieve
                    - retrieve_batch
                    - update
                    - delete
                  description: Aichat2 Conversations Action
                id:
                  type: string
                  description: Aichat2 Conversations Id
                model:
                  enum:
                    - gpt-4
                    - gpt-4.1
                    - gpt-4.1-mini
                    - gpt-4.1-nano
                    - gpt-4o
                    - gpt-4o-2024-05-13
                    - gpt-4o-all
                    - gpt-4o-image
                    - gpt-4o-mini
                    - gpt-5-all
                    - gpt-5.1-all
                    - gpt-5.2-pro
                    - gpt-5.4-mini
                    - gpt-5.4-nano
                    - gpt-image-1
                    - claude-3-5-haiku-20241022
                    - claude-3-5-sonnet-20240620
                    - claude-3-5-sonnet-20241022
                    - claude-3-7-sonnet-20250219
                    - claude-3-haiku-20240307
                    - claude-3-opus-20240229
                    - claude-3-sonnet-20240229
                    - claude-haiku-4-5-20251001
                    - claude-opus-4-1-20250805
                    - claude-opus-4-20250514
                    - claude-opus-4-5-20251101
                    - claude-opus-4-6
                    - claude-opus-4-8
                    - claude-opus-4-7
                    - claude-sonnet-4-20250514
                    - claude-sonnet-4-5-20250929
                    - claude-sonnet-4-6
                    - claude-sonnet-5
                    - gemini-2.0-flash-lite
                    - gemini-2.5-flash-lite
                    - gemini-3-pro-preview
                    - gemini-3.1-flash-image-preview
                    - gemini-3.1-flash-lite-preview
                    - gemini-3.1-pro
                    - gemini-3.1-pro-preview
                    - grok-3
                    - grok-3-fast
                    - grok-4
                    - grok-4-0709
                    - deepseek-chat
                    - deepseek-r1
                    - deepseek-r1-0528
                    - deepseek-reasoner
                    - deepseek-v3
                    - deepseek-v3-250324
                    - deepseek-v3.2-exp
                    - deepseek-v4-flash
                    - kimi-k2-0711-preview
                    - kimi-k2-0905-preview
                    - kimi-k2-instruct-0905
                    - kimi-k2-thinking
                    - kimi-k2-thinking-turbo
                    - kimi-k2-turbo-preview
                    - kimi-k2.5
                    - glm-3-turbo
                    - glm-4.5
                    - glm-4.5v
                    - glm-4.6
                    - glm-4.7
                    - glm-5
                    - glm-5-turbo
                    - glm-5.2
                    - glm-5.1
                    - o1
                    - o1-mini
                    - o1-pro
                    - o3
                    - o3-mini
                    - o3-pro
                    - o4-mini
                  type: string
                  description: Aichat2 Conversations Model
                question:
                  type: string
                  description: Aichat2 Conversations Question
                message:
                  description: Aichat2 Conversations Message
                  oneOf:
                    - type: string
                    - type: array
                      items:
                        type: object
                        properties:
                          type:
                            type: string
                            enum:
                              - text
                              - image_url
                              - file_url
                          text:
                            type: string
                            description: Aichat2 Conversations Message Text
                          image_url:
                            type: object
                            description: Aichat2 Conversations Message Image Url
                            properties:
                              url:
                                type: string
                          file_url:
                            type: object
                            description: Aichat2 Conversations Message File Url
                            properties:
                              url:
                                type: string
                stateful:
                  type: boolean
                  default: true
                  description: Aichat2 Conversations Stateful
                references:
                  type: array
                  description: Aichat2 Conversations References
                  items:
                    type: string
                preset:
                  type: string
                  description: Aichat2 Conversations Preset
                max_turns:
                  type: integer
                  minimum: 1
                  description: Aichat2 Conversations Max Turns
                async:
                  type: boolean
                  default: false
                  description: Aichat2 Conversations Async
                callback_url:
                  type: string
                  description: Aichat2 Conversations Callback Url
                allowed_skills:
                  type: array
                  description: Aichat2 Conversations Allowed Skills
                  items:
                    type: string
                allowed_mcp_servers:
                  type: array
                  description: Aichat2 Conversations Allowed Mcp Servers
                  items:
                    type: string
                unattended_policy:
                  type: object
                  description: Aichat2 Conversations Unattended Policy
                  properties:
                    mode:
                      type: string
                      enum:
                        - deny_all
                        - allow_selected
                    allowed_skills:
                      type: array
                      items:
                        type: string
                    allowed_mcp_servers:
                      type: array
                      items:
                        type: string
                    expires_at:
                      type: integer
                tool_results:
                  type: array
                  description: Aichat2 Conversations Tool Results
                  items:
                    type: object
                    required:
                      - tool_use_id
                      - output
                    properties:
                      tool_use_id:
                        type: string
                        description: Aichat2 Conversations Tool Results Tool Use Id
                      output:
                        type: string
                        description: Aichat2 Conversations Tool Results Output
                      is_error:
                        type: boolean
                        description: Aichat2 Conversations Tool Results Is Error
                messages:
                  type: array
                  description: Aichat2 Conversations Messages
                  items:
                    type: object
                title:
                  type: string
                  description: Aichat2 Conversations Title
                user_id:
                  type: string
                  description: Aichat2 Conversations User Id
                application_id:
                  type: string
                  description: Aichat2 Conversations Application Id
                model_group:
                  type: string
                  enum:
                    - chatgpt
                    - claude
                    - gemini
                    - grok
                    - kimi
                    - glm
                    - deepseek
                  description: Aichat2 Conversations Model Group
                offset:
                  type: integer
                  minimum: 0
                  default: 0
                  description: Aichat2 Conversations Offset
                limit:
                  type: integer
                  minimum: 1
                  maximum: 100
                  default: 100
                  description: Aichat2 Conversations Limit
            example:
              model: gpt-4
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                type: object
                example:
                  id: f2f4b3e8-0c0a-4d3a-aaa2-7ff80c0a1c44
                  answer: Hi! I'm an AI assistant. How can I help you today?
                properties:
                  id:
                    type: string
                    description: Aichat2 Conversations Response 200 Id
                  answer:
                    type: string
                    description: Aichat2 Conversations Response 200 Answer
            application/x-ndjson:
              schema:
                type: object
                description: Aichat2 Conversations Response 200 Application X Ndjson
                example:
                  type: text_delta
                  content: ' today'
                  delta_answer: ' today'
                  answer: Hello! How can I assist you today
                  id: f2f4b3e8-0c0a-4d3a-aaa2-7ff80c0a1c44
            text/event-stream:
              schema:
                type: object
                description: Aichat2 Conversations Response 200 Text Event Stream
          description: Aichat2 Conversations Response 200
        '400':
          content:
            application/json:
              schema:
                oneOf:
                  - type: object
                    example:
                      error:
                        code: bad_request
                        message: model is required
                      trace_id: 2efa9340-b21b-4e26-9e14-4aac95f343ab
                    properties:
                      error:
                        type: object
                        properties:
                          code:
                            type: string
                            example: bad_request
                            description: Aichat2 Conversations Response 400 Error Code
                          message:
                            type: string
                            example: model is required
                            description: Aichat2 Conversations Response 400 Error Message
                      trace_id:
                        type: string
                        description: Aichat2 Conversations Response 400 Trace Id
                  - type: object
                    example:
                      error:
                        code: token_mismatched
                        message: The specified token is not matched with API.
                      trace_id: 2efa9340-b21b-4e26-9e14-4aac95f343ab
                    properties:
                      error:
                        type: object
                        properties:
                          code:
                            type: string
                            example: token_mismatched
                            description: Aichat2 Conversations Response 400 Error Code 2
                          message:
                            type: string
                            example: The specified token is not matched with API.
                            description: Aichat2 Conversations Response 400 Error Message 2
                      trace_id:
                        type: string
                        description: Aichat2 Conversations Response 400 Trace Id 2
          description: Aichat2 Conversations Response 400
        '401':
          content:
            application/json:
              schema:
                oneOf:
                  - type: object
                    example:
                      error:
                        code: invalid_token
                        message: The specified token is invalid or wrong.
                      trace_id: 2efa9340-b21b-4e26-9e14-4aac95f343ab
                    properties:
                      error:
                        type: object
                        properties:
                          code:
                            type: string
                            example: invalid_token
                            description: Aichat2 Conversations Response 401 Error Code
                          message:
                            type: string
                            example: The specified token is invalid or wrong.
                            description: Aichat2 Conversations Response 401 Error Message
                      trace_id:
                        type: string
                        description: Aichat2 Conversations Response 401 Trace Id
          description: Aichat2 Conversations Response 401
        '404':
          content:
            application/json:
              schema:
                type: object
                example:
                  error:
                    code: not_found
                    message: conversation not found
                  trace_id: 2efa9340-b21b-4e26-9e14-4aac95f343ab
                properties:
                  error:
                    type: object
                    properties:
                      code:
                        type: string
                        example: not_found
                        description: Aichat2 Conversations Response 404 Error Code
                      message:
                        type: string
                        example: conversation not found
                        description: Aichat2 Conversations Response 404 Error Message
                  trace_id:
                    type: string
                    description: Aichat2 Conversations Response 404 Trace Id
          description: Aichat2 Conversations Response 404
        '429':
          content:
            application/json:
              schema:
                type: object
                example:
                  error:
                    code: too_many_requests
                    message: You have exceeded the rate limit.
                  trace_id: 2efa9340-b21b-4e26-9e14-4aac95f343ab
                properties:
                  error:
                    type: object
                    properties:
                      code:
                        type: string
                        example: too_many_requests
                        description: Aichat2 Conversations Response 429 Error Code
                      message:
                        type: string
                        example: You have exceeded the rate limit.
                        description: Aichat2 Conversations Response 429 Error Message
                  trace_id:
                    type: string
                    description: Aichat2 Conversations Response 429 Trace Id
          description: Aichat2 Conversations Response 429
        '500':
          content:
            application/json:
              schema:
                type: object
                example:
                  error:
                    code: chat_error
                    message: upstream LLM returned an error
                  trace_id: 2efa9340-b21b-4e26-9e14-4aac95f343ab
                properties:
                  error:
                    type: object
                    properties:
                      code:
                        type: string
                        example: chat_error
                        description: Aichat2 Conversations Response 500 Error Code
                      message:
                        type: string
                        example: upstream LLM returned an error
                        description: Aichat2 Conversations Response 500 Error Message
                  trace_id:
                    type: string
                    description: Aichat2 Conversations Response 500 Trace Id
          description: Aichat2 Conversations Response 500
      security:
        - bearerAuth: []
components:
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: API token from https://platform.acedata.cloud

````