Jev Academy

Project lab

Fit Desk check-in judgment (conceptual)

Read a short check-in message. Judge whether the person is sticking with the plan. Example theme only. This maps to Fit Desk as an example. It is not a live integration.

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": {
    "plan": "Stand 30 minutes before noon; stretch twice.",
    "checkin": "Stood for about 20 min, skipped stretches — rushed morning."
  },
  "model": "jev-latest",
  "questions": {
    "adhered": {
      "type": "noul",
      "instructions": "Did the person substantially follow today's plan?"
    },
    "effort": {
      "type": "score",
      "instructions": "How much effort does the check-in show?",
      "criteria": ["Minimal", "Partial", "Strong"]
    }
  }
}
EOF

JavaScript

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: {
      plan: "Stand 30 minutes before noon; stretch twice.",
      checkin: "Stood for about 20 min, skipped stretches — rushed morning.",
    },
    model: "jev-latest",
    questions: {
      adhered: {
        type: "noul",
        instructions: "Did the person substantially follow today's plan?",
      },
      effort: {
        type: "score",
        instructions: "How much effort does the check-in show?",
        criteria: ["Minimal", "Partial", "Strong"],
      },
    },
  }),
});

if (!res.ok) throw new Error(`HTTP ${res.status}`);
const { answers } = await res.json();
console.log({
  adhered: answers.adhered.noul,
  effort: answers.effort.score,
  effortConfidence: answers.effort.confidence,
});

Notes

  • This is a concept example. It shows how to map a gallery idea onto a project, Fit Desk style.
  • Keep the check-in text in state. Then decide coaching actions in your code.

Sources

← All labsBrowse use cases →