Build trusted experiences with thinking-feeling AI.
Our API provides access to emotionally intelligent AI personas that engage in natural, human-like conversations. Built on think-feel-reply frameworks that consider neurological factors, emotional states, and linguistic nuance before generating responses.
TypeScript SDK
npm i @curvelabs.org/thinkfeelEmotionally Intelligent
AI that understands context, tone, and emotional subtext
Custom Personas
Work with us to craft a persona tailored to your use case
Stateless Architecture
Full control over conversation history and context
Transparent Pricing
Pay only for what you use at near inference costs
Getting Started
The Curve Labs API is currently available through our Early Access Beta program. Here's how to get started:
1 — Request Access
Fill out this Google Form with your details:
- Your name and email
- Company/project name
- Intended use case and target audience
- Expected usage volume
- Desired persona characteristics
2 — Onboarding Call
After receiving your request, our team will review the application (typically within 2-5 days). Upon approval, we'll schedule a 30-minute onboarding call to:
- Discuss your use case in detail
- Collaboratively craft a custom persona
- Define persona traits + communication style
- Give you a unique
personaIdand API key
3 — Start Building
After the onboarding call, you'll receive:
- Your unique API key
- Your custom
personaId - Access to this documentation
- Direct support channel via email
Beta Benefits
Authentication
All API requests must be authenticated using an API key passed in the request header.
Header Format
x-api-key: YOUR_API_KEY_HEREExample Request with Authentication
curl -X POST https://playground.curvelabs.org/api/v1/generate \ -H "Content-Type: application/json" \ -H "x-api-key: YOUR_API_KEY_HERE" \ -d '{ "personaId": "YOUR_PERSONA_ID", "messages": [ { "role": "user", "content": "Hello!" } ] }'
Security Best Practices
- Never expose your API key in client-side or public code
- Store API keys as environment variables/secrets
- Rotate keys periodically (contact us to issue a new key)
- Use HTTPS for all requests (HTTP requests will be rejected)
API Reference
/generateGenerate an AI response based on conversation history
Request Headers
| Header | Type | Required | Description |
|---|---|---|---|
| Content-Type | string | Yes | Must be application/json |
| x-api-key | string | Yes | Your API key |
Request Body Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| personaId | string | Yes | Your unique persona ID |
| messages | array | Yes | Array of conversation messages |
| messages[].role | string | Yes | Either user or assistant |
| messages[].content | string | Yes | The message content |
| includeVariations | boolean | No | Get alternative reply choices (default: false) |
Important Requirements
messages[]must contain at least one message- The last
messages[].rolemust beuser - Messages can alternate between user and assistant
Response Format (200 OK)
false){ "status": "success", "result": { "finalReply": "hey! what's up?" } }
true){ "status": "success", "result": { "replyChoices": [ "hey! what's up?", "hi there! how's it going?", "hey! good to hear from you" ], "finalReply": "hey! what's up?" } }
Custom Personas
Unlike traditional AI APIs that offer one-size-fits-all models, Curve Labs creates bespoke personas tailored specifically to your use case. During your onboarding call, we work with you to design an AI personality that perfectly matches your needs.
Personality Traits
- • Extraversion vs. Introversion: Energetic and outgoing vs. thoughtful and reserved
- • Emotional Tone: Warm, professional, playful, etc.
- • Confidence Level: Bold and assertive vs. humble
- • Humor Style: Dry wit, playful banter, or no humor
Communication Style
- • Formality: Casual slang vs. professional
- • Verbosity: Concise replies vs. detailed explanations
- • Emotional Expression: Expressive vs. reserved
- • Question Frequency: Inquisitive vs. statement-focused
Behavioral Guidelines
- • Role Definition: Friend, therapist, coach, assistant
- • Boundaries: Topics to avoid or handle sensitively
- • Engagement Style: Proactive vs. reactive
- • Cultural Context: Regional slang, cultural references
Use Case Optimization
- • Customer Support: Patient, solution-focused
- • Mental Wellness: Non-judgmental, validating
- • Entertainment: Engaging, playful, creative
- • Education: Encouraging, adaptive
Your Persona ID
During onboarding, you'll receive a unique personaId (UUID format) that you'll use in all API requests. This ID is tied to your custom persona configuration and can be refined over time based on your feedback and real-world usage patterns.
Code Examples
const axios = require("axios"); async function generateResponse(messages, includeVariations = false) { try { const response = await axios.post( "https://playground.curvelabs.org/api/v1/generate", { personaId: process.env.CURVE_PERSONA_ID, messages: messages, includeVariations: includeVariations, }, { headers: { "Content-Type": "application/json", "x-api-key": process.env.CURVE_API_KEY, }, } ); return response.data; } catch (error) { console.error("Error:", error.response?.data || error.message); throw error; } } // Example usage const messages = [ { role: "user", content: "Hey! What do you think about AI?" }, ]; generateResponse(messages).then((data) => { console.log("AI Response:", data.result.finalReply); });
Error Handling
The API uses standard HTTP status codes and returns detailed error messages.
| Status | Meaning | Description |
|---|---|---|
| 200 | Success | Request completed successfully |
| 401 | Unauthorized | Invalid or missing API key |
| 404 | Not Found | Invalid persona ID |
| 422 | Unprocessable Entity | Invalid request body or parameters |
| 429 | Too Many Requests | Rate limit exceeded |
| 500 | Internal Server Error | Server error (contact support if persistent) |
Error Response Format
{ "message": "Error description", "error": "Detailed error message" }
Best Practices
💬Maintain Conversation Context
To create coherent multi-turn conversations, always include previous messages:
const conversation = []; // First exchange conversation.push({ role: "user", content: "What do you do for fun?" }); let response = await api.generate(personaId, conversation); conversation.push({ role: "assistant", content: response.result.finalReply }); // Second exchange - includes full history conversation.push({ role: "user", content: "That sounds cool!" }); response = await api.generate(personaId, conversation);
✂️Trim Long Conversations
For very long conversations, consider truncating older messages to reduce latency:
function trimConversation(messages, maxMessages = 20) { if (messages.length <= maxMessages) { return messages; } // Keep the most recent messages return messages.slice(-maxMessages); }
🔒Never Expose API Keys
const response = await fetch(url, { headers: { "x-api-key": "abc123...", // Hardcoded key }, });
const response = await fetch(url, { headers: { "x-api-key": process.env.CURVE_API_KEY, // From environment }, });
Rate Limits
During the Early Access Beta, the following rate limits apply:
25
Req/min
100
Req/hour
500
Req/day
Note: These limits are subject to review and may be increased based on your use case. Contact us if you need higher limits.
Use Cases
Customer Support
Build empathetic support chatbots that understand emotional context and respond with appropriate empathy and solutions.
Companion Apps
Create engaging companion applications for mental wellness with warm, validating, and therapeutic personas.
Creative Writing
Develop interactive storytelling or roleplay experiences with immersive characters.
Language Learning
Build conversational language learning tools with encouraging and adaptive personas.
Support & Feedback
We're here to help you succeed with the ThinkFeel API by Curve Labs. You can expect a response time within 24 hours (weekdays). Beta users get direct access to our team.
What to Include in Support Requests
- Your API key (first 8 characters only)
- Timestamp of the issue
- Request and response examples (sanitize sensitive data)
- Error messages or unexpected behavior
- What you've already tried
Frequently Asked Questions
How much does the API cost during Beta?
How are personas created?
Is conversation history stored on your servers?
Should I use includeVariations in production?
includeVariations: true when you want to show users alternative response options or need to see what alternatives the AI generated.