Chat & Conversations
Human Intelligence API
Real-time conversations with personas powered by real human expertise
POST
Overview
The Human Intelligence API enables real-time conversations with personas trained on real human expertise. It uses Server-Sent Events (SSE) for streaming responses and supports file attachments, course context, and authenticated/anonymous users.Request Body
The user’s message content
Existing thread ID. If not provided, a new thread will be created automatically. The thread ID is returned in the response headers (
X-Thread-Id) and in the message data.🧪 Experimental FeatureISO 639-1 language code for responses. The persona will respond naturally in the specified language while maintaining their authentic voice and real human expertise.Supported Languages (65): English, Spanish, French, German, Chinese, Japanese, Arabic, Hebrew, Hindi, Portuguese, Russian, Italian, Korean, and 52 more.RTL Languages: Arabic (
ar), Hebrew (he), Persian (fa), Urdu (ur) automatically render right-to-left.Examples: en (English), es (Spanish), fr (French), zh (Chinese), ar (Arabic), he (Hebrew)This feature is in experimental phase. Language quality may vary by language and coaching context.
Context information for the conversation
File attachments for the message
Special action to execute:
create_knowledge- Create knowledge content (requires coach authentication)
Response
The API returns a streaming response using Server-Sent Events (SSE). The thread ID is included in both:- Response header:
X-Thread-Id - SSE message data
Thread ID for the conversation (in response headers)
- Each chunk is prefixed with
data: - Contains text chunks from the persona’s response (powered by real human knowledge)
- Final chunk signals completion
Features
- Real-time Streaming: Server-sent events for live responses
- Multilingual Support: Personas respond in 65 languages including RTL languages (Arabic, Hebrew, Persian, Urdu)
- Human Expertise: Each persona trained on real human knowledge and expertise
- Automatic Thread Management: Threads created automatically, ID returned in headers
- File Attachments: Support for images, PDFs, and documents
- Course Integration: Connect conversations to structured courses and lessons
- Mode-based Conversations: Different consultation modes per persona
- Anonymous & Authenticated: Works for both user types
- Knowledge Creation: Special
create_knowledgeaction for persona owners (requires authentication)
Thread Management
First Message (New Thread):- Don’t include
thread_idin request - API creates new thread automatically
- Thread ID returned in
X-Thread-Idheader - Store this ID for continuing the conversation
- Include
thread_idfrom previous response - Continues the conversation in same thread
- Maintains full conversation context
Authentication
- For Users: No authentication required for basic chat
- For Persona Owners: Bearer token required when using
action: "create_knowledge"- Include
Authorization: Bearer <jwt_token>header - Must be authenticated as the persona owner specified in
coachId
- Include
Use Cases
- 1-on-1 Conversations: Real-time persona consultations powered by real human expertise
- Course Learning: Contextual help within structured courses built on human knowledge
- Document Review: Upload files for persona feedback based on real expertise
- Knowledge Creation: Persona owners can create training content via chat
- Global Multilingual Support: Personas respond in user’s native language while maintaining authentic human voice
Supported Languages (65) 🧪 Experimental
The Chat API supports 65 languages for AI responses. Simply include thelanguage parameter with the ISO 639-1 code.
Language Codes Reference
| Code | Language | Native Name | Flag | Notes |
|---|---|---|---|---|
en | English | English | 🌍 | Default language |
sq | Albanian | Shqip | 🇦🇱 | |
am | Amharic | አማርኛ | 🇪🇹 | |
ar | Arabic | العربية | 🇸🇦 | RTL |
hy | Armenian | Հայերեն | 🇦🇲 | |
bn | Bengali | বাংলা | 🇧🇩 | |
bs | Bosnian | Bosanski | 🇧🇦 | |
bg | Bulgarian | Български | 🇧🇬 | |
my | Burmese | မြန်မာ | 🇲🇲 | |
ca | Catalan | Català | 🇪🇸 | |
zh | Chinese | 中文 | 🇨🇳 | |
hr | Croatian | Hrvatski | 🇭🇷 | |
cs | Czech | Čeština | 🇨🇿 | |
da | Danish | Dansk | 🇩🇰 | |
nl | Dutch | Nederlands | 🇳🇱 | |
et | Estonian | Eesti | 🇪🇪 | |
fi | Finnish | Suomi | 🇫🇮 | |
fr | French | Français | 🇫🇷 | |
ka | Georgian | ქართული | 🇬🇪 | |
de | German | Deutsch | 🇩🇪 | |
el | Greek | Ελληνικά | 🇬🇷 | |
gu | Gujarati | ગુજરાતી | 🇮🇳 | |
he | Hebrew | עברית | 🇮🇱 | RTL |
hi | Hindi | हिन्दी | 🇮🇳 | |
hu | Hungarian | Magyar | 🇭🇺 | |
is | Icelandic | Íslenska | 🇮🇸 | |
id | Indonesian | Bahasa Indonesia | 🇮🇩 | |
it | Italian | Italiano | 🇮🇹 | |
ja | Japanese | 日本語 | 🇯🇵 | |
kn | Kannada | ಕನ್ನಡ | 🇮🇳 | |
kk | Kazakh | Қазақша | 🇰🇿 | |
ko | Korean | 한국어 | 🇰🇷 | |
lv | Latvian | Latviešu | 🇱🇻 | |
lt | Lithuanian | Lietuvių | 🇱🇹 | |
mk | Macedonian | Македонски | 🇲🇰 | |
ms | Malay | Bahasa Melayu | 🇲🇾 | |
ml | Malayalam | മലയാളം | 🇮🇳 | |
mr | Marathi | मराठी | 🇮🇳 | |
mn | Mongolian | Монгол | 🇲🇳 | |
no | Norwegian | Norsk | 🇳🇴 | |
fa | Persian | فارسی | 🇮🇷 | RTL |
pl | Polish | Polski | 🇵🇱 | |
pt | Portuguese | Português | 🇵🇹 | |
pa | Punjabi | ਪੰਜਾਬੀ | 🇮🇳 | |
ro | Romanian | Română | 🇷🇴 | |
ru | Russian | Русский | 🇷🇺 | |
sr | Serbian | Српски | 🇷🇸 | |
sk | Slovak | Slovenčina | 🇸🇰 | |
sl | Slovenian | Slovenščina | 🇸🇮 | |
so | Somali | Soomaali | 🇸🇴 | |
es | Spanish | Español | 🇪🇸 | |
sw | Swahili | Kiswahili | 🇰🇪 | |
sv | Swedish | Svenska | 🇸🇪 | |
tl | Tagalog | Tagalog | 🇵🇭 | |
ta | Tamil | தமிழ் | 🇮🇳 | |
te | Telugu | తెలుగు | 🇮🇳 | |
th | Thai | ไทย | 🇹🇭 | |
tr | Turkish | Türkçe | 🇹🇷 | |
uk | Ukrainian | Українська | 🇺🇦 | |
ur | Urdu | اردو | 🇵🇰 | RTL |
vi | Vietnamese | Tiếng Việt | 🇻🇳 |
Right-to-Left (RTL) Languages
Four languages automatically render right-to-left:- Arabic (
ar) - 🇸🇦 العربية - Hebrew (
he) - 🇮🇱 עברית - Persian (
fa) - 🇮🇷 فارسی - Urdu (
ur) - 🇵🇰 اردو
Usage Notes
- Defaults to English: If
languageparameter is omitted or invalid, defaults toen - Case Sensitive: Use lowercase codes (
es, notES) - Natural Responses: AI maintains coaching style while responding in selected language
- No Translation Needed: User can send messages in any language; specify response language with
languageparameter

