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.
- Create a Project in the dashboard and copy your Project ID.
- Configure Entitlement (Steam recommended, None for dev only).
- Install the Unity SDK (
.unitypackage
). - Set Config in
Assets/JournaleSDK/Resources/SessionConfig
. - 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.
- Create a Project → Create API Key in the dashboard.
- (Optional) Override Context Size at the API Key level.
- 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,
}),
});