RICE & ICE Calculator API
Ranking a list, the checks, the what-ifs and the downloads all run free in the browser and are not part of this API. The API runs the one metered step: writing the recommendation for a ranking.
Base URL: https://api.skillsafe.ai/v1/app-api. Every response is an envelope {"data": ..., "error": null} or {"data": null, "error": {"code", "message"}}.
The task field
This app has one task. Always send "task": "recommend".
| task | What it does | Reply |
|---|---|---|
recommend | Reads a ranking against the decision it supports and says what to fund and defer, what each divergence means, what would change the call and the next step. It never computes a new score. | One JSON object |
The input
All values are strings. task, context and items are required; send "" for anything else you do not have.
| Field | What to send |
|---|---|
task | "recommend" |
context | The decision the ranking supports, e.g. Q3 roadmap for a 5-person team (at most 300 characters). |
cut | How many items can be funded, e.g. "3". |
unit | The effort unit: weeks, days, person-months or story points. |
method | The method the ranking is ordered by: RICE, ICE or Weighted scoring. |
items | One line per ranked item, best first: rank | name | reach | impact | confidence | effort | RICE | ICE rank | ICE | weighted rank | weighted | agreement. At most 60 lines; the page keeps the top and the bottom of a longer list and says so in clip_note. |
divergent | One line per item the methods rank very differently, with its ranks and the dimension that drives the gap. |
sensitivity | Recalculated what-ifs near the fund line, one per line. |
excluded | Methods that did not run and why, one per line. |
missing | Items without the numbers to rank them, one per line. |
checks | The page's checks of the inputs, one per line: fix | ..., improve | ... or note | .... |
clip_note | Empty, or a sentence saying what was left out of a long list. |
The reply
job.output.output is text holding one JSON object: recommendation (3 to 5 sentences), fund and defer (exact item names; together they cover every ranked item), divergences (one {item, why, verify} per divergent item), what_changes_it, next_step, data_to_collect and limitations. Before using it, check that every name in fund and defer is a ranked item, that every divergence is one you sent, and that it carries no number or name your input does not have. The page does exactly that, and shows what it refused.
Worked examples
The three examples on the page, each with the exact input the page sends and a model reply.
SaaS roadmap, 8 features (RICE and ICE)
Input:
{
"task": "recommend",
"context": "Q3 roadmap for a 5-person product team; we can ship about three of these",
"cut": "3",
"unit": "weeks",
"method": "RICE",
"items": "1 | Saved filters | 3,200 | 0.5 | 80% | 1 | 1,280 | 5 | 288 | | | divergent\n2 | Dark mode | 9,000 | 0.25 | 100% | 2 | 1,125 | 8 | 160 | | | divergent\n3 | In-app onboarding checklist | 4,000 | 2 | 50% | 4 | 1,000 | 6 | 240 | | | divergent\n4 | Bulk CSV import | 2,400 | 1 | 80% | 3 | 640 | 4 | 336 | | | strong\n5 | Slack notifications | 1,500 | 1 | 80% | 2 | 600 | 3 | 384 | | | partial\n6 | SSO with Google and Okta | 600 | 3 | 80% | 5 | 288 | 2 | 400 | | | divergent\n7 | Audit log | 500 | 2 | 80% | 3 | 267 | 1 | 448 | | | divergent\n8 | Usage-based billing | 350 | 3 | 50% | 8 | 65.6 | 7 | 200 | | | strong",
"divergent": "SSO with Google and Okta: RICE #6, ICE #2. Reach of 600 is among the smallest in the list; ICE leaves reach out, so it ranks higher there.\nIn-app onboarding checklist: RICE #3, ICE #6. Reach of 4,000 is among the largest in the list, and ICE leaves reach out.\nDark mode: RICE #2, ICE #8. Reach of 9,000 is the largest in the list, and ICE leaves reach out.\nSaved filters: RICE #1, ICE #5. Reach of 3,200 is among the largest in the list, and ICE leaves reach out.\nAudit log: RICE #7, ICE #1. Reach of 500 is among the smallest in the list; ICE leaves reach out, so it ranks higher there.",
"sensitivity": "If In-app onboarding checklist takes 8 weeks instead of 4, its RICE falls to 500 and it ranks #5, below the line.\nIf Bulk CSV import were a sure thing (100% confidence instead of 80%), its RICE would be 800 and it would rank #4, still below the line.\nIf Bulk CSV import took 1.92 weeks instead of 3, its RICE would equal In-app onboarding checklist's 1,000, level with the top 3.",
"excluded": "Weighted scoring: Needs criteria: add number columns such as Revenue or Strategic fit (1-10) and they are weighed.\nMoSCoW: Only for a scope cut: add a MoSCoW column (Must, Should, Could, Won't) to show it.\nKano: Needs customer research: asking, per feature, how people would feel with it and without it. Not guessed here.",
"missing": "",
"checks": "improve | 100% confidence on Dark mode. Is there data behind that? 80% is the usual ceiling without data.\nnote | 5 items rank very differently across methods: SSO with Google and Okta, In-app onboarding checklist, Dark mode and 2 more. That gap is worth a look before you commit.",
"clip_note": ""
}
Reply:
{
"recommendation": "For this Q3 roadmap, fund Saved filters, Dark mode and In-app onboarding checklist, the 3 items above the line under RICE, and defer the other five. Saved filters leads at RICE 1,280 for 1 week of effort. The methods disagree on 5 items, and the pattern is reach: Dark mode (reach 9,000, RICE #2, ICE #8) and In-app onboarding checklist (RICE #3, ICE #6) win because they touch many people, while Audit log (ICE #1) and SSO with Google and Okta (ICE #2) rise only when reach is ignored. Under ICE the funded set would look quite different, so the choice rests on whether reach should count. Two cautions: the page flags Dark mode's 100% confidence as unsupported, and In-app onboarding checklist drops to #5, below the line, if it takes 8 weeks instead of 4.",
"fund": [
"Saved filters",
"Dark mode",
"In-app onboarding checklist"
],
"defer": [
"Bulk CSV import",
"Slack notifications",
"SSO with Google and Okta",
"Audit log",
"Usage-based billing"
],
"divergences": [
{
"item": "SSO with Google and Okta",
"why": "Its reach of 600 is among the smallest, so RICE puts it at #6, but impact 3 lifts it to #2 under ICE, which ignores reach.",
"verify": "Is there a specific set of accounts that are blocked until SSO exists, regardless of how few they are?"
},
{
"item": "In-app onboarding checklist",
"why": "Reach of 4,000 carries it to RICE #3, while ICE ranks it #6 because ICE leaves reach out and its confidence is only 50%.",
"verify": "Do the engineers stand behind the 4 week estimate for this item?"
},
{
"item": "Dark mode",
"why": "Reach of 9,000 gives it RICE #2, but its impact of 0.25 is low, so ICE ranks it #8; the gap is almost all reach.",
"verify": "Is there any evidence behind the 100% confidence that this many people want it?"
},
{
"item": "Saved filters",
"why": "Reach of 3,200 and 1 week of effort put it first on RICE, while ICE ranks it #5 because impact is 0.5 and reach does not count there.",
"verify": "Will the 3,200 people it reaches actually use it often enough to matter?"
},
{
"item": "Audit log",
"why": "Reach of 500 is among the smallest, so RICE ranks it #7, yet impact 2 and 80% confidence make it #1 under ICE.",
"verify": "Does any deal or commitment this quarter depend on having an audit log?"
}
],
"what_changes_it": [
"If In-app onboarding checklist takes 8 weeks instead of 4, its RICE falls to 500 and it ranks #5, below the line.",
"If Bulk CSV import were a sure thing (100% confidence instead of 80%), its RICE would be 800 and it would rank #4, still below the line.",
"Cutting Bulk CSV import scope to 1.92 weeks of effort instead of 3 would put it level with the top 3."
],
"next_step": "Ask the engineers to re-estimate the effort for In-app onboarding checklist before the roadmap is locked, since 8 weeks instead of 4 would push it out.",
"data_to_collect": [
"Evidence behind the 100% confidence on Dark mode, such as requests or usage data.",
"An effort estimate from the engineers for In-app onboarding checklist, which has only 50% confidence.",
"Customer research asking, per feature, how people would feel with it and without it, to unlock Kano for the deferred items."
],
"limitations": [
"RICE rewards wide reach, so it undervalues narrow but important items such as SSO with Google and Okta and Audit log.",
"These methods do not capture dependencies between items, risk, or strategic bets.",
"Kano did not run, so nothing here says which features customers expect versus which would delight them."
]
}
On the page, every fund and defer name is checked against the ranked items, every divergence against the ones the page found, and every sentence for numbers or names the input does not have.
Growth experiments (ICE and a weighted score)
Input:
{
"task": "recommend",
"context": "Pick next month's growth experiments for a two-person marketing team",
"cut": "3",
"unit": "weeks",
"method": "ICE",
"items": "1 | Annual plan discount banner | | | | | | 1 | 432 | 4 | 6.5 | divergent\n2 | Pricing page A/B test | | | | | | 2 | 392 | 3 | 7 | strong\n3 | Referral credit for both sides | | | | | | 3 | 288 | 1 | 8 | partial\n4 | Exit-intent survey | | | | | | 4 | 240 | 7 | 3 | divergent\n5 | Free tool for lead capture | | | | | | 5 | 150 | 6 | 5.5 | strong\n6 | Webinar series | | | | | | 6 | 100 | 5 | 6 | strong\n7 | Partner integrations directory | | | | | | 7 | 84 | 2 | 7.5 | divergent",
"divergent": "Annual plan discount banner: ICE #1, Weighted scoring #4. It ranks lower on the weighted score, held back by its Strategic fit (5 of 10).\nExit-intent survey: ICE #4, Weighted scoring #7. It ranks lower on the weighted score, held back by its Revenue (2 of 10).\nPartner integrations directory: ICE #7, Weighted scoring #2. It ranks higher on the weighted score, carried by its Strategic fit (9 of 10).",
"sensitivity": "If Referral credit for both sides were 2 points harder (ease 4), its ICE would be 192 and it would rank #4, below the line.\nIf Exit-intent survey had 2 more points of confidence (10), its ICE would be 300 and it would rank #3, inside the line.",
"excluded": "RICE: No item has all four of reach, impact, confidence and effort. Add them, or fill in the worksheet.\nMoSCoW: Only for a scope cut: add a MoSCoW column (Must, Should, Could, Won't) to show it.\nKano: Needs customer research: asking, per feature, how people would feel with it and without it. Not guessed here.",
"missing": "",
"checks": "improve | The weighted score uses equal weights for Revenue, Strategic fit. Equal weights are a choice; set what your team values under More options.\nnote | 3 items rank very differently across methods: Annual plan discount banner, Exit-intent survey, Partner integrations directory. That gap is worth a look before you commit.",
"clip_note": ""
}
Reply:
{
"recommendation": "For a two-person team picking next month's growth experiments, fund the top three by ICE: Annual plan discount banner (ICE 432), Pricing page A/B test (392) and Referral credit for both sides (288), and defer the other four. The line is tight, because Exit-intent survey sits at #4 with ICE 240 and would move inside the line at 300 if its confidence rose to 10, so check that input before locking the plan. The key divergence is the Annual plan discount banner: ICE #1 but Weighted scoring #4, held back by Strategic fit (5 of 10), so the answer changes if your team weighs strategic fit more than quick payoff. Partner integrations directory is the reverse, ICE #7 but Weighted scoring #2, carried by Strategic fit (9 of 10), which is worth revisiting later even though it stays deferred now. The weighted score used equal weights, and equal weights are a choice the team should make on purpose.",
"fund": [
"Annual plan discount banner",
"Pricing page A/B test",
"Referral credit for both sides"
],
"defer": [
"Exit-intent survey",
"Free tool for lead capture",
"Webinar series",
"Partner integrations directory"
],
"divergences": [
{
"item": "Annual plan discount banner",
"why": "It is ICE #1 but Weighted scoring #4 because its Strategic fit is only 5 of 10, so it wins on quick payoff more than on long-term direction.",
"verify": "Does a discount banner fit where the team wants the pricing and plan story to go over the next few months?"
},
{
"item": "Exit-intent survey",
"why": "It is ICE #4 but Weighted scoring #7 because its Revenue is 2 of 10, so it is a way to learn rather than a direct revenue lever.",
"verify": "Will what the survey teaches feed a revenue experiment the team would actually run next?"
},
{
"item": "Partner integrations directory",
"why": "It is ICE #7 but Weighted scoring #2 because its Strategic fit is 9 of 10, so the ICE score may undersell a slow-building bet.",
"verify": "Is the directory a strategic priority the team is willing to start slowly even if it pays back later?"
}
],
"what_changes_it": [
"If Referral credit for both sides were 2 points harder (ease 4), its ICE would be 192 and it would rank #4, below the line.",
"If Exit-intent survey had 2 more points of confidence (10), its ICE would be 300 and it would rank #3, inside the line."
],
"next_step": "Ask the two people who would build the Referral credit for both sides how hard it really is, since that ease score decides whether it keeps the third slot.",
"data_to_collect": [
"An ease estimate for Referral credit for both sides from the people who would build it.",
"Evidence behind the confidence score for Exit-intent survey, such as past survey response rates.",
"The weights the team actually wants for Revenue and Strategic fit."
],
"limitations": [
"These methods do not measure dependencies between experiments or the risk of each one.",
"Kano did not run: it needs customer research asking, per feature, how people would feel with it and without it.",
"ICE favours quick, easy wins and can undersell slower strategic bets such as the Partner integrations directory."
]
}
On the page, every fund and defer name is checked against the ranked items, every divergence against the ones the page found, and every sentence for numbers or names the input does not have.
Solo app, some numbers missing
Input:
{
"task": "recommend",
"context": "Next month on my habit-tracker app; I have about 5 hours a week",
"cut": "2",
"unit": "days",
"method": "RICE",
"items": "1 | Streak freeze | 1,200 | 1 | 80% | 1 | 960 | 1 | 480 | | | strong\n2 | Home screen widget | 900 | 1 | 80% | 4 | 180 | 2 | 432 | | | strong\n3 | Dark mode | 300 | 0.5 | 80% | 2 | 60 | 5 | 320 | | | partial\n4 | iCloud sync | 450 | 2 | 50% | 10 | 45 | 5 | 320 | | | strong\n5 | Export to CSV | 80 | 0.5 | 100% | 1 | 40 | 3 | 400 | | | partial\n6 | Apple Watch app | 150 | 3 | 50% | 15 | 15 | 4 | 350 | | | partial",
"divergent": "",
"sensitivity": "If Home screen widget takes 8 days instead of 4, its RICE falls to 90 and it ranks #2, still above the line.\nIf Dark mode were a sure thing (100% confidence instead of 80%), its RICE would be 75 and it would rank #3, still below the line.\nIf Dark mode took 0.667 days instead of 2, its RICE would equal Home screen widget's 180, level with the top 2.\nIf confidence in Home screen widget were half (40%), its RICE would be 90 and it would rank #2, still above the line.",
"excluded": "Weighted scoring: Needs criteria: add number columns such as Revenue or Strategic fit (1-10) and they are weighed.\nMoSCoW: Only for a scope cut: add a MoSCoW column (Must, Should, Could, Won't) to show it.\nKano: Needs customer research: asking, per feature, how people would feel with it and without it. Not guessed here.",
"missing": "Better onboarding (no reach, impact, confidence, effort)\nHabit templates (no reach, impact, confidence, effort)",
"checks": "improve | 2 items have no numbers, so they are not ranked: Better onboarding, Habit templates. The worksheet has a row for each.\nimprove | 100% confidence on Export to CSV. Is there data behind that? 80% is the usual ceiling without data.",
"clip_note": ""
}
Reply:
{
"recommendation": "With about 5 hours a week next month, fund Streak freeze and Home screen widget, the two items above the line. Streak freeze leads on RICE at 960 for 1 day of effort, and the widget follows at 180 for 4 days; both also come first and second on ICE, so the answer does not change under ICE. Defer Dark mode, iCloud sync, Export to CSV and Apple Watch app. Dark mode (RICE 60) is the nearest miss, but it stays below the line even at 100% confidence. Export to CSV carries 100% confidence, which the page flags as worth questioning, so do not treat its RICE of 40 as firm. Better onboarding and Habit templates have no numbers and are not ranked.",
"fund": [
"Streak freeze",
"Home screen widget"
],
"defer": [
"Dark mode",
"iCloud sync",
"Export to CSV",
"Apple Watch app"
],
"divergences": [],
"what_changes_it": [
"If Home screen widget takes 8 days instead of 4, its RICE falls to 90 and it still ranks #2, above the line.",
"If Dark mode were a sure thing at 100% confidence its RICE would be 75, still #3 and below the line, so confidence alone will not rescue it."
],
"next_step": "Check whether you can fit Streak freeze and the Home screen widget into your 5 hours a week next month, and start with Streak freeze.",
"data_to_collect": [
"Evidence behind the 100% confidence on Export to CSV, such as how many users have actually asked for it.",
"An effort estimate in days for Home screen widget, since its place above the line rests on 4 days.",
"Reach, impact, confidence and effort for Better onboarding and Habit templates so they can be ranked."
],
"limitations": [
"RICE and ICE do not measure dependencies or strategic bets, such as whether iCloud sync unlocks anything else.",
"Kano did not run: it needs asking people, per feature, how they would feel with it and without it.",
"Both methods favour small, cheap items, so large bets like Apple Watch app score low on effort alone."
]
}
On the page, every fund and defer name is checked against the ranked items, every divergence against the ones the page found, and every sentence for numbers or names the input does not have.
Errors
| HTTP | What to do |
|---|---|
| 401 | The token is missing, expired or a guest token on a run. Get a personal token on the token page. |
| 402 | The balance is below what the run reserves. Top up at skillsafe.ai/account/billing. |
| 400 | The body is not a JSON object of the fields above, or a required field is missing. |
| 429 | Wait and retry with the same Idempotency-Key. |
Step 1 — a tiny client helper
One function that sends JSON and unwraps the {data, error} envelope.
BASE="https://api.skillsafe.ai/v1/app-api"
TOKEN="paste-your-token-here" # from https://rice-ice-calculator.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"}
}import json, urllib.request
BASE = "https://api.skillsafe.ai/v1/app-api"
TOKEN = "paste-your-token-here" # from https://rice-ice-calculator.skillsafe.ai/tokens.html
def api(method, path, body=None, headers=None):
req = urllib.request.Request(BASE + path, method=method,
data=None if body is None else json.dumps(body).encode(),
headers={"Content-Type": "application/json", **({"Authorization": "Bearer " + TOKEN} if TOKEN else {}), **(headers or {})})
with urllib.request.urlopen(req) as r:
env = json.load(r)
if env.get("error"):
raise RuntimeError(env["error"])
return env["data"]// rice-ice-calculator.mjs -- Node 18+ (global fetch)
const BASE = "https://api.skillsafe.ai/v1/app-api";
let TOKEN = "paste-your-token-here"; // from https://rice-ice-calculator.skillsafe.ai/tokens.html
async function api(method, path, body, headers = {}) {
const r = await fetch(BASE + path, { method, headers: { "Content-Type": "application/json",
...(TOKEN ? { Authorization: "Bearer " + TOKEN } : {}), ...headers },
body: body === undefined ? undefined : JSON.stringify(body) });
const env = await r.json();
if (env.error) throw new Error(env.error.code + ": " + env.error.message);
return env.data;
}package main
import ("bytes"; "encoding/json"; "fmt"; "net/http")
const base = "https://api.skillsafe.ai/v1/app-api"
var token = "paste-your-token-here" // from https://rice-ice-calculator.skillsafe.ai/tokens.html
func api(method, path string, body any, headers map[string]string) (map[string]any, error) {
var buf bytes.Buffer
if body != nil { json.NewEncoder(&buf).Encode(body) }
req, _ := http.NewRequest(method, base+path, &buf)
req.Header.Set("Content-Type", "application/json")
if token != "" { req.Header.Set("Authorization", "Bearer "+token) }
for k, v := range headers { req.Header.Set(k, v) }
res, err := http.DefaultClient.Do(req)
if err != nil { return nil, err }
defer res.Body.Close()
var env struct { Data map[string]any; Error map[string]any }
json.NewDecoder(res.Body).Decode(&env)
if env.Error != nil { return nil, fmt.Errorf("%v", env.Error) }
return env.Data, nil
}// RiceIceCalculator.java -- Java 17+, with com.fasterxml.jackson.core:jackson-databind
import com.fasterxml.jackson.databind.*;
import java.net.URI; import java.net.http.*; import java.util.*;
public class RiceIceCalculator {
static final String BASE = "https://api.skillsafe.ai/v1/app-api";
static String token = "paste-your-token-here"; // from https://rice-ice-calculator.skillsafe.ai/tokens.html
static final ObjectMapper M = new ObjectMapper();
static final HttpClient C = HttpClient.newHttpClient();
static JsonNode api(String method, String path, Object body, Map<String, String> headers) throws Exception {
var b = HttpRequest.newBuilder(URI.create(BASE + path)).header("Content-Type", "application/json");
if (!token.isEmpty()) b.header("Authorization", "Bearer " + token);
if (headers != null) headers.forEach(b::header);
b.method(method, body == null ? HttpRequest.BodyPublishers.noBody() : HttpRequest.BodyPublishers.ofString(M.writeValueAsString(body)));
JsonNode env = M.readTree(C.send(b.build(), HttpResponse.BodyHandlers.ofString()).body());
if (env.hasNonNull("error")) throw new RuntimeException(env.get("error").toString());
return env.get("data");
}
}require "json"
require "net/http"
BASE = "https://api.skillsafe.ai/v1/app-api"
TOKEN = "paste-your-token-here" # from https://rice-ice-calculator.skillsafe.ai/tokens.html
def api(method, path, body = nil, headers = {})
uri = URI(BASE + path)
req = Net::HTTPGenericRequest.new(method, !body.nil?, true, uri.request_uri,
{ "Content-Type" => "application/json" }.merge(TOKEN.empty? ? {} : { "Authorization" => "Bearer #{TOKEN}" }).merge(headers))
req.body = JSON.generate(body) unless body.nil?
env = JSON.parse(Net::HTTP.start(uri.host, uri.port, use_ssl: true) { |h| h.request(req) }.body)
raise env["error"].to_s if env["error"]
env["data"]
end<?php
const BASE = "https://api.skillsafe.ai/v1/app-api";
$TOKEN = "paste-your-token-here"; // from https://rice-ice-calculator.skillsafe.ai/tokens.html
function api(string $method, string $path, $body = null, array $headers = []) {
global $TOKEN;
$h = ["Content-Type: application/json"];
if ($TOKEN) $h[] = "Authorization: Bearer $TOKEN";
foreach ($headers as $k => $v) $h[] = "$k: $v";
$ch = curl_init(BASE . $path);
curl_setopt_array($ch, [CURLOPT_CUSTOMREQUEST => $method, CURLOPT_HTTPHEADER => $h, CURLOPT_RETURNTRANSFER => true]);
if ($body !== null) curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode($body));
$env = json_decode(curl_exec($ch), true);
if (!empty($env["error"])) throw new Exception(json_encode($env["error"]));
return $env["data"];
}// Program.cs -- .NET 6+ console app
using System.Net.Http.Json; using System.Text.Json; using System.Text.Json.Nodes;
static class Api {
public const string Base = "https://api.skillsafe.ai/v1/app-api";
public static string Token = "paste-your-token-here"; // from https://rice-ice-calculator.skillsafe.ai/tokens.html
static readonly HttpClient C = new();
public static async Task<JsonNode?> Call(string method, string path, object? body = null, Dictionary<string, string>? headers = null) {
var req = new HttpRequestMessage(new HttpMethod(method), Base + path);
if (Token != "") req.Headers.Add("Authorization", "Bearer " + Token);
if (headers != null) foreach (var h in headers) req.Headers.Add(h.Key, h.Value);
if (body != null) req.Content = JsonContent.Create(body);
var env = JsonNode.Parse(await (await C.SendAsync(req)).Content.ReadAsStringAsync())!;
if (env["error"] is JsonNode e && e.GetValueKind() != JsonValueKind.Null) throw new Exception(e.ToJsonString());
return env["data"];
}
}Step 2 — a token
A guest token is enough for /me and /estimate. A run is metered, so it needs your personal token: sign in on the token page and copy it.
# 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":"rice-ice-calculator"}' | jq -r '.data.token')# a guest token (enough for /me and /estimate); a run needs your personal token from /tokens.html
TOKEN = ""
TOKEN = api("POST", "/guest", {"slug": "rice-ice-calculator"})["token"]// a guest token (enough for /me and /estimate); a run needs your personal token from /tokens.html
TOKEN = "";
TOKEN = (await api("POST", "/guest", { slug: "rice-ice-calculator" })).token;// inside main: a guest token (enough for /me and /estimate); a run needs your personal token
token = ""
g, err := api("POST", "/guest", map[string]string{"slug": "rice-ice-calculator"}, nil)
if err != nil { panic(err) }
token = g["token"].(string)// inside main: a guest token (enough for /me and /estimate); a run needs your personal token
token = "";
token = api("POST", "/guest", Map.of("slug", "rice-ice-calculator"), null).get("token").asText();# a guest token (enough for /me and /estimate); a run needs your personal token from /tokens.html
TOKEN.replace("")
TOKEN.replace(api("POST", "/guest", { slug: "rice-ice-calculator" })["token"])// a guest token (enough for /me and /estimate); a run needs your personal token from /tokens.html
$TOKEN = "";
$TOKEN = api("POST", "/guest", ["slug" => "rice-ice-calculator"])["token"];// a guest token (enough for /me and /estimate); a run needs your personal token from /tokens.html
Api.Token = "";
Api.Token = (await Api.Call("POST", "/guest", new { slug = "rice-ice-calculator" }))!["token"]!.GetValue<string>();Step 3 — who am I, and my balance
subject_type is guest or user; credits is the balance (1 credit = $0.0001).
api GET /me | jq '.data | {subject_type, credits}' me = api("GET", "/me")
print(me["subject_type"], me.get("credits"))const me = await api("GET", "/me");
console.log(me.subject_type, me.credits);me, _ := api("GET", "/me", nil, nil)
fmt.Println(me["subject_type"], me["credits"])JsonNode me = api("GET", "/me", null, null);
System.out.println(me.get("subject_type") + " " + me.get("credits"));me = api("GET", "/me")
puts [me["subject_type"], me["credits"]].inspect$me = api("GET", "/me");
echo $me["subject_type"], " ", $me["credits"] ?? "", "\n";var me = await Api.Call("GET", "/me");
Console.WriteLine($"{me!["subject_type"]} {me["credits"]}");Step 4 — price a run for free
/estimate charges nothing and starts no job. hold_credits is the amount reserved while a run is in flight, not the price; the run is charged what it uses.
# input.json: the run input object - {"task": "recommend", "context": "Q3 roadmap for a 5-person product team; we can ship about three of these", "cut": "3", "unit": "weeks", "method": "RICE", "items": "1 | Saved filters | 3,200 | 0.5 | 80% | 1 | 1,280 | 5 | 288 | | | divergent\n2 | Dark mode | 9,000 | 0.25 | 100% | 2 | 1,125 | 8 | 160 | | | divergent\n3 | In-app onboarding checklist | 4,000 | 2 | 50% | 4 | 1,000 | 6 | 240 | | | divergent\n4 | Bulk CSV import | 2,400 | 1 | 80% | 3 | 640 | 4 | 336 | | | strong\n5 | Slack notifications | 1,500 | 1 | 80% | 2 | 600 | 3 | 384 | | | partial\n6 | SSO with Google and Okta | 600 | 3 | 80% | 5 | 288 | 2 | 400 | | | divergent\n7 | Audit log | 500 | 2 | 80% | 3 | 267 | 1 | 448 | | | divergent\n8 | Usage-based billing | 350 | 3 | 50% | 8 | 65.6 | 7 | 200 | | | strong", "divergent": "SSO with Google and Okta: RICE #6, ICE #2. Reach of 600 is among the smallest in the list; ICE leaves reach out, so it ranks higher there.\nIn-app onboarding checklist: RICE #3, ICE #6. Reach of 4,000 is among the largest in the list, and ICE leaves reach out.\nDark mode: RICE #2, ICE #8. Reach of 9,000 is the largest in the list, and ICE leaves reach out.\nSaved filters: RICE #1, ICE #5. Reach of 3,200 is among the largest in the list, and ICE leaves reach out.\nAudit log: RICE #7, ICE #1. Reach of 500 is among the smallest in the list; ICE leaves reach out, so it ranks higher there.", "sensitivity": "If In-app onboarding checklist takes 8 weeks instead of 4, its RICE falls to 500 and it ranks #5, below the line.\nIf Bulk CSV import were a sure thing (100% confidence instead of 80%), its RICE would be 800 and it would rank #4, still below the line.\nIf Bulk CSV import took 1.92 weeks instead of 3, its RICE would equal In-app onboarding checklist's 1,000, level with the top 3.", "excluded": "Weighted scoring: Needs criteria: add number columns such as Revenue or Strategic fit (1-10) and they are weighed.\nMoSCoW: Only for a scope cut: add a MoSCoW column (Must, Should, Could, Won't) to show it.\nKano: Needs customer research: asking, per feature, how people would feel with it and without it. Not guessed here.", "missing": "", "checks": "improve | 100% confidence on Dark mode. Is there data behind that? 80% is the usual ceiling without data.\nnote | 5 items rank very differently across methods: SSO with Google and Okta, In-app onboarding checklist, Dark mode and 2 more. That gap is worth a look before you commit.", "clip_note": ""}
api POST /estimate "$(cat input.json)" | jq '.data | {hold_credits, min_credits, model, model_alias, markup_bps, warnings}' inp = json.load(open("input.json")) # {"task": "recommend", "context": "Q3 roadmap for a 5-person product team; we can ship about three of these", "cut": "3", "unit": "weeks", "method": "RICE", "items": "1 | Saved filters | 3,200 | 0.5 | 80% | 1 | 1,280 | 5 | 288 | | | divergent\n2 | Dark mode | 9,000 | 0.25 | 100% | 2 | 1,125 | 8 | 160 | | | divergent\n3 | In-app onboarding checklist | 4,000 | 2 | 50% | 4 | 1,000 | 6 | 240 | | | divergent\n4 | Bulk CSV import | 2,400 | 1 | 80% | 3 | 640 | 4 | 336 | | | strong\n5 | Slack notifications | 1,500 | 1 | 80% | 2 | 600 | 3 | 384 | | | partial\n6 | SSO with Google and Okta | 600 | 3 | 80% | 5 | 288 | 2 | 400 | | | divergent\n7 | Audit log | 500 | 2 | 80% | 3 | 267 | 1 | 448 | | | divergent\n8 | Usage-based billing | 350 | 3 | 50% | 8 | 65.6 | 7 | 200 | | | strong", "divergent": "SSO with Google and Okta: RICE #6, ICE #2. Reach of 600 is among the smallest in the list; ICE leaves reach out, so it ranks higher there.\nIn-app onboarding checklist: RICE #3, ICE #6. Reach of 4,000 is among the largest in the list, and ICE leaves reach out.\nDark mode: RICE #2, ICE #8. Reach of 9,000 is the largest in the list, and ICE leaves reach out.\nSaved filters: RICE #1, ICE #5. Reach of 3,200 is among the largest in the list, and ICE leaves reach out.\nAudit log: RICE #7, ICE #1. Reach of 500 is among the smallest in the list; ICE leaves reach out, so it ranks higher there.", "sensitivity": "If In-app onboarding checklist takes 8 weeks instead of 4, its RICE falls to 500 and it ranks #5, below the line.\nIf Bulk CSV import were a sure thing (100% confidence instead of 80%), its RICE would be 800 and it would rank #4, still below the line.\nIf Bulk CSV import took 1.92 weeks instead of 3, its RICE would equal In-app onboarding checklist's 1,000, level with the top 3.", "excluded": "Weighted scoring: Needs criteria: add number columns such as Revenue or Strategic fit (1-10) and they are weighed.\nMoSCoW: Only for a scope cut: add a MoSCoW column (Must, Should, Could, Won't) to show it.\nKano: Needs customer research: asking, per feature, how people would feel with it and without it. Not guessed here.", "missing": "", "checks": "improve | 100% confidence on Dark mode. Is there data behind that? 80% is the usual ceiling without data.\nnote | 5 items rank very differently across methods: SSO with Google and Okta, In-app onboarding checklist, Dark mode and 2 more. That gap is worth a look before you commit.", "clip_note": ""}
est = api("POST", "/estimate", inp)
print(est["hold_credits"], est["min_credits"], est["model"], est.get("warnings"))import { readFileSync } from "node:fs";
const input = JSON.parse(readFileSync("input.json", "utf8")); // {task, context, cut, unit, method, items, divergent, sensitivity, excluded, missing, checks, clip_note}
const est = await api("POST", "/estimate", input);
console.log(est.hold_credits, est.min_credits, est.model, est.warnings);raw, _ := os.ReadFile("input.json") // add "os" to the imports
var input map[string]any
json.Unmarshal(raw, &input)
est, _ := api("POST", "/estimate", input, nil)
fmt.Println(est["hold_credits"], est["min_credits"], est["model"])Map<String, Object> input = M.readValue(new java.io.File("input.json"), Map.class);
JsonNode est = api("POST", "/estimate", input, null);
System.out.println(est.get("hold_credits") + " " + est.get("min_credits") + " " + est.get("model"));input = JSON.parse(File.read("input.json"))
est = api("POST", "/estimate", input)
puts [est["hold_credits"], est["min_credits"], est["model"]].inspect$input = json_decode(file_get_contents("input.json"), true);
$est = api("POST", "/estimate", $input);
echo $est["hold_credits"], " ", $est["min_credits"], " ", $est["model"], "\n";var input = JsonNode.Parse(File.ReadAllText("input.json"))!;
var est = await Api.Call("POST", "/estimate", input);
Console.WriteLine($"{est!["hold_credits"]} {est["min_credits"]} {est["model"]}");Step 5 — run it and wait for the job
Send an Idempotency-Key derived from the input: a retry with the same key is never billed twice.
KEY="rice-ice-calculator:recommend:$(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: recommendation, fund, defer, divergences, what_changes_it, next_step, data_to_collect, limitations
echo "$J" | jq '.data | {charged_credits, truncated}' import hashlib, time
key = "rice-ice-calculator:" + inp["task"] + ":" + hashlib.sha256(json.dumps(inp).encode()).hexdigest()[:16] + ":a1"
job = api("POST", "/run", inp, {"Idempotency-Key": key})
while True:
j = api("GET", "/jobs/" + job["job_id"])
if j["status"] in ("succeeded", "failed", "cancelled"):
break
time.sleep(2)
reply = json.loads(j["output"]["output"]) # {recommendation, fund, defer, divergences, ...}
print(j["charged_credits"], j.get("truncated"), reply.get("recommendation"))import { createHash } from "node:crypto";
const key = `rice-ice-calculator:${input.task}:${createHash("sha256").update(JSON.stringify(input)).digest("hex").slice(0, 16)}:a1`;
const job = await api("POST", "/run", input, { "Idempotency-Key": key });
let j;
do { await new Promise((r) => setTimeout(r, 2000)); j = await api("GET", "/jobs/" + job.job_id); }
while (!["succeeded", "failed", "cancelled"].includes(j.status));
const reply = JSON.parse(j.output.output);
console.log(j.charged_credits, j.truncated, reply.recommendation);sum := sha256.Sum256(raw) // add "crypto/sha256", "encoding/hex", "time" to the imports
key := "rice-ice-calculator:" + input["task"].(string) + ":" + hex.EncodeToString(sum[:8]) + ":a1"
job, _ := api("POST", "/run", input, map[string]string{"Idempotency-Key": key})
var j map[string]any
for {
time.Sleep(2 * time.Second)
j, _ = api("GET", "/jobs/"+job["job_id"].(string), nil, nil)
if s := j["status"]; s == "succeeded" || s == "failed" || s == "cancelled" { break }
}
fmt.Println(j["charged_credits"], j["truncated"], j["output"].(map[string]any)["output"])var digest = java.security.MessageDigest.getInstance("SHA-256").digest(M.writeValueAsBytes(input));
String key = "rice-ice-calculator:" + input.get("task") + ":" + HexFormat.of().formatHex(digest, 0, 8) + ":a1";
JsonNode job = api("POST", "/run", input, Map.of("Idempotency-Key", key)), j;
do { Thread.sleep(2000); j = api("GET", "/jobs/" + job.get("job_id").asText(), null, null); }
while (!Set.of("succeeded", "failed", "cancelled").contains(j.get("status").asText()));
JsonNode reply = M.readTree(j.get("output").get("output").asText());
System.out.println(j.get("charged_credits") + " " + reply);require "digest"
key = "rice-ice-calculator:#{input["task"]}:#{Digest::SHA256.hexdigest(JSON.generate(input))[0, 16]}:a1"
job = api("POST", "/run", input, { "Idempotency-Key" => key })
j = nil
loop do
sleep 2
j = api("GET", "/jobs/#{job["job_id"]}")
break if %w[succeeded failed cancelled].include?(j["status"])
end
reply = JSON.parse(j["output"]["output"])
puts [j["charged_credits"], j["truncated"], reply["recommendation"]].inspect$key = "rice-ice-calculator:" . $input["task"] . ":" . substr(hash("sha256", json_encode($input)), 0, 16) . ":a1";
$job = api("POST", "/run", $input, ["Idempotency-Key" => $key]);
do { sleep(2); $j = api("GET", "/jobs/" . $job["job_id"]); }
while (!in_array($j["status"], ["succeeded", "failed", "cancelled"]));
$reply = json_decode($j["output"]["output"], true);
echo $j["charged_credits"], " ", $reply["recommendation"], "\n";var digest = System.Security.Cryptography.SHA256.HashData(System.Text.Encoding.UTF8.GetBytes(input.ToJsonString()));
var key = $"rice-ice-calculator:{input["task"]}:{Convert.ToHexString(digest, 0, 8).ToLowerInvariant()}:a1";
var job = await Api.Call("POST", "/run", input, new() { ["Idempotency-Key"] = key });
JsonNode j;
do { await Task.Delay(2000); j = (await Api.Call("GET", "/jobs/" + job!["job_id"]))!; }
while (!new[] { "succeeded", "failed", "cancelled" }.Contains(j["status"]!.GetValue<string>()));
var reply = JsonNode.Parse(j["output"]!["output"]!.GetValue<string>());
Console.WriteLine($"{j["charged_credits"]} {reply}");Step 6 — or stream it
/run-stream sends Server-Sent Events while the job runs and the finished job at the end.
# 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: rice-ice-calculator:recommend:$(shasum -a 256 input.json | cut -c1-16):a1" --data @input.jsonrin = json.load(open("input.json")) # {"task": "recommend", "context": "Q3 roadmap for a 5-person product team; we can ship about three of these", "cut": "3", "unit": "weeks", "method": "RICE", "items": "1 | Saved filters | 3,200 | 0.5 | 80% | 1 | 1,280 | 5 | 288 | | | divergent\n2 | Dark mode | 9,000 | 0.25 | 100% | 2 | 1,125 | 8 | 160 | | | divergent\n3 | In-app onboarding checklist | 4,000 | 2 | 50% | 4 | 1,000 | 6 | 240 | | | divergent\n4 | Bulk CSV import | 2,400 | 1 | 80% | 3 | 640 | 4 | 336 | | | strong\n5 | Slack notifications | 1,500 | 1 | 80% | 2 | 600 | 3 | 384 | | | partial\n6 | SSO with Google and Okta | 600 | 3 | 80% | 5 | 288 | 2 | 400 | | | divergent\n7 | Audit log | 500 | 2 | 80% | 3 | 267 | 1 | 448 | | | divergent\n8 | Usage-based billing | 350 | 3 | 50% | 8 | 65.6 | 7 | 200 | | | strong", "divergent": "SSO with Google and Okta: RICE #6, ICE #2. Reach of 600 is among the smallest in the list; ICE leaves reach out, so it ranks higher there.\nIn-app onboarding checklist: RICE #3, ICE #6. Reach of 4,000 is among the largest in the list, and ICE leaves reach out.\nDark mode: RICE #2, ICE #8. Reach of 9,000 is the largest in the list, and ICE leaves reach out.\nSaved filters: RICE #1, ICE #5. Reach of 3,200 is among the largest in the list, and ICE leaves reach out.\nAudit log: RICE #7, ICE #1. Reach of 500 is among the smallest in the list; ICE leaves reach out, so it ranks higher there.", "sensitivity": "If In-app onboarding checklist takes 8 weeks instead of 4, its RICE falls to 500 and it ranks #5, below the line.\nIf Bulk CSV import were a sure thing (100% confidence instead of 80%), its RICE would be 800 and it would rank #4, still below the line.\nIf Bulk CSV import took 1.92 weeks instead of 3, its RICE would equal In-app onboarding checklist's 1,000, level with the top 3.", "excluded": "Weighted scoring: Needs criteria: add number columns such as Revenue or Strategic fit (1-10) and they are weighed.\nMoSCoW: Only for a scope cut: add a MoSCoW column (Must, Should, Could, Won't) to show it.\nKano: Needs customer research: asking, per feature, how people would feel with it and without it. Not guessed here.", "missing": "", "checks": "improve | 100% confidence on Dark mode. Is there data behind that? 80% is the usual ceiling without data.\nnote | 5 items rank very differently across methods: SSO with Google and Okta, In-app onboarding checklist, Dark mode and 2 more. That gap is worth a look before you commit.", "clip_note": ""}
req = urllib.request.Request(BASE + "/run-stream", method="POST", data=json.dumps(rin).encode(),
headers={"Content-Type": "application/json", "Authorization": "Bearer " + TOKEN,
"Idempotency-Key": "rice-ice-calculator:recommend:" + hashlib.sha256(json.dumps(rin).encode()).hexdigest()[:16] + ":a1"})
with urllib.request.urlopen(req) as r:
for line in r:
line = line.decode().strip()
if line.startswith("data:"):
print(line[5:].strip()[:200])const rin = JSON.parse(readFileSync("input.json", "utf8"));
const r = await fetch(BASE + "/run-stream", { method: "POST", body: JSON.stringify(rin), headers: {
"Content-Type": "application/json", Authorization: "Bearer " + TOKEN,
"Idempotency-Key": `rice-ice-calculator:recommend:${createHash("sha256").update(JSON.stringify(rin)).digest("hex").slice(0, 16)}:a1` } });
const dec = new TextDecoder();
for await (const chunk of r.body) for (const line of dec.decode(chunk).split("\n"))
if (line.startsWith("data:")) console.log(line.slice(5).trim().slice(0, 200));rraw, _ := os.ReadFile("input.json") // add "bufio", "strings" to the imports
rs := sha256.Sum256(rraw)
req, _ := http.NewRequest("POST", base+"/run-stream", bytes.NewReader(rraw))
req.Header.Set("Content-Type", "application/json")
req.Header.Set("Authorization", "Bearer "+token)
req.Header.Set("Idempotency-Key", "rice-ice-calculator:recommend:"+hex.EncodeToString(rs[:8])+":a1")
res, _ := http.DefaultClient.Do(req)
sc := bufio.NewScanner(res.Body)
for sc.Scan() { if l := sc.Text(); strings.HasPrefix(l, "data:") { fmt.Println(l[5:]) } }String rin = java.nio.file.Files.readString(java.nio.file.Path.of("input.json"));
var rd = java.security.MessageDigest.getInstance("SHA-256").digest(rin.getBytes());
var sreq = HttpRequest.newBuilder(URI.create(BASE + "/run-stream")).header("Content-Type", "application/json")
.header("Authorization", "Bearer " + token).header("Idempotency-Key", "rice-ice-calculator:recommend:" + HexFormat.of().formatHex(rd, 0, 8) + ":a1")
.POST(HttpRequest.BodyPublishers.ofString(rin)).build();
C.send(sreq, HttpResponse.BodyHandlers.ofLines()).body().filter(l -> l.startsWith("data:")).forEach(System.out::println);rin = File.read("input.json")
uri = URI(BASE + "/run-stream")
req = Net::HTTP::Post.new(uri, "Content-Type" => "application/json", "Authorization" => "Bearer #{TOKEN}",
"Idempotency-Key" => "rice-ice-calculator:recommend:#{Digest::SHA256.hexdigest(rin)[0, 16]}:a1")
req.body = rin
Net::HTTP.start(uri.host, uri.port, use_ssl: true) do |h|
h.request(req) { |res| res.read_body { |chunk| chunk.each_line { |l| puts l if l.start_with?("data:") } } }
end$rin = file_get_contents("input.json");
$ch = curl_init(BASE . "/run-stream");
curl_setopt_array($ch, [CURLOPT_POST => true, CURLOPT_POSTFIELDS => $rin, CURLOPT_HTTPHEADER => [
"Content-Type: application/json", "Authorization: Bearer $TOKEN",
"Idempotency-Key: rice-ice-calculator:recommend:" . substr(hash("sha256", $rin), 0, 16) . ":a1"],
CURLOPT_WRITEFUNCTION => function ($ch, $chunk) { foreach (explode("\n", $chunk) as $l) if (str_starts_with($l, "data:")) echo $l, "\n"; return strlen($chunk); }]);
curl_exec($ch);var rin = File.ReadAllText("input.json");
var rd = System.Security.Cryptography.SHA256.HashData(System.Text.Encoding.UTF8.GetBytes(rin));
var sreq = new HttpRequestMessage(HttpMethod.Post, Api.Base + "/run-stream") { Content = new StringContent(rin, System.Text.Encoding.UTF8, "application/json") };
sreq.Headers.Add("Authorization", "Bearer " + Api.Token);
sreq.Headers.Add("Idempotency-Key", $"rice-ice-calculator:recommend:{Convert.ToHexString(rd, 0, 8).ToLowerInvariant()}:a1");
using var http = new HttpClient();
using var res = await http.SendAsync(sreq, HttpCompletionOption.ResponseHeadersRead);
using var rdr = new StreamReader(await res.Content.ReadAsStreamAsync());
for (string? l; (l = await rdr.ReadLineAsync()) != null;) if (l.StartsWith("data:")) Console.WriteLine(l);