TypeSafe System One

MethodPathUse
POST/v1/systemoneAnswer typed questions (yes/no probability, single choice, score) about one piece of content and return structured answers

Both the request and the response follow TypeSafe's official System One API. A client written against the official docs only needs its base URL changed to https://api.modelgo.ai and a ModelGo API key. model is the platform logical model name; whether a model offers this endpoint follows the protocols shown in the model marketplace (TypeSafe System One), otherwise the gateway answers 400 model_protocol_not_offered. The endpoint is synchronous, generates no text, and does not stream.

bash
curl https://api.modelgo.ai/v1/systemone \
  -H "Authorization: Bearer $MODELGO_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "<model>",
    "state": "I was charged twice for my subscription this month. Please refund the extra charge.",
    "questions": {
      "billing": {
        "type": "noul",
        "instructions": "Is this message about billing?"
      },
      "tone": {
        "type": "choice",
        "instructions": "What is the tone of this message?",
        "criteria": {
          "angry": "An upset or hostile message",
          "calm": "A neutral or polite message",
          "excited": "An enthusiastic or eager message"
        }
      },
      "urgency": {
        "type": "score",
        "instructions": "How urgent is this message?",
        "criteria": ["Can wait", "Needs attention this week", "Needs attention today"]
      }
    }
  }'

Request

FieldTypeRequiredNotes
modelstringYesPlatform logical model name
statestring / object / arrayYesThe content every question refers to
questionsobjectYesQuestion name → question, at least one; each name becomes a key in answers

Every question needs a type and an instructions (string, object, or array) describing what to judge. The official API lets you omit instructions, but the provider currently serving this platform requires it and answers 400 without it:

typeMeaningcriteriaAnswer fields
noulYes / noOptional, {"true": …, "false": …}noul: probability of "yes" (0–1)
choicePick oneRequired, choice name → description, 1–255 entrieschoice, confidence, probabilities
scoreOrdered ratingRequired, an array of 1–10 level descriptions; the index is the score (starting at 0)score (weighted expected value, may be fractional), confidence, legend, probabilities

Response

json
{
  "model": "<model>",
  "answers": {
    "billing": { "type": "noul", "noul": 0.98 },
    "tone": {
      "type": "choice",
      "choice": "calm",
      "confidence": 0.7,
      "probabilities": { "angry": 0.15, "calm": 0.8, "excited": 0.05 }
    },
    "urgency": {
      "type": "score",
      "score": 1.7,
      "confidence": 0.55,
      "legend": { "0": "Can wait", "1": "Needs attention this week", "2": "Needs attention today" },
      "probabilities": { "0": 0.1, "1": 0.1, "2": 0.8 }
    }
  },
  "usage": { "input_tokens": 277, "output_tokens": 20 }
}
  • model echoes the logical model name you sent.
  • Billing uses the token counts in usage; unit prices are in the console's model list.
  • A missing model or state, or an empty questions, is refused with 400 before any upstream call; question fields are validated by the model and an invalid one also returns a 4xx. Errors use the platform's unified error format (not the official detail shape); see Errors & Rate Limits.
  • A stream field in the request is ignored; the full JSON answer is always returned synchronously.

Not supported yet

  • Image assets, box questions, and anything else that needs a TypeSafe-Danger-Zone-* request header (including long context);
  • multipart/form-data request bodies — the body must be JSON.