← Event Desk / API
Tokens

Drive Event Desk from your own code

The page does its free work in the browser: it reads what your company does and your notes on one event (labelled lines or prose), adds up every cost line, counts your buyers in the room, works out the qualified meetings (your stated target, or for a booth the skill's directional 10-20%), the cost per qualified meeting, the ratio to what a meeting costs you elsewhere and the days to go, with flags EV-01..EV-12 (the 3x pass line, attendee counts without composition, vanity metrics, no follow-up plan, soft pricing inside 8 weeks, over budget). Its two paid lanes are available over HTTP. You send one JSON object with task set to "decide" or "plan", and the model replies with one JSON object. The easiest way to build the facts string is the page itself: EventKit.buildInput(lane, EventKit.analyze(you, event, {company, role, outcome, question}), {decideHandoff}) in eventkit.js, which also runs under Node.

Base URL: https://api.skillsafe.ai/v1/app-api. Every call sends Content-Type: application/json and, once you have a token, Authorization: Bearer <token>. Both lanes run on gpt-terra with a 10% publisher markup. A run needs a signed-in (user) token and is metered: the platform holds the estimate's hold_credits while the run is in flight and then charges only what it used (charged_credits). /estimate is free. A plain-text summary is at /llms.txt.

The response envelope

Every response is {"data": ..., "error": null} on success or {"data": null, "error": {"code", "message"}} on failure.

Error codes

HTTPcodemeaning
400VALIDATION_ERRORThe body is not a JSON object, or a field is the wrong type. Every field of the run input is a string.
401UNAUTHORIZEDNo token, or an expired one: get a new one (step 2).
402INSUFFICIENT_CREDITSThe balance is below the run's minimum. Top up at skillsafe.ai/account/billing/.
403FORBIDDENA guest token tried a metered run: sign in for a personal token.
404NOT_FOUNDUnknown job id.
429RATE_LIMITEDBack off and retry with the same Idempotency-Key.

The task field: two lanes

taskwhat the model does
"decide"The should-we-sponsor evaluation: a verdict of go, go with changes or pass (pass is required when a meeting costs 3 times your other channels even at the best end and no strategic multiplier is shown), the role to take, the outcome, a reading of the page's math, the in-person test, the three strategic multipliers, the prospectus red_flags quoted, the counterfactual, the negotiate asks in the skill's order, an alternative play, conditions and what to find_out.
"plan"The before, during and after: a goal (metric, target, owner), the target_list, a 4-8 step timeline ordered before, during, after, the meeting-booking outreach email, the qualifying_question, what to capture, three follow_up tiers, content and metrics.

Input fields (all strings)

fieldwhencontent
taskrequireddecide or plan
companyrequiredYour company's name (may be empty; the page then reads it from the first line of you).
rolerequiredhost, sponsor (sponsoring or exhibiting), speak or attend.
outcomeoptionalThe one outcome that matters: pipeline, authority, community or content.
yourequiredWhat your company does: the buyer, the deal size, the sales cycle, what a qualified meeting costs you from outbound or ads, who can work the event. Past 5,000 characters the page cuts the middle on line boundaries and leaves an [event-desk: ...] marker.
eventrequiredYour notes on the event: the prospectus, each cost and its amount, the attendees and how many are your buyers, the date, a budget, a meetings target. Cut the same way past 6,000 characters.
factsrequiredA JSON string: company, role, outcome, today, currency, event{name, format, date, attendees, icp, icp_share, icp_basis, costs[{label, amount}], cost_total, budget, meetings_stated, team, followup_stated, recording_stated}, you{icp_stated, icp_quote, acv, cycle_months}, benchmark, math{meetings_low, meetings_high, meetings_basis, cost_per_meeting_low, cost_per_meeting_high, cost_per_icp, ratio_low, ratio_high, days_until, over_budget}, flags[{id, severity, text}], notes[].
questionoptionalWhat you want to know.
decide_handoffplan onlyA JSON string of the decision the plan follows: verdict, role, outcome, conditions[], negotiate[], alternative.
retry_noteoptionalOnly on a reformat retry: what was wrong with the previous reply.

The reply contracts

Both lanes share an envelope: task, headline, questions[], summary.

task: "decide"

verdict: go|go with changes|pass, reason, role: host|sponsor|speak|attend, outcome: pipeline|authority|community|content, math_reading, in_person{needed: yes|no|unclear, why, evidence[]}, multipliers[{multiplier, present: yes|no|unknown, why, evidence[]}] (exactly three, in order: exact buyers concentrated nowhere else, category-defining event, access you cannot buy elsewhere), red_flags[{flag, evidence[]}], counterfactual, negotiate[{ask, why}] (for a sponsorship that goes ahead, 2 to 5 in order: speaking or panel slot, side-event rights, attendee list reality check, placement and timing, price), alternative{play: side-event dinner|attend and pre-book meetings|host a webinar|speak|none, why}, conditions[], find_out[].

task: "plan"

source (decide handoff|from the input), role, outcome, goal{metric, target, owner}, target_list{who, how_many, sources[]}, timeline[{stage: before|during|after, when, owner, what}] (4 to 8, in stage order), outreach{subject, body} (at most 100 words), qualifying_question, capture, follow_up[{tier: hot|warm|scan-only, when, action}] (exactly three, in that order), content[] (1 to 4), metrics[{metric, tier: real|decisive}] (3 to 6; real: qualified conversations, meetings booked, opportunities created, pipeline influenced; decisive: cost per qualified meeting, cost per opportunity, closed-won influenced).

Worked examples

These are the page's own bundled examples (invented companies, people and numbers), with the input as app.js builds it and the saved model reply the page replays for free. One worked example per verdict and per lane, and the decide-to-plan handoff.

Decide: a $28,000 trade show booth with 350 of the buyers among 6,000 attendees (go with changes)

Input (description, notes and facts shortened here):

{
 "task": "decide",
 "company": "Paywistle",
 "role": "sponsor",
 "you": "Paywistle - accounts payable automation for mid-market finance teams (200-2,000 employees).\nOur buyer is the controller or AP manager; the CFO signs.\nACV is about $24,000 and our sales cycle runs 4-6 months.\nAn outbound meeting costs us about $450 (SDR time plus data), and a paid-search demo about $600.\nWe have two AEs and one SDR who can travel.\n",
 "event": "Remitfold Expo 2026 - trade show, Chicago, 17-19 November 2026\nAttendees: 6,000 (organiser's number)\nICP attendees: about 350 controllers and AP managers, per last year's attendee breakdown\nBooth package (10x10, Silver): $28,000\nTravel and hotels for three people: $7,500\nBooth build and shipping: $6,000\nSwag: $1,500\nBudget: $45,000\nThe prospectus headline is \"40,000 impressions across the expo app\".\nLast year two of our... (536 characters in all)",
 "facts": "(a JSON string; decoded: company Paywistle, role sponsor, outcome pipeline, event Remitfold Expo 2026 on 2026-11-17, 6000 attendees, 350 of your buyers, 4 cost lines totalling 43000, benchmark 450, meetings 35-70, cost per meeting 614-1229, ratio 1.4-2.7, 47 days to go; flags EV-06, EV-07, EV-08, EV-10)",
 "outcome": "pipeline",
 "question": "Should we take the booth?"
}

Reply:

{
 "task": "decide",
 "verdict": "go with changes",
 "reason": "The meetings math clears the skill's 3 times pass line and the room holds about 350 of your buyers, but the prospectus sells impressions and badge scans, so it only pays if you pre-book meetings and negotiate.",
 "role": "sponsor",
 "outcome": "pipeline",
 "math_reading": "At 35 to 70 meetings (the directional 10-20% of the 350 buyers in the room), a meeting costs $614 to $1,229, 1.4 to 2.7 times your $450 outbound meeting. That is under the 3 times pass line, and the $43,000 total sits inside the $45,000 budget, but the top end is close to the line if the booth is worked poorly.",
 "in_person": {
  "needed": "yes",
  "why": "A multi-stakeholder deal where the CFO signs, at about $24,000 ACV on a cycle of up to 6 months, is the kind the skill says earns in-person cost.",
  "evidence": [
   "Our buyer is the controller or AP manager; the CFO signs.",
   "our sales cycle runs 4-6 months"
  ]
 },
 "multipliers": [
  {
   "multiplier": "exact buyers concentrated nowhere else",
   "present": "unknown",
   "why": "About 350 controllers and AP managers is a real concentration, but the notes do not say they cannot be reached elsewhere.",
   "evidence": []
  },
  {
   "multiplier": "category-defining event",
   "present": "unknown",
   "why": "Nothing in the notes says Remitfold Expo 2026 sets the agenda for AP automation buyers.",
   "evidence": []
  },
  {
   "multiplier": "access you cannot buy elsewhere",
   "present": "unknown",
   "why": "The Silver package lists a booth and badge scans, not speaking, a buyer lounge or hosted meetings.",
   "evidence": []
  }
 ],
 "red_flags": [
  {
   "flag": "impressions as the headline metric",
   "evidence": [
    "40,000 impressions across the expo app"
   ]
  },
  {
   "fla
... (shortened here; the page shows it whole)

Plan: the same booth, carrying the decision

Input (with the decision handed over):

{
 "task": "plan",
 "company": "Paywistle",
 "role": "sponsor",
 "you": "Paywistle - accounts payable automation for mid-market finance teams (200-2,000 employees).\nOur buyer is the controller or AP manager; the CFO signs.\nACV is about $24,000 and our sales cycle runs 4-6 months.\nAn outbound meeting costs us about $450 (SDR time plus data), and a paid-search demo about $600.\nWe have two AEs and one SDR who can travel.\n",
 "event": "Remitfold Expo 2026 - trade show, Chicago, 17-19 November 2026\nAttendees: 6,000 (organiser's number)\nICP attendees: about 350 controllers and AP managers, per last year's attendee breakdown\nBooth package (10x10, Silver): $28,000\nTravel and hotels for three people: $7,500\nBooth build and shipping: $6,000\nSwag: $1,500\nBudget: $45,000\nThe prospectus headline is \"40,000 impressions across the expo app\".\nLast year two of our... (536 characters in all)",
 "facts": "(a JSON string; decoded: company Paywistle, role sponsor, outcome pipeline, event Remitfold Expo 2026 on 2026-11-17, 6000 attendees, 350 of your buyers, 4 cost lines totalling 43000, benchmark 450, meetings 35-70, cost per meeting 614-1229, ratio 1.4-2.7, 47 days to go; flags EV-06, EV-07, EV-08, EV-10)",
 "outcome": "pipeline",
 "question": "Should we take the booth?",
 "decide_handoff": "{\"verdict\":\"go with changes\",\"role\":\"sponsor\",\"outcome\":\"pipeline\",\"conditions\":[\"Get this year's count of controllers and AP managers registered, in writing, before signing.\",\"Negotiate the price or add stage time or side-event rights, since pricing is soft inside 8 weeks.\",\"Pre-book meetings with named controllers 1-..."
}

Reply:

{
 "task": "plan",
 "source": "decide handoff",
 "role": "sponsor",
 "outcome": "pipeline",
 "goal": {
  "metric": "meetings booked",
  "target": "[target]",
  "owner": "[owner]"
 },
 "target_list": {
  "who": "Controllers and AP managers at mid-market finance teams (200-2,000 employees) attending Remitfold Expo 2026, plus their CFOs where they come.",
  "how_many": "15-30 named people",
  "sources": [
   "This year's attendee breakdown by role, requested in writing from the organiser",
   "Your open pipeline and closed-lost accounts with a controller or AP manager likely in Chicago",
   "The Remitfold Expo 2026 speaker and exhibitor lists, for finance teams sending people"
  ]
 },
 "timeline": [
  {
   "stage": "before",
   "when": "[date]",
   "owner": "[owner]",
   "what": "Get this year's count of controllers and AP managers registered, in writing, before signing (the attendee list reality check)."
  },
  {
   "stage": "before",
   "when": "[date]",
   "owner": "[owner]",
   "what": "Before signing, ask for a speaking or panel slot and side-event rights, then negotiate price, since pricing is soft inside 8 weeks."
  },
  {
   "stage": "before",
   "when": "[date]",
   "owner": "SDR",
   "what": "Build the list of 15-30 named controllers and AP managers to meet in Chicago."
  },
  {
   "stage": "before",
   "when": "2-4 weeks out",
   "owner": "AEs",
   "what": "If side-event rights are won, invite 8-14 named controllers and CFOs to a dinner during the expo."
  },
  {
   "stage": "before",
   "when": "1-3 weeks ahead",
   "owner": "SDR",
   "what": "Book 15-minute booth meetings with the named list, with a specific reason to come, so the booth is not relying on walk-bys."
  },
  {
   "stage": "during",
   "when": "17-19 November 2026",
   "owner": "AEs",
   "what": "Work t
... (shortened here; the page shows it whole)

Decide: a $60,000 gold sponsorship that fails the 3x line (pass)

Input:

{
 "task": "decide",
 "company": "Portalwren",
 "role": "sponsor",
 "you": "Portalwren - internal developer portal for platform engineering teams at companies with 500+ engineers.\nOur buyer is the head of platform engineering; deals are around $60,000 ACV with a 6-month sales cycle.\nA qualified meeting from outbound costs us about $700, all in.\n",
 "event": "Stackmoot Global 2026 - developer conference, Las Vegas, March 9-11, 2027\n12,000 attendees expected, \"the largest developer audience of the year\".\nThe organiser could not say how many platform engineering leads attend; our guess from last year's speaker list is that around 150 of them are our buyers.\nGold sponsorship (booth, logo on lanyards, 2 passes): $60,000\nExtra passes for two more people: $4,000\nFlights and hote... (576 characters in all)",
 "facts": "(a JSON string; decoded: company Portalwren, role sponsor, outcome pipeline, event Stackmoot Global 2026 on 2027-03-09, 12000 attendees, 150 of your buyers, 4 cost lines totalling 85000, benchmark 700, meetings 15-30, cost per meeting 2833-5667, ratio 4-8.1, 159 days to go; flags EV-01, EV-06, EV-08)",
 "outcome": "pipeline"
}

Reply:

{
 "task": "decide",
 "verdict": "pass",
 "reason": "Even at the best end a meeting costs 4 times your outbound cost, and nothing in the notes shows a strategic multiplier that would justify it.",
 "role": "sponsor",
 "outcome": "pipeline",
 "math_reading": "At 15 to 30 meetings (the directional 10-20% of a guessed 150 buyers), a meeting costs $2,833 to $5,667, 4 to 8.1 times your $700 outbound meeting. That is past the skill's 3 times pass line at both ends, on a total of $85,000.",
 "in_person": {
  "needed": "yes",
  "why": "A $60,000 ACV deal on a 6-month cycle is the kind of sale the skill says earns in-person cost, so the question is which in-person play, not whether.",
  "evidence": [
   "deals are around $60,000 ACV with a 6-month sales cycle"
  ]
 },
 "multipliers": [
  {
   "multiplier": "exact buyers concentrated nowhere else",
   "present": "unknown",
   "why": "The 150 buyers are your guess from a speaker list, and the notes do not show they cannot be reached elsewhere.",
   "evidence": []
  },
  {
   "multiplier": "category-defining event",
   "present": "unknown",
   "why": "The organiser's audience-size claim is about developers in general, not about platform engineering leaders.",
   "evidence": []
  },
  {
   "multiplier": "access you cannot buy elsewhere",
   "present": "unknown",
   "why": "Gold buys a booth, lanyard logos and passes, none of which is access to heads of platform engineering.",
   "evidence": []
  }
 ],
 "red_flags": [
  {
   "flag": "attendee counts without composition",
   "evidence": [
    "12,000 attendees expected",
    "The organiser could not say how many platform engineering leads attend"
   ]
  },
  {
   "flag": "impressions as the headline metric",
   "evidence": [
    "Headline metric in the prospectus",
    "500,000 impres
... (shortened here; the page shows it whole)

Decide: two people at a 180-person regional forum (go)

Input:

{
 "task": "decide",
 "company": "Scaffwick",
 "role": "attend",
 "you": "Scaffwick - safety-compliance software for regional construction contractors (50-500 field staff).\nWe sell to the operations director or safety manager. ACV is around $9,000.\nOur cost per meeting from LinkedIn ads is about $380.\n",
 "event": "Midwest Builders Safety Forum - regional conference, Columbus, 2-3 December 2026\nAttendees: about 180, mostly safety managers and operations directors from contractors in Ohio and Indiana\nICP attendees: about 120 (organiser's attendee breakdown by role)\nTwo tickets: $1,200\nTravel (driving) and one hotel night for two: $900\nPlan: attend, book meetings with 20 named contractors before we go, and host a breakfast for 10... (582 characters in all)",
 "facts": "(a JSON string; decoded: company Scaffwick, role attend, outcome pipeline, event Midwest Builders Safety Forum on 2026-12-02, 180 attendees, 120 of your buyers, 3 cost lines totalling 2800, benchmark 380, meetings 12-12, cost per meeting 233-233, ratio 0.6-0.6, 62 days to go; flags none)",
 "outcome": "pipeline",
 "question": "Is this worth two people for two days?"
}

Reply:

{
 "task": "decide",
 "verdict": "go",
 "reason": "About 120 of the 180 attendees are your buyers, the stated 12 meetings cost $233 each against $380 from LinkedIn ads, and the plan is already pre-booked meetings plus a breakfast.",
 "role": "attend",
 "outcome": "pipeline",
 "math_reading": "At the 12 meetings you target, a meeting costs $233 on a $2,800 total, 0.6 times the $380 a LinkedIn ads meeting costs you. A niche regional event of about 180 people is the kind the skill says often wins on cost per qualified meeting.",
 "in_person": {
  "needed": "yes",
  "why": "Safety compliance for regional construction contractors is a conservative, compliance-driven buyer, where the skill says face time earns its cost.",
  "evidence": [
   "safety-compliance software for regional construction contractors"
  ]
 },
 "multipliers": [
  {
   "multiplier": "exact buyers concentrated nowhere else",
   "present": "yes",
   "why": "The room is mostly your two buyer roles from a two-state regional market, a mix you rarely get in one place.",
   "evidence": [
    "mostly safety managers and operations directors from contractors in Ohio and Indiana"
   ]
  },
  {
   "multiplier": "category-defining event",
   "present": "unknown",
   "why": "The notes do not say whether this forum sets the agenda for contractor safety in the region.",
   "evidence": []
  },
  {
   "multiplier": "access you cannot buy elsewhere",
   "present": "unknown",
   "why": "The breakfast creates access you control, but the notes do not show access only the organiser can give.",
   "evidence": []
  }
 ],
 "red_flags": [],
 "counterfactual": "The same $2,800 in LinkedIn ads buys meetings at about $380 each, more than the $233 a meeting here if the 12 land.",
 "negotiate": [],
 "alternative": {
  "play": "none",
  
... (shortened here; the page shows it whole)

Plan: a 12-seat dinner for target accounts, from the input

Input:

{
 "task": "plan",
 "company": "Tidewick Analytics",
 "role": "host",
 "you": "Tidewick Analytics - revenue forecasting for B2B SaaS finance teams.\nOur buyer is the VP Finance or CFO at SaaS companies with $20M-$200M ARR.\nWe have 14 target accounts whose finance leaders will be at SaaSFin Summit in Boston.\nOur cost per meeting from outbound is about $520.\n",
 "event": "Side dinner during SaaSFin Summit - a dinner we host, Boston, 21 October 2026\nFormat: private dinner, 12 seats, at a restaurant two blocks from the venue\nGuests: 10 finance leaders from our target accounts plus 2 respected CFOs as magnetic guests\nRestaurant (private room, set menu for 14 incl. our two hosts): $3,400\nInvitations: personal emails from our CEO\nMeetings target: 8\nOwner: Tamsin Brockhollow (head of demand gen)\n",
 "facts": "(a JSON string; decoded: company Tidewick Analytics, role host, outcome pipeline, event Side dinner during SaaSFin Summit on 2026-10-21, None attendees, 10 of your buyers, 1 cost lines totalling 3400, benchmark 520, meetings 8-8, cost per meeting 425-425, ratio 0.8-0.8, 20 days to go; flags EV-07)",
 "outcome": "pipeline"
}

Reply:

{
 "task": "plan",
 "source": "from the input",
 "role": "host",
 "outcome": "pipeline",
 "goal": {
  "metric": "meetings booked",
  "target": "8",
  "owner": "Tamsin Brockhollow (head of demand gen)"
 },
 "target_list": {
  "who": "The VP Finance or CFO at each of your 14 target accounts at SaaSFin Summit, plus 2 respected CFOs as magnetic guests.",
  "how_many": "14",
  "sources": [
   "Your list of 14 target accounts whose finance leaders will be at SaaSFin Summit",
   "The SaaSFin Summit speaker and attendee lists, filtered to SaaS companies with $20M-$200M ARR",
   "Your CEO's network, for the 2 magnetic CFOs"
  ]
 },
 "timeline": [
  {
   "stage": "before",
   "when": "[date]",
   "owner": "Tamsin Brockhollow (head of demand gen)",
   "what": "Name the VP Finance or CFO at each of the 14 target accounts and confirm the 2 magnetic CFOs before invitations go out."
  },
  {
   "stage": "before",
   "when": "2-4 weeks out",
   "owner": "CEO",
   "what": "Send the personal dinner invitations now, since the dinner is 20 days away and the window is closing."
  },
  {
   "stage": "before",
   "when": "1-3 weeks ahead",
   "owner": "Tamsin Brockhollow (head of demand gen)",
   "what": "Book 15-minute meetings at SaaSFin Summit with target-account leaders who cannot make the dinner."
  },
  {
   "stage": "before",
   "when": "[date]",
   "owner": "[owner]",
   "what": "Tell the target accounts you will be at SaaSFin Summit, with the 2 CFO guests as the reason to come."
  },
  {
   "stage": "during",
   "when": "21 October 2026",
   "owner": "CEO",
   "what": "Host the 12-seat dinner, seat a host near each cluster of target-account guests, and ask each the qualifying question."
  },
  {
   "stage": "during",
   "when": "21 October 2026",
   "owner": "Tamsin Brockhollow (head of demand gen)",
   "what":
... (shortened here; the page shows it whole)

The page re-checks the reply; the API does not

The page holds every reply to account (recon.js): for a decision, pass when a meeting costs 3 times your other channels even at the best end (EV-01) and no strategic multiplier is shown; go only when your buyers in the room and the cost are both known and nothing is over budget; conditions for a go with changes; the outcome you chose; the three multipliers in order, quoted when shown; only the four prospectus red flags, quoted; for a sponsorship that goes ahead, 2 to 5 negotiation asks in the skill's order; an alternative play. For a plan, the role and outcome you chose; a goal metric from the real or decisive tier, never vanity; 4 to 8 timeline steps ordered before, during, after; a meeting-booking email of at most 100 words; follow-up in the tiers hot, warm, scan-only, with no sales sequence for scans; 3 to 6 metrics with the right tier. In both, quotes are checked word for word and no cost, count, rate, date or duration may be invented. Over the API you get the model's reply as it is; run the same checks yourself with Recon.reconcile in recon.js, or paste the same input into the page.

Step 1 — a tiny client helper

One function that sends JSON and unwraps the envelope.

BASE="https://api.skillsafe.ai/v1/app-api"
TOKEN="paste-your-token-here"   # from https://event-desk.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-desk"}' | 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 (not wrapped in {"input": ...}). hold_credits is a reservation, not the price; min_credits is what the balance must cover; model reads gpt-5.6-terra and model_alias gpt-terra.

# input.json: the run input object - {"task": "decide", "company": "...", "role": "sponsor", "you": "...", "event": "...", "facts": "..."}
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-desk:<lane>:<inputHash>:a<attempt>. The job's output.output is the reply text; truncated: true means the balance cut it short.

KEY="event-desk:decide:$(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 lane's contract
echo "$J" | jq '.data | {charged_credits, truncated}' 

Step 6 — POST /run-stream (plan)

The same run as Server-Sent Events. plan.json is a plan-lane input, with decide_handoff when it follows a decision.

# 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-desk:plan:$(shasum -a 256 plan.json | cut -c1-16):a1" --data @plan.json