Chat

Send a webchat message

Changed on

Required scope: chat

Conditional sensitive scope: chat:admin

post/api/v1/chat

Request

  • Base URL
    http://localhost:6185
  • URL
    http://localhost:6185/api/v1/chat
  • Auth
    API key in header X-API-Key

Request body

localestring

UI locale for built-in LLM error messages. Omitted or unsupported locales fall back to zh-CN.

usernamestring

Caller-declared WebChat sender/session owner. Configured AstrBot administrator IDs require the chat:admin API key sub-scope.

session_idstring
conversation_idstring

Deprecated alias for session_id.

config_idstring
config_namestring
selected_providerstring
selected_modelstring
enable_streamingboolean

Deprecated compatibility field. It is used only when flags.enable_streaming is absent; otherwise flags.enable_streaming takes priority.

_skip_user_historyboolean

Internal WebUI flag for edit/regenerate flows.

_llm_checkpoint_idstring

Internal WebUI checkpoint override.

_platform_history_idstring

Internal WebUI platform history override.

_thread_selected_textstring

Internal WebUI side-thread context.

Response

Standard AstrBot success response

status'ok' required
messagestring
dataunknown required

Changes