Getting Started With Your API

This page will help you get started with GenAI Agent.

post/chat-messages

Request

  • Base URL
    https://web-aihub.cequens.com/v1
  • URL
    https://web-aihub.cequens.com/v1/chat-messages
  • Auth
    API key in header Authorization

Request body

querystring required

User Input/Question content

response_modestring required

The mode of response return, supporting: streaming Streaming mode, implements a typewriter-like output through SSE (Server-Sent Events). blocking Blocking mode, returns result after execution is complete. (Requests may be interrupted if the process is long) Due to Cloudflare restrictions, the request will be interrupted without a return after 100 seconds. Note: blocking mode is not supported in Agent Assistant mode

userstring required

User identifier, used to define the identity of the end-user for retrieval and statistics. Should be uniquely defined by the developer within the application.

inputsstring json required

Allows the entry of various variable values defined by the App. The inputs parameter contains multiple key/value pairs, with each key corresponding to a specific variable and each value being the specific value for that variable. Default {}

conversation_idstring

Converation ID, to continue the conversation based on previous chat records, it is necessary to pass the previous message's conversation_id.

filesobject[]

File list, suitable for inputting files (images) combined with text understanding and answering questions, available only when the model supports Vision capability.

typestring

Supported type: image (currently only supports image type)

transfer_methodstring

Transfer method, remote_url for image URL / local_file for file upload

urlstring

Image URL (when the transfer method is remote_url)

upload_file_idstring

Uploaded file ID, which must be obtained by uploading through the File Upload API in advance (when the transfer method is local_file)

auto_generate_nameboolean

Auto-generate title, default is true. If set to false, can achieve async title generation by calling the conversation rename API and setting auto_generate to true.

Changes

No recorded changes to this operation across all 1 revision of this API.