Chat Query
6. Chat Query
Interactive AI-powered chat for company research.
Endpoint
POST /chat/query
Parameters
Parameter
Type
Required
Description
messages
array
Yes
Chat history with role and content
orbit_entity_id
string[]
No
Limit to specific companies (max: 5)
knowledge_base
string
No
filings, news, all (default: filings)
temperature
float
No
Response creativity (0-1, default: 0.3)
Example Request
bash
curl -X POST "https://api.orbitfin.ai/v1/chat/query" \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"messages": [
{
"role": "user",
"content": "Compare Apple and Microsoft R&D spending trends"
}
],
"orbit_entity_id": ["ent_2vxp8q3n", "ent_7kms9p2w"]
}'
Response
json
{
"status": "success",
"credits_used": 1.0,
"data": {
"response": "Based on the latest 10-K filings...",
"citations": [
{
"source": "AAPL 10-K 2024",
"page": 45,
"text": "Research and development expense was $29.9 billion"
}
],
"usage": {
"prompt_tokens": 156,
"completion_tokens": 892,
"total_tokens": 1048
}
}
}
Last updated