AI Chat API
POSThttps://api.acedata.cloud/aichat/conversations

This API is based on LLM, providing artificial intelligence Q&A functionality, and supports multi-turn dialogue interaction and streaming responses.

Request Headers

acceptstring
Specify the response format returned by the server.
Please select
authorizationstring
Bearer token

Request Body

modelstringRequired parameter
The name of the large language model used to answer prompt words.
questionstringRequired parameter
Prompts or questions for the model to respond to.
statefulboolean
Whether to enable stateful conversation mode. Once enabled, the server will retain conversation history to support multi-turn continuous dialogue.
Please select
idstring
The unique identifier for the conversation, which can be used to continue an existing dialogue.
presetstring
Preset system prompts or dialogue configurations used to customize the model's response style and behavior.
referencesarray

Response

AI Dialogue
Allow Use General Balance

When 'Allow General Balance' is enabled, the general balance is used automatically if an app's balance is insufficient.

Shell

Python

JavaScript

Java

Go

PHP

Kind reminder: For streaming requests, the above code may not be fully applicable. Please refer to the integration documentation for changes.