curl --request PATCH \
--url https://app.npcbuilder.com/api/context/characters/{game_id}/{world_id}/{character_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": true,
"sexual": false,
"drugs": false
},
"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}/{character_id}"
payload = {
"age": "adult",
"description": "A brave warrior with a mysterious past.",
"gender": "Male",
"model": "standard",
"filters": {
"active": True,
"violence": True,
"sexual": False,
"drugs": False
},
"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.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
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: true, sexual: false, drugs: false},
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}/{character_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}/{character_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'age' => 'adult',
'description' => 'A brave warrior with a mysterious past.',
'gender' => 'Male',
'model' => 'standard',
'filters' => [
'active' => true,
'violence' => true,
'sexual' => false,
'drugs' => false
],
'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}/{character_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\": true,\n \"sexual\": false,\n \"drugs\": false\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("PATCH", 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.patch("https://app.npcbuilder.com/api/context/characters/{game_id}/{world_id}/{character_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\": true,\n \"sexual\": false,\n \"drugs\": false\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}/{character_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.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\": true,\n \"sexual\": false,\n \"drugs\": false\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 updated 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"
}Update character details
Update the details of an existing character. Provide any of the updatable fields such as age, description, gender, items, events, quests, role, tone, or traits.
curl --request PATCH \
--url https://app.npcbuilder.com/api/context/characters/{game_id}/{world_id}/{character_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": true,
"sexual": false,
"drugs": false
},
"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}/{character_id}"
payload = {
"age": "adult",
"description": "A brave warrior with a mysterious past.",
"gender": "Male",
"model": "standard",
"filters": {
"active": True,
"violence": True,
"sexual": False,
"drugs": False
},
"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.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
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: true, sexual: false, drugs: false},
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}/{character_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}/{character_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'age' => 'adult',
'description' => 'A brave warrior with a mysterious past.',
'gender' => 'Male',
'model' => 'standard',
'filters' => [
'active' => true,
'violence' => true,
'sexual' => false,
'drugs' => false
],
'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}/{character_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\": true,\n \"sexual\": false,\n \"drugs\": false\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("PATCH", 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.patch("https://app.npcbuilder.com/api/context/characters/{game_id}/{world_id}/{character_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\": true,\n \"sexual\": false,\n \"drugs\": false\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}/{character_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.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\": true,\n \"sexual\": false,\n \"drugs\": false\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 updated 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"
The unique identifier for the character.
"character789"
Query Parameters
(Optional) The player's session ID.
"60Z5aZjIuFlyYbjbZZKe"
Body
The character data fields to update.
The age category of the character.
infant, child, teenager, youngAdult, adult, middleAged, elderly "adult"
A brief description of the character.
"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. Provide the toggles you want to update when adjusting moderation settings.
Show child attributes
Show child attributes
{
"active": true,
"violence": true,
"sexual": false,
"drugs": false
}
A list of updated items for the character.
Schema for items of type "trade"
- Option 1
- Option 2
Show child attributes
Show child attributes
A list of events related to the character.
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 the character plays in the game.
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 style or mood 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 updated successfully.
Confirmation message after updating the character.
"Character: character789 has been updated with the following context."
UID of the character.
"character789"
Updated character context data.
{
"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": {}
}