← Event Room Layout
API
Tokens

Run Event Room Layout from your own code

The one metered task, brief, is available over HTTP. It takes the numbers of a room plan the page has already drawn - the style, the room size, the seat count, the stage, the screen size, the front and back row distances, the camera distance, the exits and the plan's open warnings - plus whether the talks are not recorded, recorded or streamed, and returns the AV brief for that room as one JSON object.

The division of labour first: the browser draws the plan - every seat, aisle, wheelchair space and exit, the screen sized from the farthest seat, the camera riser and AV desk - and makes the SVG, PNG, CSV and printout. That part is free and never leaves the page. Only the brief is a metered run. Your code can send any room you have measured; the fields are below.

Base URL and the response shape

Every endpoint lives under https://api.skillsafe.ai/v1/app-api, and every response has one shape:

{ "ok": true,  "data":  { ... } }
{ "ok": false, "error": { "code": "...", "message": "..." } }

The token is minted for this app (the guest call takes {"slug":"event-room-layout"}), so no slug header is needed afterwards. Send it as Authorization: Bearer …. The run body is the input object, sent bare.

StatusCodeMeaning
400validation_errorThe body is not a JSON object, or a required key (task, room, capture) is missing.
401unauthorizedNo token, or a stale one. Mint a guest token or sign in again.
402insufficient_creditsThe balance is under min_credits. Price with /estimate first.
403forbiddenA guest token tried to run: the brief run is metered and needs a personal sign-in.
404not_foundUnknown job id.
429rate_limitedBack off and retry.
5xxserver_errorTransient. Retry with the same Idempotency-Key so a retry never double-bills.

The task field and the input

There is one task. A missing or different task is still answered as brief, with a note saying so.

{"task": "brief", "room": "<JSON string>", "capture": "recorded", "note": "<optional text, up to 800 characters>"}
FieldRequiredWhat it is
taskyesAlways brief.
roomyesThe plan's numbers as a JSON string - a stringified object, not a nested object. Its fields are below.
captureyesnothing, recorded or streamed. Everything in the brief follows from it.
notenoWhat the event is, the crew you have, what the venue provides.

Inside room

FieldWhat it is
units"m" or "ft" - the unit of every length below.
styleTheatre rows, Classroom tables or Cabaret rounds.
room{width, depth}; width is the wall the screen is on.
seatsSeats in the plan, wheelchair spaces included.
people_expectedNumber, or null.
wheelchair_spacesSpaces placed, each with a companion seat.
stage{width, depth} or null.
screen{width, height, diagonal_in, bottom_edge} - 16:9, sized from the farthest seat.
front_row_distance / back_row_distanceFrom the screen.
screen_reads_toHow far the screen reads under the 6x (or 4x) rule.
camera{position, distance_to_speaker, medium_shot_fov_deg} or null.
av_deskWhere the AV desk is, or null.
exits / exits_usually_neededExits drawn, and the usual number for this many people.
open_checksThe plan's own warnings, in plain words.

The output

One JSON object, in the job's output.output as a string:

KeyWhat it holds
captureThe input capture, copied.
tierOne of no capture, smartphone floor, fixed camera on the board feed, single operated camera, two cameras with vision mixing, live stream on top of two cameras.
tier_why1-3 sentences tied to the room's numbers.
signal_path3-7 steps, in order.
redundancy[]{rung, protects}; rung is one of spare mic and spare cable, independent second audio recording, three-destination signal split, continuous chunked sync to storage, duplicate encode path.
crew[]{role, where, duty}; role is one of Stage manager, Audio operator, Camera operator, Vision mixer, AV technical lead, General crew, Stream operator; where is stage, av_desk, camera_riser, doors or remote.
venue_questions4-10 questions for the venue to answer in writing.
rehearsal1-6 steps.
budget{recording, captioning, streaming} - what each part of the Media line covers, no prices.
notes0-3 short sentences.

What the page checks

The page never shows a reply blindly. It reads the JSON (a reply cut short keeps every section that finished arriving and says how many of seven did) and flags, in plain words: a tier that does not match the capture choice, a stream with no stream operator or no rehearsal, a signal path that never takes audio off the mixing board, no spare mic and cable, crew placed at an AV desk or camera riser the plan does not have, any bandwidth figure you did not give, and a seat or people count that contradicts the plan.

A worked example

The "Meetup, 80 people" sample: a 10 x 14 m room in theatre rows, recorded for later. The request body, exactly as sent (room is a string):

{
  "task": "brief",
  "room": "{\"units\":\"m\",\"style\":\"Theatre rows\",\"room\":{\"width\":10,\"depth\":14},\"seats\":96,\"people_expected\":80,\"wheelchair_spaces\":4,\"stage\":{\"width\":5.5,\"depth\":2},\"screen\":{\"width\":3.7,\"height\":2.1,\"diagonal_in\":168,\"bottom_edge\":1.2},\"front_row_distance\":4.9,\"back_row_distance\":12.6,\"screen_reads_to\":12.6,\"camera\":{\"position\":\"riser at the back centre\",\"distance_to_speaker\":9.9,\"medium_shot_fov_deg\":14},\"av_desk\":\"back centre, behind the camera riser\",\"exits\":2,\"exits_usually_needed\":2,\"open_checks\":[]}",
  "capture": "recorded",
  "note": "Monthly developer meetup, two 25-minute talks and lightning talks. Volunteers run it; the venue has a projector but no technician."
}

The same room string, parsed, for reading:

{
  "units": "m",
  "style": "Theatre rows",
  "room": {
    "width": 10,
    "depth": 14
  },
  "seats": 96,
  "people_expected": 80,
  "wheelchair_spaces": 4,
  "stage": {
    "width": 5.5,
    "depth": 2
  },
  "screen": {
    "width": 3.7,
    "height": 2.1,
    "diagonal_in": 168,
    "bottom_edge": 1.2
  },
  "front_row_distance": 4.9,
  "back_row_distance": 12.6,
  "screen_reads_to": 12.6,
  "camera": {
    "position": "riser at the back centre",
    "distance_to_speaker": 9.9,
    "medium_shot_fov_deg": 14
  },
  "av_desk": "back centre, behind the camera riser",
  "exits": 2,
  "exits_usually_needed": 2,
  "open_checks": []
}

A matching reply (the job's output.output):

{
  "capture": "recorded",
  "tier": "fixed camera on the board feed",
  "tier_why": "The camera riser is 9.9 m from the speaker and the slides go straight to the recorder from the laptop split, so a fixed camera on the board feed covers both talks and the lightning talks. Volunteers run the night and the venue has no technician, so no camera operator is needed.",
  "signal_path": [
    "The speaker's microphone runs to the mixing board at the AV desk, which feeds the room speakers and a separate record output.",
    "The laptop feed goes into a splitter at the stage that sends it three ways: to the venue projector with minimal delay, to the recorder, and to a crew monitor at the AV desk.",
    "The recorder takes audio from the mixing board's record output, never from the fixed camera's own microphone.",
    "The fixed camera on the riser at the back centre frames the speaker and records alongside the slide feed with matching clock time.",
    "The audio operator watches the crew monitor and listens on headphones to the record feed, not the room sound."
  ],
  "redundancy": [
    {
      "rung": "spare mic and spare cable",
      "protects": "A dead microphone battery or a failed cable between the stage and the AV desk mid-talk; keep both on the stage edge, labelled."
    },
    {
      "rung": "three-destination signal split",
      "protects": "A recorder or encoder crash taking the projector down with it; the room keeps its slides while the recording is restarted."
    }
  ],
  "crew": [
    {
      "role": "AV technical lead",
      "where": "av_desk",
      "duty": "Owns the production for the night, does not host or speak, starts and stops each recording and decides on any restart."
    },
    {
      "role": "Audio operator",
      "where": "av_desk",
      "duty": "Rides microphone levels on the mixing board, monitors the record feed on headphones and swaps the spare mic in when one fails."
    },
    {
      "role": "Stage manager",
      "where": "stage",
      "duty": "Connects each speaker's laptop to the splitter, checks the slide appears on the projector and crew monitor, and hands over the microphone."
    }
  ],
  "venue_questions": [
    "Can the venue confirm in writing the projector's inputs and which connector reaches it from the stage?",
    "Is there a mains power outlet at the AV desk and at the camera riser at the back centre?",
    "Is there a cable route from the stage to the back of the room that does not cross an aisle or an exit?",
    "Is there a house sound system and mixing board we may use, or must we bring our own?",
    "Can the screen sit with its bottom edge at 1.2 m without the ceiling cutting off a 3.7 m wide image?",
    "Can we have access to the room an hour before doors to set up and test?"
  ],
  "rehearsal": [
    "Before doors, walk the signal path end to end: mic to mixing board to speakers and recorder, laptop to splitter to projector, recorder and crew monitor.",
    "Record one minute of test speech and slides, then play it back on headphones and check both picture and sound, not just the level meter.",
    "Check each speaker's laptop and connector on the splitter before their talk, lightning speakers included."
  ],
  "budget": {
    "recording": "A fixed camera, a recorder fed from the mixing board and a splitter, run by volunteers; get a quote only if the venue cannot lend a mixing board.",
    "captioning": "Live or post-event captions are an accessibility decision for the organizers; we deliver whichever is chosen, with a supplier quote if needed.",
    "streaming": "None."
  },
  "notes": [
    "Get recording consent from each speaker per session, lightning talks included; the camera in the room is not agreement.",
    "Decide who edits and publishes the recordings after the meetup before the night."
  ]
}

What the page does with it: seven of seven sections, no flags, and the crew numbered on the plan at the stage, the AV desk and the camera riser.

Step 1 — a tiny client helper

One function that sends JSON and unwraps the response. Paste a personal token from /tokens.html, or leave it empty and mint a guest token in step 2.

BASE="https://api.skillsafe.ai/v1/app-api"
TOKEN="YOUR_TOKEN"   # from https://event-room-layout.skillsafe.ai/tokens.html
api() { # api METHOD PATH [JSON-BODY]
  curl -s -X "$1" "$BASE$2" -H "Content-Type: application/json" \
    ${TOKEN:+-H "Authorization: Bearer $TOKEN"} ${3:+--data "$3"}
}

Step 2 — a token

A guest token is enough for /me and /estimate. A run is metered, so it needs a personal token: sign in on /tokens.html and copy it from there.

# a guest token (enough for /me and /estimate); a run needs your personal token from /tokens.html
TOKEN=$(curl -s -X POST "$BASE/guest" -H "Content-Type: application/json" -d '{"slug":"event-room-layout"}' | jq -r '.data.token')

Step 3 — GET /me

Who the token is (subject_type: user or guest) and the credit balance.

api GET /me | jq '.data | {subject_type, credits}'

Step 4 — POST /estimate

Free. The body is the run input itself, the bare object (never wrapped in {"input": ...}). hold_credits is a reservation, not the price; min_credits is what the balance must cover; model_alias reads llm-default and markup_bps reads 1000 (10%). Save the worked example's request body as input.json.

# input.json: the run input object - {"task": "brief", "room": "", "capture": "recorded", "note": "..."} - see the worked example
api POST /estimate "$(cat input.json)" | jq '.data | {hold_credits, min_credits, model, model_alias, markup_bps, warnings}'

Step 5 — POST /run, then poll the job

Send an Idempotency-Key built from the lane and the input: a retry with the same key never bills twice. The page uses event-room-layout:<task>:<inputHash>:a<attempt> (the one task is brief). The job's output.output is the reply text - one JSON object; truncated: true means the balance cut it short, and the complete entries that did arrive are still usable.

KEY="event-room-layout:brief:$(shasum -a 256 input.json | cut -c1-16):a1"
JOB=$(curl -s -X POST "$BASE/run" -H "Content-Type: application/json" -H "Authorization: Bearer $TOKEN" \
  -H "Idempotency-Key: $KEY" --data @input.json | jq -r '.data.job_id')
while :; do
  J=$(api GET "/jobs/$JOB"); S=$(echo "$J" | jq -r '.data.status')
  case "$S" in succeeded|failed|cancelled) break;; esac; sleep 2
done
echo "$J" | jq -r '.data.output.output' > reply.json   # one JSON object, the reply contract
echo "$J" | jq '.data | {charged_credits, truncated}'
jq -r '.posts[]? | "\(.id) [\(.format)] \(.topic)\n   \(.hook)"' reply.json   # one per planned or empty slot
jq -r '.open[]? | "\(.id) open: \(.purpose)"' reply.json
jq -r '.notes[]?' reply.json

Step 6 — POST /run-stream

The same run as Server-Sent Events, with the same input.json. Browsers receive progress ticks rather than text deltas; the final done event carries the job, whose output.output is the reply.

# Server-Sent Events: tick/delta events while the job runs, then a final event with the job
curl -N -s -X POST "$BASE/run-stream" -H "Content-Type: application/json" -H "Authorization: Bearer $TOKEN" \
  -H "Idempotency-Key: event-room-layout:brief:$(shasum -a 256 input.json | cut -c1-16):a1" --data @input.json