Skip to main content
POST
Convert a world into a shoot-for-score arcade

Authorizations

Authorization
string
header
required

An app API key, e.g. Authorization: Bearer sk_live_…. Secret (sk_) for writes/sessions; publishable (pk_) is read-only (browser-safe).

Headers

If-Match
string

The rev you last read. Mismatch returns 409.

Idempotency-Key
string

A retried arcadeify with the same key returns the original result without a second LLM spend (its own route-scoped namespace).

Path Parameters

id
string<uuid>
required

Body

application/json
force
boolean
default:false

Rebuild the arcade even when the world already has a progression. Without it, an already-progression world is refused 409.

expectedRev
string

Optional optimistic-concurrency token; alternative to the If-Match header.

Response

Arcade conversion applied (or a no-op — see below). The new revision is the ETag header. versionId is the arcadeify snapshot, and is null when no version was written: a fail-soft post-persist snapshot failure, OR a no-change run (the agent asked a clarifying question / produced no ops — the original world is returned unchanged via reply).

The RESULT-ONLY response from a kernel-agent edit. It carries the validated world, advisory diagnostics, and the agent's natural-language reply, and none of the agent's internals: the system prompt, op grammar, lexicon, model id, and raw op trace are never exposed. When the agent needs clarification it returns its question in reply and leaves the world unchanged. (A TEST-mode response additionally carries a mock: true marker.)

world
object
required

A playable world's compiled graph — id, name, entrance, and the scene (states + events). This is the shape returned inside the world field of a World resource (see World) and by the graph-editing routes. Additional optional properties are allowed (forward-compatible); the schemaVersion on responses pins the contract version.

diagnostics
object[]
required

The full validateWorld set (advisory warning/info findings) for the persisted world.

reply
string
required

The agent's natural-language summary of what it did, or a clarifying question when no change was made.

mock
boolean

Present and true only for TEST-mode keys. See Testing.

versionId
string<uuid> | null

The arcadeify version snapshot (source ai), parent-chained to HEAD. Null on a no-change run or a fail-soft post-persist snapshot failure.