Curve Labs

ThinkFeel Emotion AI API

Curve Labs | Version 0.1.2 Beta

Early Access Beta

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/thinkfeel

Emotionally 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 personaId and 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

Custom Personas. Jailbreak Prevention. Near Inference Price. Direct Engineering Support. Continuous Improvement.
Start Building

Authentication

All API requests must be authenticated using an API key passed in the request header.

Header Format

x-api-key: YOUR_API_KEY_HERE

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

POST/generate

Generate an AI response based on conversation history

Request Headers

HeaderTypeRequiredDescription
Content-TypestringYesMust be application/json
x-api-keystringYesYour API key

Request Body Parameters

ParameterTypeRequiredDescription
personaIdstringYesYour unique persona ID
messagesarrayYesArray of conversation messages
messages[].rolestringYesEither user or assistant
messages[].contentstringYesThe message content
includeVariationsbooleanNoGet alternative reply choices (default: false)
Important Requirements
  • messages[] must contain at least one message
  • The last messages[].role must be user
  • Messages can alternate between user and assistant

Response Format (200 OK)

Default Response (includeVariations: false)
{
  "status": "success",
  "result": {
    "finalReply": "hey! what's up?"
  }
}
With Variations (includeVariations: 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.

StatusMeaningDescription
200SuccessRequest completed successfully
401UnauthorizedInvalid or missing API key
404Not FoundInvalid persona ID
422Unprocessable EntityInvalid request body or parameters
429Too Many RequestsRate limit exceeded
500Internal Server ErrorServer 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

❌ NEVER do this:
const response = await fetch(url, {
  headers: {
    "x-api-key": "abc123...", // Hardcoded key
  },
});
✅ DO this:
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
Contact Support

Frequently Asked Questions

How much does the API cost during Beta?
Beta access is provided at near inference cost pricing. You pay almost exactly what it costs us to run the models. This transparent pricing model ensures fairness. We may introduce a free tier in the future based on community feedback.
How are personas created?
During your onboarding call, we work with you to design a custom persona tailored to your specific use case. We collaboratively define personality traits, communication style, and behavioral guidelines that perfectly match your needs.
Is conversation history stored on your servers?
No. The API is completely stateless. You maintain full control over conversation history and manage it on your end.
Should I use includeVariations in production?
For most production use cases, the default slim response is sufficient. Enable includeVariations: true when you want to show users alternative response options or need to see what alternatives the AI generated.
Can I refine my persona after onboarding?
Absolutely! We encourage ongoing refinement. Contact us anytime to adjust your persona based on real-world usage and feedback.
What model powers the API?
We currently use a variety of open-weights models with custom tuning and scaffolding. The underlying model may evolve over time, but your persona's behavior will remain consistent.
Can I get higher rate limits?
Yes. Please contact us via this Google Form with your use case and expected volume. We're happy to accommodate higher limits for production-level projects.

Curve Labs API Documentation

Version 0.1.2 Beta | Last Updated: November 21, 2025

© 2025 Curve Labs. All rights reserved.