Project lab
App intake moderation (conceptual)
Sort new submissions as they arrive. Only auto-accept when confidence is high enough.
curl
bash
curl -X POST https://api.typesafe.ai/v1/systemone \
-H "Authorization: Bearer $TYPESAFE_API_KEY" \
-H "Content-Type: application/json" \
-d @- <<'EOF'
{
"state": {
"app_name": "Sample Tracker",
"description": "Tracks daily habits. No payments. Free."
},
"model": "jev-latest",
"questions": {
"category": {
"type": "choice",
"instructions": "App category for intake",
"criteria": {
"productivity": "Tools for work or habits",
"social": "Messaging or communities",
"commerce": "Payments or storefronts",
"other": "Other"
}
},
"policy_risk": {
"type": "score",
"instructions": "How much policy review does this need?",
"criteria": ["Low — clear and ordinary", "Medium — needs a glance", "High — escalate"]
}
}
}
EOFJavaScript
js
const key = process.env.TYPESAFE_API_KEY;
if (!key) throw new Error("TYPESAFE_API_KEY is not set");
const res = await fetch("https://api.typesafe.ai/v1/systemone", {
method: "POST",
headers: {
Authorization: `Bearer ${key}`,
"Content-Type": "application/json",
},
body: JSON.stringify({
state: {
app_name: "Sample Tracker",
description: "Tracks daily habits. No payments. Free.",
},
model: "jev-latest",
questions: {
category: {
type: "choice",
instructions: "App category for intake",
criteria: {
productivity: "Tools for work or habits",
social: "Messaging or communities",
commerce: "Payments or storefronts",
other: "Other",
},
},
policy_risk: {
type: "score",
instructions: "How much policy review does this need?",
criteria: [
"Low — clear and ordinary",
"Medium — needs a glance",
"High — escalate",
],
},
},
}),
});
if (!res.ok) throw new Error(`HTTP ${res.status}`);
const { answers } = await res.json();
const risk = answers.policy_risk.score;
const conf = answers.category.confidence;
if (risk >= 1.5 || conf < 0.6) console.log("queue_review", answers);
else console.log("auto_route", answers.category.choice);Notes
- This is a concept lab. It is not connected to any production intake system.
- Use Score and Choice confidence together before you auto-accept anything.