AI chat completion
curl --request POST \
--url https://api.hoox.sh/agent/chat \
--header 'Content-Type: application/json' \
--data '
{
"messages": [
{
"content": "<string>"
}
],
"systemPrompt": "You are a helpful trading assistant.",
"prompt": "Summarize my trade history and win rate today.",
"temperature": 1,
"maxTokens": 2
}
'const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
messages: [{content: '<string>'}],
systemPrompt: 'You are a helpful trading assistant.',
prompt: 'Summarize my trade history and win rate today.',
temperature: 1,
maxTokens: 2
})
};
fetch('https://api.hoox.sh/agent/chat', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.hoox.sh/agent/chat"
payload = {
"messages": [{ "content": "<string>" }],
"systemPrompt": "You are a helpful trading assistant.",
"prompt": "Summarize my trade history and win rate today.",
"temperature": 1,
"maxTokens": 2
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"success": true,
"response": "<string>",
"model": "<string>",
"provider": "<string>",
"error": "<string>"
}{
"success": false,
"requestId": "9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d",
"error": "Invalid JSON payload structure."
}{
"success": false,
"requestId": "9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d",
"error": "Invalid JSON payload structure."
}{
"success": false,
"requestId": "9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d",
"error": "Invalid JSON payload structure."
}AI Agent
AI chat completion
Internal endpoint on agent-worker. Sends a chat-style prompt
to the configured multi-provider AI manager and returns the
completion. Supports custom system prompts, temperature, and
max tokens.
POST
/
agent
/
chat
AI chat completion
curl --request POST \
--url https://api.hoox.sh/agent/chat \
--header 'Content-Type: application/json' \
--data '
{
"messages": [
{
"content": "<string>"
}
],
"systemPrompt": "You are a helpful trading assistant.",
"prompt": "Summarize my trade history and win rate today.",
"temperature": 1,
"maxTokens": 2
}
'const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
messages: [{content: '<string>'}],
systemPrompt: 'You are a helpful trading assistant.',
prompt: 'Summarize my trade history and win rate today.',
temperature: 1,
maxTokens: 2
})
};
fetch('https://api.hoox.sh/agent/chat', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.hoox.sh/agent/chat"
payload = {
"messages": [{ "content": "<string>" }],
"systemPrompt": "You are a helpful trading assistant.",
"prompt": "Summarize my trade history and win rate today.",
"temperature": 1,
"maxTokens": 2
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"success": true,
"response": "<string>",
"model": "<string>",
"provider": "<string>",
"error": "<string>"
}{
"success": false,
"requestId": "9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d",
"error": "Invalid JSON payload structure."
}{
"success": false,
"requestId": "9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d",
"error": "Invalid JSON payload structure."
}{
"success": false,
"requestId": "9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d",
"error": "Invalid JSON payload structure."
}Body
application/json
System prompt (used if messages is omitted)
Example:
"You are a helpful trading assistant."
User prompt (used if messages is omitted)
Example:
"Summarize my trade history and win rate today."
Required range:
0 <= x <= 2Required range:
x >= 1Last modified on June 17, 2026
⌘I