Chat API.
Integrate AI-powered chat into your apps.
The Chat API enables you to integrate Clear Tangle’s RAG-powered AI chat into your applications. Send messages, receive contextual responses with source citations, and manage conversation history programmatically.
Endpoints
Send a message
Send a message and receive an AI response with source citations from your knowledge base.
Request body
messagestringYesThe user message to sendconversationIdstringNoContinue existing conversationcontextobjectNoFilter context for RAG retrievaloptionsobjectNoModel and response optionsResponse
Context control
Control what information the AI has access to when generating responses. This is equivalent to using @mentions in the UI.
Streaming responses
Use the streaming endpoint for real-time responses. This is ideal for building interactive chat interfaces.
Stream event types
contentPartial response content to appendsourcesSource citations for the responseusageToken usage statisticsdoneStream complete signalerrorError occurred during streamingModel options
Customize the AI model behavior with these options:
modelstringdefaultModel to use (default uses optimal model for task)temperaturenumber0.7Response creativity (0–1)maxTokensinteger1000Maximum response lengthincludeSourceCitationsbooleantrueInclude source citationsmaxSourcesinteger5Maximum sources to includestreambooleanfalseEnable streaming (use /stream endpoint)Conversation management
Conversations are automatically created when you send a message without a conversationId. To continue a conversation, include the conversationId in subsequent requests.
List conversations
Get conversation messages
Rate limits
X-RateLimit-Chat-Remaining header.