Get an API key, create your first world, and embed it.
Alakazam is the programmable worlds API. This guide takes you from zero to
an embedded, playable world — create one, then program it into your product.
An app is your project. Every world, session, and usage record is
attributed to it. Create one and give it a name.
3
Mint a secret key
From your app, generate a secret key (sk_test_…). It’s shown once —
copy it now and store it securely.
Save your API key in a secure location and never share it. Secret keys
(sk_…) belong on your server only — never in a browser, a prompt, a log, or
version control.
Install the SDK and mount the world. Pass the session token — never your
secret key.
npm install @alakazamworld/embed
import { createEmbed } from "@alakazamworld/embed";createEmbed({ container: "#game", slug: "mystical-forest", token, // the session token from your server onEnding: (e) => console.log("ending reached", e),});