Recommended Approach: Use conversation threads for the best experience. They handle context automatically so you can focus on building great features.
Quick Integration Guide
Get up and running with the Cura AI API in just a few steps using conversation threads - the easiest way to build multi-turn conversations.Step 1: Authentication
All API requests require authentication. Add your API key to request headers:Base URL:
https://app.mycura.org/api/curaLearn more about authentication.Step 2: Create a Conversation Thread
Start by creating a thread - it acts as a container for your conversation with automatic context management.Step 3: Send Messages with Auto-Context
Now use thethreadId to send messages. The AI automatically remembers your conversation!
That’s it! The AI automatically maintains conversation context. No need to manually send conversation history arrays.
Why Use Threads?
Automatic Context
Server manages the last 20 messages for you - no manual history tracking
Isolated Conversations
Each thread is independent - perfect for multiple users or topics
Auto-Cleanup
Threads expire after 30 minutes of inactivity for privacy
Patient Linking
Optional patient linking gives AI medical context automatically
Alternative: Manual Context (Not Recommended)
You can also use the chat endpoint without threads, but you’ll need to manually manage conversation history:Next Steps
Now that you’ve built your first conversation with threads, dive deeper:Conversation Threads Guide
Complete guide to thread features, best practices, and advanced usage.
Thread API Reference
Detailed documentation for all thread management endpoints.
Patient Management
Create and manage patient records for richer AI context.
Best Practices
Production tips, error handling, and optimization techniques.

