Quickstart

A. Unity SDK (no server)

Use this path if you don’t want to run a backend. We’ll handle rate limiting and entitlement checks on our side.

  1. Create a Project in the dashboard and copy your Project ID.
  2. Configure Entitlement (Steam recommended, None for dev only).
  3. Install the Unity SDK (.unitypackage).
  4. Set Config in Assets/JournaleSDK/Resources/SessionConfig.
  5. Call the NPC:
using System.Threading.Tasks;
using JournaleSDK;
 
public class NpcExample : MonoBehaviour
{
    public async Task TalkToGuard()
    {
        string reply = await JournaleSDK.Journale.ChatToNpcAsync(
            localId: "guard-01",
            message: "Hello! Can I enter the castle?",
            characterDescription: "Castle guard. Gruff, obedient, wary of strangers."
        );
 
        Debug.Log($"NPC says: {reply}");
    }
}

Steam setup for dev: Have Steam open, include steam_appid.txt in your project root, and install Steamworks.NET.


B. Server API (with API Keys)

Use this path if you already have a backend. Keep your API Key on the server only.

  1. Create a ProjectCreate API Key in the dashboard.
  2. (Optional) Override Context Size at the API Key level.
  3. Call the API from your server:
const r = await fetch('https://api.journale.ai/chat', {
  method: 'POST',
  headers: {
    'Content-Type': 'application/json',
    'Authorization': 'Bearer <API_KEY>'
  },
  body: JSON.stringify({
    message,
    context,
    characterDescription,
    playerDescription,
    characterID,
  }),
});