Skip to main content
POST
This endpoint requires authentication via JWT (for web users) or API key (for bot services).

Overview

The chat endpoint provides conversational AI capabilities powered by Anthropic tool use. The LLM understands natural language in any supported language, decides which tools to call (get_tasks, create_task_draft, log_mood, etc.), and returns responses grounded in real data. When tasks are detected, it creates drafts for user confirmation.

Request

string
required
The user’s message (1-2000 characters)
string
required
Source platform: web, slack, teams, or whatsapp
string
required
User identifier on the platform (user ID or UUID)
array
Recent conversation history for context. Each item should have role ("user" or "assistant") and content (the message content).

Response

string
The AI’s response message
string
Detected intent: task_create, task_list, mood, help, greeting, or general
object
Single task draft (when one task is detected). Contains id (Draft UUID), title (Parsed task title), priority (1-5), and optional dueDate.
array
Multiple task drafts (when several tasks are detected)Each item contains id, title, priority, and optional dueDate
array
Task list returned when the LLM calls get_tasks tool. Each item contains id, title, status, priority, dueDate, createdAt
object
Task that was just completed via the complete_task tool. Contains id, title, status
object
Mood entry just logged via the log_mood tool. Contains id, value, note, createdAt
array
Recent mood entries returned from get_mood_history tool
object
Task statistics from get_task_stats tool. Contains totalTasks, completedTasks, completionRate, openTasks, overdueTasks
boolean
Whether to show mood logging UI
integer
Mood value (1-5) inferred from the message, if detected

Intents

Service Endpoint

For bot services (Slack, Teams), use the service endpoint with API key authentication:
This endpoint uses the X-API-Key header instead of JWT Bearer token.

Language Support

Hitler supports 13 languages with automatic detection: The AI automatically detects the user’s language and responds appropriately:
Request (Spanish)
Response (Spanish)

Language Endpoints

Get Supported Languages
Returns the list of all supported languages. Get User’s Language
Returns the user’s current language preference. Update User’s Language
Sets the user’s preferred language, overriding auto-detection.

Notes

  • Task drafts created via chat must be confirmed using the Confirm Draft endpoint
  • The AI uses conversation history for context, but history is not persisted server-side
  • Mood inference happens silently and doesn’t interrupt the conversation
  • Response messages are kept short (8-12 words) for chat-like UX
  • Language is auto-detected from each message but can be manually set