---
title: "Getting Started With Your API"
method: POST
path: "/chat-messages"
---

# Getting Started With Your API

`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`

This page will help you get started with GenAI Agent.

## Request body

- object
  - `query` string, required: User Input/Question content
  - `response_mode` string, 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
  - `user` string, 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.
  - `inputs` string, 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_id` string: Converation ID, to continue the conversation based on previous chat records, it is necessary to pass the previous message's conversation_id.
  - `files` object[]: File list, suitable for inputting files (images) combined with text understanding and answering questions, available only when the model supports Vision capability.
  - `type` string: Supported type: image (currently only supports image type)
  - `transfer_method` string: Transfer method, remote_url for image URL / local_file for file upload
  - `url` string: Image URL (when the transfer method is remote_url)
  - `upload_file_id` string: 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_name` boolean: 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.

## Other responses

- `400`: 400
- `401`: 401
- `404`: 404
- `500`: 500

---

[API](https://skmtc.dev/cequens/apis/knowledge-base.md) - [All operations](https://skmtc.dev/cequens/apis/knowledge-base/llms.txt) - [OpenAPI document](https://skmtc.dev/cequens/apis/knowledge-base/revisions/226f35f0510c?raw)
