curl --request POST \
--url https://app.npcbuilder.com/api/context/characters/{game_id}/{world_id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data @- <<EOF
{
"age": "adult",
"description": "A brave warrior with a mysterious past.",
"gender": "Male",
"model": "standard",
"filters": {
"active": true,
"violence": false,
"sexual": false,
"drugs": true
},
"items": [
{
"type": "trade",
"itemName": "sword",
"unit": "Piece",
"value": 100,
"description": "A sharp sword."
}
],
"events": [
{
"type": "item",
"eventName": "Attack",
"description": "Act of violence against another person."
}
],
"name": "Aragorn",
"quests": [
{
"description": "Retrieve the lost artifact.",
"objective": "Find and return the artifact.",
"reward": "500 gold coins"
}
],
"role": "protagonist",
"tone": "mysterious",
"traits": [
"brave"
],
"personality_theory": "basicTraits",
"personality_dimensions": {
"machiavellianism": 4,
"narcissism": 2,
"psychopathy": 1
},
"speech_pattern": {
"vocabulary_level": "sophisticated",
"sentence_length": "terse",
"verbal_quirks": "Always says 'dear friend'"
}
}
EOFimport requests
url = "https://app.npcbuilder.com/api/context/characters/{game_id}/{world_id}"
payload = {
"age": "adult",
"description": "A brave warrior with a mysterious past.",
"gender": "Male",
"model": "standard",
"filters": {
"active": True,
"violence": False,
"sexual": False,
"drugs": True
},
"items": [
{
"type": "trade",
"itemName": "sword",
"unit": "Piece",
"value": 100,
"description": "A sharp sword."
}
],
"events": [
{
"type": "item",
"eventName": "Attack",
"description": "Act of violence against another person."
}
],
"name": "Aragorn",
"quests": [
{
"description": "Retrieve the lost artifact.",
"objective": "Find and return the artifact.",
"reward": "500 gold coins"
}
],
"role": "protagonist",
"tone": "mysterious",
"traits": ["brave"],
"personality_theory": "basicTraits",
"personality_dimensions": {
"machiavellianism": 4,
"narcissism": 2,
"psychopathy": 1
},
"speech_pattern": {
"vocabulary_level": "sophisticated",
"sentence_length": "terse",
"verbal_quirks": "Always says 'dear friend'"
}
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
age: 'adult',
description: 'A brave warrior with a mysterious past.',
gender: 'Male',
model: 'standard',
filters: {active: true, violence: false, sexual: false, drugs: true},
items: [
{
type: 'trade',
itemName: 'sword',
unit: 'Piece',
value: 100,
description: 'A sharp sword.'
}
],
events: [
{
type: 'item',
eventName: 'Attack',
description: 'Act of violence against another person.'
}
],
name: 'Aragorn',
quests: [
{
description: 'Retrieve the lost artifact.',
objective: 'Find and return the artifact.',
reward: '500 gold coins'
}
],
role: 'protagonist',
tone: 'mysterious',
traits: ['brave'],
personality_theory: 'basicTraits',
personality_dimensions: {machiavellianism: 4, narcissism: 2, psychopathy: 1},
speech_pattern: {
vocabulary_level: 'sophisticated',
sentence_length: 'terse',
verbal_quirks: 'Always says \'dear friend\''
}
})
};
fetch('https://app.npcbuilder.com/api/context/characters/{game_id}/{world_id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://app.npcbuilder.com/api/context/characters/{game_id}/{world_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'age' => 'adult',
'description' => 'A brave warrior with a mysterious past.',
'gender' => 'Male',
'model' => 'standard',
'filters' => [
'active' => true,
'violence' => false,
'sexual' => false,
'drugs' => true
],
'items' => [
[
'type' => 'trade',
'itemName' => 'sword',
'unit' => 'Piece',
'value' => 100,
'description' => 'A sharp sword.'
]
],
'events' => [
[
'type' => 'item',
'eventName' => 'Attack',
'description' => 'Act of violence against another person.'
]
],
'name' => 'Aragorn',
'quests' => [
[
'description' => 'Retrieve the lost artifact.',
'objective' => 'Find and return the artifact.',
'reward' => '500 gold coins'
]
],
'role' => 'protagonist',
'tone' => 'mysterious',
'traits' => [
'brave'
],
'personality_theory' => 'basicTraits',
'personality_dimensions' => [
'machiavellianism' => 4,
'narcissism' => 2,
'psychopathy' => 1
],
'speech_pattern' => [
'vocabulary_level' => 'sophisticated',
'sentence_length' => 'terse',
'verbal_quirks' => 'Always says \'dear friend\''
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://app.npcbuilder.com/api/context/characters/{game_id}/{world_id}"
payload := strings.NewReader("{\n \"age\": \"adult\",\n \"description\": \"A brave warrior with a mysterious past.\",\n \"gender\": \"Male\",\n \"model\": \"standard\",\n \"filters\": {\n \"active\": true,\n \"violence\": false,\n \"sexual\": false,\n \"drugs\": true\n },\n \"items\": [\n {\n \"type\": \"trade\",\n \"itemName\": \"sword\",\n \"unit\": \"Piece\",\n \"value\": 100,\n \"description\": \"A sharp sword.\"\n }\n ],\n \"events\": [\n {\n \"type\": \"item\",\n \"eventName\": \"Attack\",\n \"description\": \"Act of violence against another person.\"\n }\n ],\n \"name\": \"Aragorn\",\n \"quests\": [\n {\n \"description\": \"Retrieve the lost artifact.\",\n \"objective\": \"Find and return the artifact.\",\n \"reward\": \"500 gold coins\"\n }\n ],\n \"role\": \"protagonist\",\n \"tone\": \"mysterious\",\n \"traits\": [\n \"brave\"\n ],\n \"personality_theory\": \"basicTraits\",\n \"personality_dimensions\": {\n \"machiavellianism\": 4,\n \"narcissism\": 2,\n \"psychopathy\": 1\n },\n \"speech_pattern\": {\n \"vocabulary_level\": \"sophisticated\",\n \"sentence_length\": \"terse\",\n \"verbal_quirks\": \"Always says 'dear friend'\"\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://app.npcbuilder.com/api/context/characters/{game_id}/{world_id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"age\": \"adult\",\n \"description\": \"A brave warrior with a mysterious past.\",\n \"gender\": \"Male\",\n \"model\": \"standard\",\n \"filters\": {\n \"active\": true,\n \"violence\": false,\n \"sexual\": false,\n \"drugs\": true\n },\n \"items\": [\n {\n \"type\": \"trade\",\n \"itemName\": \"sword\",\n \"unit\": \"Piece\",\n \"value\": 100,\n \"description\": \"A sharp sword.\"\n }\n ],\n \"events\": [\n {\n \"type\": \"item\",\n \"eventName\": \"Attack\",\n \"description\": \"Act of violence against another person.\"\n }\n ],\n \"name\": \"Aragorn\",\n \"quests\": [\n {\n \"description\": \"Retrieve the lost artifact.\",\n \"objective\": \"Find and return the artifact.\",\n \"reward\": \"500 gold coins\"\n }\n ],\n \"role\": \"protagonist\",\n \"tone\": \"mysterious\",\n \"traits\": [\n \"brave\"\n ],\n \"personality_theory\": \"basicTraits\",\n \"personality_dimensions\": {\n \"machiavellianism\": 4,\n \"narcissism\": 2,\n \"psychopathy\": 1\n },\n \"speech_pattern\": {\n \"vocabulary_level\": \"sophisticated\",\n \"sentence_length\": \"terse\",\n \"verbal_quirks\": \"Always says 'dear friend'\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.npcbuilder.com/api/context/characters/{game_id}/{world_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"age\": \"adult\",\n \"description\": \"A brave warrior with a mysterious past.\",\n \"gender\": \"Male\",\n \"model\": \"standard\",\n \"filters\": {\n \"active\": true,\n \"violence\": false,\n \"sexual\": false,\n \"drugs\": true\n },\n \"items\": [\n {\n \"type\": \"trade\",\n \"itemName\": \"sword\",\n \"unit\": \"Piece\",\n \"value\": 100,\n \"description\": \"A sharp sword.\"\n }\n ],\n \"events\": [\n {\n \"type\": \"item\",\n \"eventName\": \"Attack\",\n \"description\": \"Act of violence against another person.\"\n }\n ],\n \"name\": \"Aragorn\",\n \"quests\": [\n {\n \"description\": \"Retrieve the lost artifact.\",\n \"objective\": \"Find and return the artifact.\",\n \"reward\": \"500 gold coins\"\n }\n ],\n \"role\": \"protagonist\",\n \"tone\": \"mysterious\",\n \"traits\": [\n \"brave\"\n ],\n \"personality_theory\": \"basicTraits\",\n \"personality_dimensions\": {\n \"machiavellianism\": 4,\n \"narcissism\": 2,\n \"psychopathy\": 1\n },\n \"speech_pattern\": {\n \"vocabulary_level\": \"sophisticated\",\n \"sentence_length\": \"terse\",\n \"verbal_quirks\": \"Always says 'dear friend'\"\n }\n}"
response = http.request(request)
puts response.read_body{
"message": "Character: character789 has been created with the following context.",
"character_id": "character789",
"character_context": {
"age": "adult",
"description": "A brave warrior with a mysterious past.",
"gender": "Male",
"items": [
{
"itemName": "sword",
"unit": "Piece",
"value": 100
}
],
"name": "Aragorn",
"quests": [
{
"description": "Retrieve the lost artifact.",
"objective": "Find and return the artifact.",
"reward": "500 gold coins"
}
],
"role": "protagonist",
"tone": "mysterious",
"traits": [
"brave"
],
"personality_theory": "basicTraits",
"personality_dimensions": {}
}
}{
"message": "An error occurred"
}{
"message": "Possible reasons:\n- Character not found\n"
}{
"message": "An error occurred"
}Create a new character
Create a new character within the specified game and world. Provide details such as age, description, gender, items, events, quests, role, tone, and traits.
curl --request POST \
--url https://app.npcbuilder.com/api/context/characters/{game_id}/{world_id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data @- <<EOF
{
"age": "adult",
"description": "A brave warrior with a mysterious past.",
"gender": "Male",
"model": "standard",
"filters": {
"active": true,
"violence": false,
"sexual": false,
"drugs": true
},
"items": [
{
"type": "trade",
"itemName": "sword",
"unit": "Piece",
"value": 100,
"description": "A sharp sword."
}
],
"events": [
{
"type": "item",
"eventName": "Attack",
"description": "Act of violence against another person."
}
],
"name": "Aragorn",
"quests": [
{
"description": "Retrieve the lost artifact.",
"objective": "Find and return the artifact.",
"reward": "500 gold coins"
}
],
"role": "protagonist",
"tone": "mysterious",
"traits": [
"brave"
],
"personality_theory": "basicTraits",
"personality_dimensions": {
"machiavellianism": 4,
"narcissism": 2,
"psychopathy": 1
},
"speech_pattern": {
"vocabulary_level": "sophisticated",
"sentence_length": "terse",
"verbal_quirks": "Always says 'dear friend'"
}
}
EOFimport requests
url = "https://app.npcbuilder.com/api/context/characters/{game_id}/{world_id}"
payload = {
"age": "adult",
"description": "A brave warrior with a mysterious past.",
"gender": "Male",
"model": "standard",
"filters": {
"active": True,
"violence": False,
"sexual": False,
"drugs": True
},
"items": [
{
"type": "trade",
"itemName": "sword",
"unit": "Piece",
"value": 100,
"description": "A sharp sword."
}
],
"events": [
{
"type": "item",
"eventName": "Attack",
"description": "Act of violence against another person."
}
],
"name": "Aragorn",
"quests": [
{
"description": "Retrieve the lost artifact.",
"objective": "Find and return the artifact.",
"reward": "500 gold coins"
}
],
"role": "protagonist",
"tone": "mysterious",
"traits": ["brave"],
"personality_theory": "basicTraits",
"personality_dimensions": {
"machiavellianism": 4,
"narcissism": 2,
"psychopathy": 1
},
"speech_pattern": {
"vocabulary_level": "sophisticated",
"sentence_length": "terse",
"verbal_quirks": "Always says 'dear friend'"
}
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
age: 'adult',
description: 'A brave warrior with a mysterious past.',
gender: 'Male',
model: 'standard',
filters: {active: true, violence: false, sexual: false, drugs: true},
items: [
{
type: 'trade',
itemName: 'sword',
unit: 'Piece',
value: 100,
description: 'A sharp sword.'
}
],
events: [
{
type: 'item',
eventName: 'Attack',
description: 'Act of violence against another person.'
}
],
name: 'Aragorn',
quests: [
{
description: 'Retrieve the lost artifact.',
objective: 'Find and return the artifact.',
reward: '500 gold coins'
}
],
role: 'protagonist',
tone: 'mysterious',
traits: ['brave'],
personality_theory: 'basicTraits',
personality_dimensions: {machiavellianism: 4, narcissism: 2, psychopathy: 1},
speech_pattern: {
vocabulary_level: 'sophisticated',
sentence_length: 'terse',
verbal_quirks: 'Always says \'dear friend\''
}
})
};
fetch('https://app.npcbuilder.com/api/context/characters/{game_id}/{world_id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://app.npcbuilder.com/api/context/characters/{game_id}/{world_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'age' => 'adult',
'description' => 'A brave warrior with a mysterious past.',
'gender' => 'Male',
'model' => 'standard',
'filters' => [
'active' => true,
'violence' => false,
'sexual' => false,
'drugs' => true
],
'items' => [
[
'type' => 'trade',
'itemName' => 'sword',
'unit' => 'Piece',
'value' => 100,
'description' => 'A sharp sword.'
]
],
'events' => [
[
'type' => 'item',
'eventName' => 'Attack',
'description' => 'Act of violence against another person.'
]
],
'name' => 'Aragorn',
'quests' => [
[
'description' => 'Retrieve the lost artifact.',
'objective' => 'Find and return the artifact.',
'reward' => '500 gold coins'
]
],
'role' => 'protagonist',
'tone' => 'mysterious',
'traits' => [
'brave'
],
'personality_theory' => 'basicTraits',
'personality_dimensions' => [
'machiavellianism' => 4,
'narcissism' => 2,
'psychopathy' => 1
],
'speech_pattern' => [
'vocabulary_level' => 'sophisticated',
'sentence_length' => 'terse',
'verbal_quirks' => 'Always says \'dear friend\''
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://app.npcbuilder.com/api/context/characters/{game_id}/{world_id}"
payload := strings.NewReader("{\n \"age\": \"adult\",\n \"description\": \"A brave warrior with a mysterious past.\",\n \"gender\": \"Male\",\n \"model\": \"standard\",\n \"filters\": {\n \"active\": true,\n \"violence\": false,\n \"sexual\": false,\n \"drugs\": true\n },\n \"items\": [\n {\n \"type\": \"trade\",\n \"itemName\": \"sword\",\n \"unit\": \"Piece\",\n \"value\": 100,\n \"description\": \"A sharp sword.\"\n }\n ],\n \"events\": [\n {\n \"type\": \"item\",\n \"eventName\": \"Attack\",\n \"description\": \"Act of violence against another person.\"\n }\n ],\n \"name\": \"Aragorn\",\n \"quests\": [\n {\n \"description\": \"Retrieve the lost artifact.\",\n \"objective\": \"Find and return the artifact.\",\n \"reward\": \"500 gold coins\"\n }\n ],\n \"role\": \"protagonist\",\n \"tone\": \"mysterious\",\n \"traits\": [\n \"brave\"\n ],\n \"personality_theory\": \"basicTraits\",\n \"personality_dimensions\": {\n \"machiavellianism\": 4,\n \"narcissism\": 2,\n \"psychopathy\": 1\n },\n \"speech_pattern\": {\n \"vocabulary_level\": \"sophisticated\",\n \"sentence_length\": \"terse\",\n \"verbal_quirks\": \"Always says 'dear friend'\"\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://app.npcbuilder.com/api/context/characters/{game_id}/{world_id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"age\": \"adult\",\n \"description\": \"A brave warrior with a mysterious past.\",\n \"gender\": \"Male\",\n \"model\": \"standard\",\n \"filters\": {\n \"active\": true,\n \"violence\": false,\n \"sexual\": false,\n \"drugs\": true\n },\n \"items\": [\n {\n \"type\": \"trade\",\n \"itemName\": \"sword\",\n \"unit\": \"Piece\",\n \"value\": 100,\n \"description\": \"A sharp sword.\"\n }\n ],\n \"events\": [\n {\n \"type\": \"item\",\n \"eventName\": \"Attack\",\n \"description\": \"Act of violence against another person.\"\n }\n ],\n \"name\": \"Aragorn\",\n \"quests\": [\n {\n \"description\": \"Retrieve the lost artifact.\",\n \"objective\": \"Find and return the artifact.\",\n \"reward\": \"500 gold coins\"\n }\n ],\n \"role\": \"protagonist\",\n \"tone\": \"mysterious\",\n \"traits\": [\n \"brave\"\n ],\n \"personality_theory\": \"basicTraits\",\n \"personality_dimensions\": {\n \"machiavellianism\": 4,\n \"narcissism\": 2,\n \"psychopathy\": 1\n },\n \"speech_pattern\": {\n \"vocabulary_level\": \"sophisticated\",\n \"sentence_length\": \"terse\",\n \"verbal_quirks\": \"Always says 'dear friend'\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.npcbuilder.com/api/context/characters/{game_id}/{world_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"age\": \"adult\",\n \"description\": \"A brave warrior with a mysterious past.\",\n \"gender\": \"Male\",\n \"model\": \"standard\",\n \"filters\": {\n \"active\": true,\n \"violence\": false,\n \"sexual\": false,\n \"drugs\": true\n },\n \"items\": [\n {\n \"type\": \"trade\",\n \"itemName\": \"sword\",\n \"unit\": \"Piece\",\n \"value\": 100,\n \"description\": \"A sharp sword.\"\n }\n ],\n \"events\": [\n {\n \"type\": \"item\",\n \"eventName\": \"Attack\",\n \"description\": \"Act of violence against another person.\"\n }\n ],\n \"name\": \"Aragorn\",\n \"quests\": [\n {\n \"description\": \"Retrieve the lost artifact.\",\n \"objective\": \"Find and return the artifact.\",\n \"reward\": \"500 gold coins\"\n }\n ],\n \"role\": \"protagonist\",\n \"tone\": \"mysterious\",\n \"traits\": [\n \"brave\"\n ],\n \"personality_theory\": \"basicTraits\",\n \"personality_dimensions\": {\n \"machiavellianism\": 4,\n \"narcissism\": 2,\n \"psychopathy\": 1\n },\n \"speech_pattern\": {\n \"vocabulary_level\": \"sophisticated\",\n \"sentence_length\": \"terse\",\n \"verbal_quirks\": \"Always says 'dear friend'\"\n }\n}"
response = http.request(request)
puts response.read_body{
"message": "Character: character789 has been created with the following context.",
"character_id": "character789",
"character_context": {
"age": "adult",
"description": "A brave warrior with a mysterious past.",
"gender": "Male",
"items": [
{
"itemName": "sword",
"unit": "Piece",
"value": 100
}
],
"name": "Aragorn",
"quests": [
{
"description": "Retrieve the lost artifact.",
"objective": "Find and return the artifact.",
"reward": "500 gold coins"
}
],
"role": "protagonist",
"tone": "mysterious",
"traits": [
"brave"
],
"personality_theory": "basicTraits",
"personality_dimensions": {}
}
}{
"message": "An error occurred"
}{
"message": "Possible reasons:\n- Character not found\n"
}{
"message": "An error occurred"
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
The unique identifier for the game.
"game123"
The unique identifier for the world.
"world456"
Query Parameters
The unique identifier for the region.
"region789"
The unique identifier for the location.
"location789"
(Optional) The player's session ID.
"60Z5aZjIuFlyYbjbZZKe"
Body
The character data required to create a new character.
The age category of the character.
infant, child, teenager, youngAdult, adult, middleAged, elderly "adult"
A brief description of the character's background.
"A brave warrior with a mysterious past."
The gender of the character.
"Male"
The AI model used to power character interactions. Premium models are available only for some subscriptions.
standard, premium "standard"
Structured content filters applied to the character's responses. Toggle the individual categories to restrict what the character can say.
Show child attributes
Show child attributes
{ "active": true, "violence": false, "sexual": false, "drugs": true }
A list of items associated with the character. Each item must follow one of the predefined schemas based on its type.
Schema for items of type "trade"
- Option 1
- Option 2
Show child attributes
Show child attributes
A list of events associated with the character. Each event must adhere to the schema defined for its type.
Schema for events of type "action"
- Option 1
- Option 2
Show child attributes
Show child attributes
The display name of the character.
"Aragorn"
A list of quests associated with the character.
Show child attributes
Show child attributes
The role of the character in the game. Determines how the character interacts with the story.
noRole, protagonist, antagonist, secondaryCharacter, tertiaryCharacter, mentor, enemy, villain, rival, shopkeeper, healer, questGiver, innkeeper, guard, familyMember, loveInterest, scientist, politician, criminal, explorer, wizard, ghost, animalCompanion, artificialIntelligence "protagonist"
The tone or style of the character's dialogue.
formal, casual, sarcastic, mysterious, emotive "mysterious"
Legacy/basic trait list. When provided without personality_theory, the API stores the character as basicTraits.
Personality framework used by interactions.
basicTraits, bigFive, darkTriad, dndAlignment, mbti, enneagram "basicTraits"
Dimension values for the selected personality_theory. basicTraits uses traits and an empty object.
Show child attributes
Show child attributes
{ "machiavellianism": 4, "narcissism": 2, "psychopathy": 1 }
Optional speech style controls consumed by interactions.
Show child attributes
Show child attributes
Response
Character created successfully.
Confirmation message with character details.
"Character: character789 has been created with the following context."
UID of the character.
"character789"
The created character context.
{ "age": "adult", "description": "A brave warrior with a mysterious past.", "gender": "Male", "items": [ { "itemName": "sword", "unit": "Piece", "value": 100 } ], "name": "Aragorn", "quests": [ { "description": "Retrieve the lost artifact.", "objective": "Find and return the artifact.", "reward": "500 gold coins" } ], "role": "protagonist", "tone": "mysterious", "traits": ["brave"], "personality_theory": "basicTraits", "personality_dimensions": {} }