REST API

neux rest --project MyGame --port 8787        # prints the bearer token
curl -H "Authorization: Bearer $TOKEN" http://127.0.0.1:8787/v1/tools
curl -X POST -H "Authorization: Bearer $TOKEN" -d '{"entity":"last","component":"Transform3D","value":{"position":[0,1,0],"rotation":[0,0,0],"scale":[1,1,1]}}' http://127.0.0.1:8787/v1/tools/scene_set

The same tools as neux mcp, driving the same headless editor: edits are schema-validated and undoable.

The tools

ToolWhat it does
scene_entities, scene_inspectlist the objects; show one object's components and values
scene_spawn, scene_despawn, scene_set, scene_removemake, delete and change objects (each change checked against the component's schema)
scene_undo, scene_redoundo and redo the last change
schemaevery component type, or one's fields with their ranges and descriptions
scene_save, scene_loadwrite the scene to the project, or open one
levela whole level from a sentence ("a night dungeon with 6 rooms, crates and torches"), made by the engine's own generator with no AI model; it becomes the scene
generate_asseta sprite, tileset or UI picture in the project's art style
script_write, script_api, script_attachwrite a C# script (only if it passes the safety check and compiles); read the API (every type with its members' names, or one type in full); put a script on an object
run_playtests, bake_checkrun the project's playtests; check generated assets against their records
project_fileslist a project folder

What only the editor window can do, because it needs the window's renderer and the agent inside it: presets, games from the catalogue, models and sounds made from words, playing the game and looking at it, and building for a platform (use neux build for that).

RouteWhat
GET /v1/health{"ok": true, "version": ...}
GET /v1/toolsevery tool with its JSON Schema
POST /v1/tools/{name}body: the arguments (a JSON object); answer {"ok": bool, "text": ...}; status 400 when the tool refused
GET /v1/openapi.jsonan OpenAPI 3 description

Safety: it listens on 127.0.0.1 only; every request needs Authorization: Bearer <token> (random per start, or --token / NEUX_REST_TOKEN, at least 16 characters); requests with an Origin header or a non-loopback Host are refused, so a web page cannot drive it. It serves one request at a time.