Chat with an AI Agent
curl --request POST \
--url https://www.asteragents.com/api/chat \
--header 'Authorization: Bearer <token>'import requests
url = "https://www.asteragents.com/api/chat"
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
fetch('https://www.asteragents.com/api/chat', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://www.asteragents.com/api/chat",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://www.asteragents.com/api/chat"
req, _ := http.NewRequest("POST", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://www.asteragents.com/api/chat")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://www.asteragents.com/api/chat")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_bodyOther Endpoints
Chat with an AI Agent
Start or continue a conversation with an AI agent
POST
/
chat
Chat with an AI Agent
curl --request POST \
--url https://www.asteragents.com/api/chat \
--header 'Authorization: Bearer <token>'import requests
url = "https://www.asteragents.com/api/chat"
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
fetch('https://www.asteragents.com/api/chat', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://www.asteragents.com/api/chat",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://www.asteragents.com/api/chat"
req, _ := http.NewRequest("POST", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://www.asteragents.com/api/chat")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://www.asteragents.com/api/chat")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_bodySend a single
message with role: "user" and a parts array. Omit threadId
to create a conversation; supply the returned ID on subsequent messages.
Conversation titles
You can supply an optionaltitle when creating a conversation. It is trimmed,
must contain 1–120 characters, and must be a single line without control
characters. A supplied title is saved immediately and skips automatic naming.
For example, an automation can use Daily pipeline review · 2026-09-26.
When title is omitted, Aster generates a short title in the background using
your organization’s default chat model, the first message’s text and
attachment filenames, and bounded context about the agent’s name, description,
and role. Chat continues without waiting for the title. If the
model is unavailable or generation fails, the first-message fallback remains.
The sidebar shows a spinner while generation is pending, with a screen-reader-only “Naming conversation…” label.
Manual renames, including clearing the name, take precedence over generation.
title is creation-only: sending it with an existing threadId returns 400.
Use PATCH /api/renameConversation with { "threadId": "…", "name": "…" }
to rename an existing conversation.
Response modes
For API clients and automations, sendX-Stream-Response: false. The response
is 202 Accepted with { "threadId": "…", "status": "in_progress" }.
Poll GET /api/getConversation?threadId=… until streamStatus is terminal,
then read the assistant messages. The title may become available independently
of the assistant response.
Without that header, the endpoint returns an AI SDK UI-message SSE stream.
Both modes return the conversation ID in X-Thread-ID.
curl https://www.asteragents.com/api/chat \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Content-Type: application/json" \
-H "X-Stream-Response: false" \
-d '{
"agentId": 123,
"title": "Daily pipeline review · 2026-09-26",
"message": {
"role": "user",
"parts": [{"type": "text", "text": "Summarize the latest pipeline changes."}]
}
}'