Skip to main content
A world is a playable graph of states and events: a little state machine you generate from a prompt. It’s programmable because you can read it, patch it, fork variants, and react to its runtime events (onChoice, onEnding, …) to wire it into your own product’s logic.
Secret keys (sk_…) live on your server and can create/edit worlds and mint session tokens. Publishable keys (pk_…) are browser-safe and read-only (they can also drive a like button); they can’t mint session tokens, so embedding is driven by a secret-key-minted session token, not a pk_ key directly. Both come in test and live modes. A test key runs against a free, mocked sandbox.
Yes. The API is CORS-open (any origin). Every route authenticates with a bearer key or session token (never cookies), so a publishable (pk_) key can drive read endpoints and the like button straight from your site’s browser. Keep secret (sk_) keys on your server, and mint session tokens server-side for embedding.
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.
The API is in developer preview, so no charges are incurred today. When billing turns on it’s runtime-only: you pay for session_seconds (live play time), while creating, editing, and every other operation stay free. Test-mode usage is never billed. See Pricing.
No. Worlds conform to a frozen, versioned schema (schemaVersion: "1.0"). See the SMWorld schema in the API reference. Minor versions only add optional fields. Breaking changes require a major version, and the previous major stays readable.
Send an Idempotency-Key header on POST /v1/worlds (also POST /v1/characters and POST /v1/worlds/{id}/edit). A retry with the same key returns the original result instead of generating again. Keys are scoped per (app, mode, key), so test and live don’t share a cache. Reuse is safe.
It’s available as a private enterprise arrangement, run your own conjure-service against your own Reactor account: not a self-serve feature. There’s no public signup or toggle for it; it’s talk-to-us only, so contact the team to scope it.