What is a 'programmable world'?
What is a 'programmable world'?
A world is a playable game expressed as a graph of states and events — a
little state machine you generate from a prompt. It’s programmable because
you don’t just get a static asset: you read it, patch it, fork variants, and
react to its runtime events (
onChoice, onEnding, …) to wire it into your
own product’s logic.Publishable vs secret keys?
Publishable vs secret keys?
Secret keys (
sk_…) live on your server and can create worlds and mint
session tokens. Publishable keys (pk_…) are browser-safe and limited to
read + embed. Both come in test and live modes.How do I embed a world without exposing my key?
How do I embed a world without exposing my key?
Mint a short-lived session token on your server with your secret key
(
POST /v1/sessions/token), then pass that token — not the key — to
@alakazamworld/embed in the browser. See Embedding.How does billing work?
How does billing work?
The API is free during the developer preview. Generations and sessions are
metered per app so you can see usage, but nothing is charged. See
Pricing.
Will the world shape change under me?
Will the world shape change under me?
No. Worlds conform to a frozen, versioned
schema (
schemaVersion).
Minor versions only add optional fields; breaking changes require a major
version, and the previous major stays readable.How do I avoid duplicate worlds on a retry?
How do I avoid duplicate worlds on a retry?
Send an
Idempotency-Key header on POST /v1/worlds. A retry with the same
key returns the original result instead of generating again.