Skip to content
NPC Builder the new generation of AI powered non-playable characters
  • Home
  • About Us
  • Features
  • Plans
  • Resources
    • Documentation
    • News
    • Roadmap
Contact
Sign in
  • Español
NPC Builder the new generation of AI powered non-playable characters

English Documentation

4
  • Context API Reference
  • API Reference
  • Unreal Engine Integration – Plugin
  • Unity Integration – Plugin
  • Home
  • Docs
  • English Documentation
  • API Reference
View Categories

API Reference

Login to NPC Builder app #

Access NPC Builder web app by entering this link: https://app.npcbuilder.com.

Navigate to developers section #

Click on developers section icon at the navigation bar.

Generate auth token #

Click the generate bearer token button and copy the result. Save it for later!

Obtain game and world IDs #

Find in the tree below the game and the world IDs where your character is located in.

Build your API request #

With the previous details you can build the body of your API request as follows:

{
   "character_name":"Name",
   "game_id":"ID",
   "world_id":"ID",
   "messages":[
      {"role":"user",
      "content":"Message"}
   ]
}
JSON

NOTE: Remember that in order to keep the context of the whole conversation, it is important to add all interactions, you should add all messages to the list as shown below.

The “role” parameter can take the following values (it is case sensitive):
-user: represents the user who is interacting with the NPC.
-assistant: represents the NPC

{
   "character_name":"Name",
   "game_id":"ID",
   "world_id":"ID",
   "messages":[
      {"role":"user",
      "content":"Message"},
       {"role":"assistant",
      "content":"Message"},
       {"role":"user",
      "content":"Message"}
   ]
}
Send the API request #

Send your API request with a POST method to our endpoint. Remember to use Bearer Authorization passing the token obtained in “Generate auth token” step, and the body built on “Build your API Request” step

POST https://app.npcbuilder.com/api/interactions
Retrieve response #

You will receive directly the response of the character to your list of messages, formatted as a string.

{
  "response": "Hello, how are you today?", 
  "user_events": [
    {
        "name": "take",
        "item": "sword"
    },
    {
        "name": "dance",
        "item": null
    }
  ],
  "character_events": [
      {
          "name": "take",
          "item": "sword"
      },
      {
          "name": "dance",
          "item": null
      }
  ]
}
OpenAPI #

For API reference, check https://npcbuilder.com/docs-api

Updated on March 2, 2025
Context API ReferenceUnreal Engine Integration – Plugin
Table of Contents
  • Login to NPC Builder app
  • Navigate to developers section
  • Generate auth token
  • Obtain game and world IDs
  • Build your API request
  • Send the API request
  • Retrieve response
  • OpenAPI
  • Home
  • About Us
  • Features
  • Plans
  • Resources
    • Documentation
    • News
    • Roadmap
  • Español

Calle Gestión, Número 4,
Polígono Industrial y de Servicios PISA,
Mairena del Aljarafe,
41927 Sevilla
info@npcbuilder.com

Company

  • About Us
  • Contact
  • Privacy Policy
  • Terms and Conditions

Copyright © 2025 NPC Builder
Powered by BuildingAI Solutions, S.L.