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
string
required
The user’s message content
string
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.string
default:"en"
🧪 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.
object
required
Context information for the conversation
array
File attachments for the message
string
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
header
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
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

