Authentication
All chat endpoints require a JWT Bearer token. Get your token from /api/auth/token.
GET /api/auth/token
Response:
{
"token": "eyJhbGciOiJIUzI1NiIs..."
}POST
/api/chat/perplexityAsk anything with real-time web search and citations.
Request Body
{
"query": "What is quantum computing?"
}Response
{
"result": "Quantum computing is...",
"meta": { "sources": [...] }
}cURL Example
curl -X POST https://chat-ai.strom-ai.my.id/api/chat/perplexity \
-H "Authorization: Bearer YOUR_JWT_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"query": "What is quantum computing?"
}'