systemone

Answer typed questions about a state

Changed on

Send a state and named questions of three types: noul (yes/no), choice (one of a set) and score (ordered levels). Every answer is a probability distribution your code can branch on, with a confidence. No text is generated. Batch every question about one state into one call.

post/v1/systemone

Request

  • Base URL
    https://api.morphllm.com
  • Auth
    HTTP bearer

Request body

modelstring required

reflex.

imagesstring[]

Inline base64 data URLs: data:image/png;base64,..., data:image/jpeg;base64,... or data:image/webp;base64,... . At most 16 images total across the request, up to 8 MB (8,000,000 decoded bytes) each. Remote URLs are not fetched. Images are billed as expanded input tokens.

questionsobject required

Named questions, asked in this order. The answer for each comes back under the same name.

instructionsstring

Optional context placed ahead of the questions.

Example request

{
  "model": "reflex",
  "state": "Hi, I've been trying to connect my Stripe account for 3 days and it keeps failing. I'm losing sales. Please help ASAP.",
  "questions": {
    "department": {
      "type": "choice",
      "instructions": "Which team should handle this?",
      "criteria": {
        "billing": "Payment or subscription issues",
        "technical": "Bugs or integration problems",
        "sales": "Pricing or account questions"
      }
    },
    "frustration": {
      "type": "score",
      "instructions": "How frustrated does the customer appear?",
      "criteria": [
        "Calm, just stating facts",
        "Frustrated but civil",
        "Very angry, strong language"
      ]
    },
    "is_urgent": {
      "type": "noul",
      "instructions": "The message conveys urgency or time sensitivity."
    }
  }
}

Response

One answer per question.

idstring

Decision id, when returned.

object'structured_decision'
createdinteger

Unix seconds, when returned.

modelstring required

The model that answered.

answersobject required

One answer per question, under the name you gave it.

diagnosticsobject

When returned: per question, how much of the model's probability landed on the options.

Example response

{
  "id": "dec-6f1c0b9e2a7d4c3e",
  "object": "structured_decision",
  "created": 1793577600,
  "model": "reflex",
  "answers": {
    "department": {
      "type": "choice",
      "choice": "technical",
      "probabilities": {
        "billing": 0.21,
        "technical": 0.78,
        "sales": 0.01
      },
      "confidence": 0.77
    },
    "frustration": {
      "type": "score",
      "score": 1.3,
      "legend": {
        "0": "Calm, just stating facts",
        "1": "Frustrated but civil",
        "2": "Very angry, strong language"
      },
      "probabilities": {
        "0": 0,
        "1": 0.7,
        "2": 0.3
      },
      "confidence": 0.69
    },
    "is_urgent": {
      "type": "noul",
      "noul": 0.97,
      "probabilities": {
        "yes": 0.97,
        "no": 0.03
      },
      "confidence": 0.96
    }
  },
  "usage": {
    "input_tokens": 312,
    "output_tokens": 0,
    "input_tokens_details": {
      "cached_tokens": 256
    }
  },
  "diagnostics": {
    "department": {
      "label_mass": 0.99,
      "argmax_is_label": true
    },
    "frustration": {
      "label_mass": 0.99,
      "argmax_is_label": true
    },
    "is_urgent": {
      "label_mass": 0.99,
      "argmax_is_label": true
    }
  }
}

Changes

    • breaking

      the response property became optional for the status

    • breaking

      the response property became optional for the status

    • breaking

      the response property became optional for the status

    • breaking

      the response property became optional for the status

    • info

      added the new optional request property

    • info

      endpoint added