Headers
-
X-API-Version
string Default value is
2025-03-25
.
Body
-
name
string Required The name of the replica.
Maximum length is
50
. -
purpose
string The purpose of the replica. This field is not used for training the replica.
Maximum length is
200
. -
shortDescription
string Required A short description of your replica. This field is not used for training the replica.
Maximum length is
50
. -
greeting
string Required The first thing your replica will say when you start a conversation with them.
Maximum length is
600
. -
type
string The replica type.
individual
: A replica of yourself.character
: A replica of a character: can be anything you want.brand
: A replica of a business persona or organization.Values are
individual
,character
, orbrand
. Default value ischaracter
. -
ownerID
string Required The replica owner ID.
-
private
boolean Visibility of the replica. When set to
true
, only the owner will be able to find the replica and chat with it.Default value is
false
. -
whitelistEmails
array[string(email)] Emails of users who can use the replica.
Default value is
[]
(empty). -
slug
string Required The slug of the replica. Slugs can be used by API consumers to determine the URLs where replicas can be found.
Maximum length is
50
. -
profileImage
string(uri) The URL of the profile image of the replica. The image will be downloaded, optimized and stored on our servers, so the URL in the response will be different. Supported formats: .jpg, .jpeg, .png, .bmp, .webp, .avif
Format should match the following pattern:
https?:\/\/[-a-zA-Z0-9@:%._+~#=]{1,256}\.[a-zA-Z0-9()]+\b([-a-zA-Z0-9()@:%_+.~#?&\/=]*)
. Default value ishttps://sensay.io/assets/default-replica-profile.webp
. -
suggestedQuestions
array[string] Suggested questions when starting a conversation.
Default value is
[]
(empty). -
llm
object Required -
voicePreviewText
string Text that can be used to generate a voice preview.
Maximum length is
400
.
curl \
--request POST 'https://api.sensay.io/v1/replicas' \
--header "X-ORGANIZATION-SECRET: $API_KEY" \
--header "Content-Type: application/json" \
--header "X-API-Version: 2025-03-25" \
--data '{"name":"John Smith","purpose":"Acts as my AI twin for answering questions about my creative work.","shortDescription":"John Smith is a 55 year old accountant from Brooklyn who loves sports and his family.","greeting":"What would you like to know?","type":"character","ownerID":"a-user-id","private":false,"whitelistEmails":["user@domain.example"],"slug":"example-replica","tags":["male","italian"],"profileImage":"https://images.invalid/photo.jpeg","suggestedQuestions":["What is the meaning of life?"],"llm":{"model":"gpt-4o","memoryMode":"rag-search","systemMessage":"Concise, knowledgeable, empathetic and cheerful.","tools":["getTokenInfo"]},"voicePreviewText":"Hi, I'm your Sensay replica! How can I assist you today?"}'
# Headers
X-API-Version: 2025-03-25
# Payload
{
"name": "John Smith",
"purpose": "Acts as my AI twin for answering questions about my creative work.",
"shortDescription": "John Smith is a 55 year old accountant from Brooklyn who loves sports and his family.",
"greeting": "What would you like to know?",
"type": "character",
"ownerID": "a-user-id",
"private": false,
"whitelistEmails": [
"user@domain.example"
],
"slug": "example-replica",
"tags": [
"male",
"italian"
],
"profileImage": "https://images.invalid/photo.jpeg",
"suggestedQuestions": [
"What is the meaning of life?"
],
"llm": {
"model": "gpt-4o",
"memoryMode": "rag-search",
"systemMessage": "Concise, knowledgeable, empathetic and cheerful.",
"tools": [
"getTokenInfo"
]
},
"voicePreviewText": "Hi, I'm your Sensay replica! How can I assist you today?"
}
{
"success": true,
"uuid": "654c2874-0b43-4d84-85fc-62ba866da1cb"
}
{
"success": true,
"error": "string",
"fingerprint": "14fceadd84e74ec499afe9b0f7952d6b",
"request_id": "xyz1::reg1:reg1::ab3c4-1234567890123-0123456789ab"
}
{
"success": true,
"error": "string",
"fingerprint": "14fceadd84e74ec499afe9b0f7952d6b",
"request_id": "xyz1::reg1:reg1::ab3c4-1234567890123-0123456789ab"
}
{
"success": true,
"error": "string",
"request_id": "xyz1::reg1:reg1::ab3c4-1234567890123-0123456789ab"
}
{
"success": true,
"error": "string",
"fingerprint": "14fceadd84e74ec499afe9b0f7952d6b",
"request_id": "xyz1::reg1:reg1::ab3c4-1234567890123-0123456789ab"
}
{
"success": true,
"error": "string",
"fingerprint": "14fceadd84e74ec499afe9b0f7952d6b",
"request_id": "xyz1::reg1:reg1::ab3c4-1234567890123-0123456789ab"
}
{
"success": true,
"error": "string",
"fingerprint": "14fceadd84e74ec499afe9b0f7952d6b",
"request_id": "xyz1::reg1:reg1::ab3c4-1234567890123-0123456789ab",
"inner_exception": {
"name": "Server overheated",
"cause": "Request too complicated",
"stack": "Error: Server overheated due to an unexpected situation\n at Object.eval (eval at <anonymous>...",
"message": "The server overheated due to an unexpected situation"
}
}