AI Chat API
Integrate multi-turn conversations, model calls, and tool connections into your application.
Basic conversation
Use model and question to send your first question.
Sessions and tools
Integrate session management and tool execution as needed for your business.
Multiple model access
Choose available models and their corresponding APIs from the current catalog.
Start with your first request
Get a Key, copy the request, and view the corresponding JSON response below.
export ACEDATACLOUD_API_KEY="YOUR_API_KEY"
curl --request POST "https://api.acedata.cloud/aichat/conversations" \
--header "Authorization: Bearer $ACEDATACLOUD_API_KEY" \
--header "Content-Type: application/json" \
--data '{"model":"gpt-6-luna","question":"Explain what an API is in one sentence."}'The following is an excerpt of key fields from the existing API response. The task identifier, usage, and generated content depend on the values returned by your request.
{
"answer": "I am an AI language model developed by OpenAI and I don't have a personal name. However, you can call me GPT or simply Chatbot. How can I assist you today?"
}Read the results
Read the full response or streaming events according to the selected API. Wait for tool operations and asynchronous executions to reach their respective final states before displaying results. Retain the required session identifiers and message context for subsequent conversations.
When you need session management and tool execution, see the AI Chat v2 Conversations guide. For standard model conversations, you can also select a published Chat Completions, Responses, or Messages API from the model catalog.
Usage and costs
Model prices and supported protocols are displayed in the model catalog. Check your application balance and Key permissions before running, and retain the trace_id if an error occurs.
Integrate the AI Chat API into your application
See the full guide for parameters, result fields, and error handling.
