Game SDK

Integrate Foil Engine NPC conversations into your game using API keys.

The Game SDK provides REST API endpoints for game developers to add NPC chat to their games. Authenticate with an API key instead of JWT tokens — no browser login required.

How it works

  1. Create an API key from the API Keys dashboard
  2. Pass the key in the X-API-Key header on every request
  3. Initialize a chat session, send messages, and receive NPC responses

API keys can only access your own published personas. Draft or unpublished personas are not available via the SDK.

Client SDKs

Install a native SDK to skip the raw HTTP calls: