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
API-key requests can authenticate with either the native ThinkFeel header or an OpenAI-style bearer token. Standard onboarding users should send one of these key headers on every request. Selected self-serve personas may also use a payment challenge flow instead of API keys when that path is explicitly enabled for your account.
Supported API key header formats
x-api-key: YOUR_API_KEY_HERE
Authorization: Bearer YOUR_API_KEY_HEREFor OpenAI-compatible clients, send your key as Authorization: Bearer. The x-api-key header is still supported for native ThinkFeel requests.
Example 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
OpenAI-Compatible Access
ThinkFeel now supports an OpenAI-style Completions endpoint at /api/v1/completions. OpenAI SDKs for Completions (including AI SDK) can point their base URL to https://playground.curvelabs.org/api/v1. Send either prompt or messages (not both) for multi-turn support.model must be your persona ID (UUID).
The ThinkFeel SDK is unchanged and continues to call /api/v1/generate, which remains the recommended path for the native response envelope and includeVariations.
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 |
| 400 | Bad Request | Invalid request payload (OpenAI-compatible endpoint) |
| 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 | Insufficient balance or quota exhausted on API-key billing |
| 500 | Internal Server Error | Server error (contact support if persistent) |
Native validation error format (/generate and /personify)
Unknown `personaId` was provided in the body.Native ThinkFeel endpoints return plain text for most validation and authentication errors. Quota and unexpected server errors may return JSON, so clients should check the response content type before parsing errors.
Requests without API-key headers may also receive a payment challenge instead of a JSON or plain-text error when self-serve payment access is enabled for the target persona.
OpenAI-Compatible Error Format (/completions)
{ "error": { "message": "Missing required model.", "type": "invalid_request_error", "param": "model", "code": null } }
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.