We will start with a stock replica and persona. You’ll be using the stock replica ID re8e740a42 (Nathan) and stock persona ID p24293d6 (Celebrity DJ Twin). You can run this directly in the API documentation interface after entering your API key.

Step 1: Create a Conversation

  1. Endpoint: POST /v2/conversations

  2. Description: This endpoint creates a new joinable conversation with the specified replica and persona. You can add a custom conversational context to make the interaction more personalized and fun.

    • Conversational Context: This is an additional context that you can provide on top of the existing context in the persona. It’s a way to refine or make the conversation more specific for a particular session. For example, you can provide your favorite band or musical style as the conversational context to make the conversation more personalized.
  3. Request Body Example with Personalized Conversational Context:

{
  "replica_id": "re8e740a42",
  "persona_id": "p24293d6",
  "conversation_name": "Music Chat with DJ Kot",
  "conversational_context": "Talk about the greatest hits from my favorite band, Daft Punk, and how their style influenced modern electronic music.",
  "properties": {
    "enable_recording": true
  }
}
  • Explanation: In this example, the conversational_context is set to focus on the user’s favorite band, Daft Punk. This context will be used in addition to the persona’s default context, making the conversation more tailored and engaging.
  1. Response: The API will return a JSON object with details about the conversation, including a conversation_url that you can use to join the conversation.

Step 2: Join the Conversation

  • Response Example:
{
  "conversation_id": "abc123",
  "conversation_name": "Music Chat with DJ Kot",
  "status": "active",
  "conversation_url": "https://yourapi.com/conversations/abc123/join",
  "replica_id": "re8e740a42",
  "persona_id": "p24293d6",
  "created_at": "2024-08-13T12:34:56Z"
}
  • Join the Conversation: Use the conversation_url to join the conversation directly.
The conversation will timeout and end after 4 minutes by default.

Extra Credit!

  • Experiment with Different Combinations: Don’t hesitate to mix and match different Replicas and Personas, along with varying contexts. For example, try pairing a different Replica with the Celebrity DJ Twin persona and see how the conversation changes when you switch the context to discuss classical music or underground hip-hop. This experimentation can lead to unique and surprising interactions.

Enjoy exploring the diverse possibilities and have fun creating dynamic conversations!