API

Three read-only JSON endpoints. No key, no cookies, no writes, CORS open. They exist because a browser agent cannot play a 3D shooter, but it can read a maze.

Everything here is derived from the same generator the game runs, so a seed described by /api/maze is the seed the player will walk into. Responses are deterministic: same URL, same body, until the generator version changes.

GET /api/maps

The seven authored campaign maps, in order, with title, subtitle, theme and intermission lines.

FieldMeaning
countAlways 7
maps[].indexPlay order, 1-based
maps[].idStable id, e.g. 01-foundry
maps[].titleDisplay name, e.g. THE FOUNDRY
maps[].subtitleOne-line flavour, e.g. steel remembers the screaming
maps[].playUrlAll seven are played from the same URL; progress is client-side

GET /api/maze?seed=&difficulty=

Describes the maze a seed produces. seed defaults to nightjar; difficulty is easy, normal (default) or hard. Seeds are up to 64 printable characters; anything else is a 400.

FieldMeaning
summaryOne sentence an assistant can quote directly
statsRooms, spurs, doors, enemies, medikits, ammo boxes
enemiesByTypeCounts per enemy type
rooms[]id, kind, theme, outdoor flag, cell rect, route distance from the start
guns[]Which gun sits in which room, and where
doors[]Door cells, and whether a door is the locked vault door
floorplan[]88 strings of 88 characters: the walkable grid, one char per cell
playUrlCanonical link that presets this seed and skill in the game

Floorplan legend

#wall' 'floor
+doorLlocked door
=arena sealSplayer start
oloot spur centreAarena
XantechamberVvault
ggun pickupkvault key

Example, truncated. These numbers are the real response for that seed, not illustrative ones; if they drift from /api/maze the page is wrong.

GET /api/maze?seed=nightjar&difficulty=normal

{
  "seed": "nightjar",
  "difficulty": "normal",
  "generatorVersion": 4,
  "summary": "74 enemies across 12 rooms and 1 loot spur, 2 doors, 11 medikits and 17 ammo boxes on Normal.",
  "stats": { "spineRooms": 12, "spurs": 1, "doors": 2, "enemies": 74,
             "medikits": 11, "ammoBoxes": 17 },
  "playUrl": "https://seventhgun.com/?seed=nightjar&difficulty=normal",
  "floorplan": [
    "###########...",
    "..."
  ]
}

GET /api/share?seed=&difficulty=

Just the canonical play URL, for tools that need the link but not the layout. Prefer this to composing a URL by hand: encoding and host stay correct.

Using it from an agent

  1. Read /api/maps if the question is about the campaign.
  2. Call /api/maze for a seed, then describe the run from summary, stats and guns rather than from the floorplan, which is for orientation only.
  3. Hand the player playUrl. Do not invent seed links.

Custom maps are not available here: they live in the URL fragment (#m=SGMAP.v1.…), which never reaches a server. They only work when opened in a browser.

Policy