com.alakazam.portal) gives you the whole /v1 surface from C# — generate and manage worlds, create talk-to characters, mint runtime sessions — plus a drop-in AI Character component. Requires Unity 6000.0+.
Install
Add the package from its git URL (Unity Package Manager → + → Add package from git URL…), or declare it in your manifest:Setup
1
Open the Setup Wizard
The wizard opens automatically on first import, or launch it from the menu bar: Alakazam → Setup Wizard.
2
Paste your key
Start with an
sk_test_… secret key (get one here) — it runs a free, mocked sandbox. Swap to sk_live_… when you ship.3
Set your data preferences
Accept the terms and choose your telemetry opt-ins. You’re ready.
Programmable worlds & AI characters (/v1)
AlakazamClient is a thin C# wrapper over the /v1 API. Construct it with your secret key (or pass nothing in the editor to reuse the key from the Setup Wizard).
A
sk_test_… key returns deterministic mocks — every response carries mock: true, and nothing spends GPU or quota. Build your whole integration for free, then swap to sk_live_…. See Testing.Drop-in AI Character
The Alakazam Character component wraps the session → say → speak loop as an NPC you can drop into any scene.1
Add it to your scene
Menu bar: AlakazamPortal → Add AI Character to Scene. This creates an
AlakazamCharacter (plus an AudioSource for spoken replies), or add the component to any GameObject via Add Component → Alakazam → Alakazam Character (AI NPC).2
Point it at a character
Create a character first (
client.CreateCharacter(...), below), then set Character Id and World Id on the component (they’re the same id).3
Authorize runtime turns
In the editor, leave Session Token empty — the component mints one with your stored secret key for prototyping. In a shipped build, assign a
sessionToken minted by your backend and never ship the secret key.OnReply and call Say(...). With autoSpeak on (default) and a voice AudioSource assigned, replies play back through TTS automatically:
Speak(line) (synthesize + play a line) and ShowImage(prompt) (returns a show_image src). For a public, token-free share link to a public world, use AlakazamClient.PublicPlayUrl(slug).
AlakazamClient reference
Every method maps 1:1 to a /v1 endpoint. Typed methods deserialize the response; the rest return the raw JSON string.
Optional params:
frameB64 on CreateWorld / CreateCharacter (seed creation from a base64
image), cursor on ListWorlds / ListCharacters (pagination — pass the prior nextCursor),
and ttlSeconds on MintSession (60–3600, omitted when 0). Empty optionals are omitted from the
request body (never sent as ""), so payloads match the Unreal SDK.Next steps
Unreal SDK
The same worlds + AI characters in Unreal Engine.
Characters
Stances, memory, voice, and images in depth.
The two-token rule
Mint session tokens server-side; never ship a secret key.
Testing sandbox
Build the whole integration free with a test key.

