POST/v1/systemone

Create a SystemOne decision

The native SystemOne protocol, for decision models such as jev-latest and clef. Questions are a map keyed by your own ids, of type noul (yes, no or unknown), choice or score; answers come back under the same keys.

Buffered only, no streaming, no continuation, no Idempotency-Key replay. Images ride in assets as raw base64.

Authentication: Bearer API key in the Authorization header

Request body

  • modelstringrequired

    A SystemOne model slug.

  • stateanyrequired

    The situation to judge. Any JSON value (string, object or array).

  • questionsobjectrequired

    1 to 32 questions keyed by id. noul {instructions, criteria?: {true?, false?}}; choice {instructions, criteria: 2 to 64 named options}; score {instructions, criteria: 2 to 10 levels}.

  • assetsobject

    Images by reference: {type: image, format: png | jpg | jpeg, data_base64}. Up to 16 MiB each, 32 MiB total.

Responses

  • 200

    Answers keyed by question id.

    Response
    • idstring
    • modelstring
    • answersobject
    • usageobject

      Experiential fields added to the provider's usage object.

      usage
      • costnumber

        USD actually charged to your credits for this request, as a float (promotions and plan discounts already applied). 0 on your own provider key.

      • is_byokboolean

        True when the request ran on your own provider key, which the platform never charges.

      • cost_detailsobject

        Present only in two cases: upstream_inference_cost (USD, your own key: the provider's list charge to you) or list_cost (USD, a platform-funded call charged below list: what it would have cost).

        cost_details
        • upstream_inference_costnumber
        • list_costnumber
    • providerstring
  • 400

    Invalid request. param names the field; code says why (invalid_parameter, unsupported_parameter, unsupported_capability, refusal, previous_response_not_found). Not charged.

    Response
    • errorobject
      error
      • messagestring

        What went wrong and how to fix it.

      • typestring

        For example invalid_request_error, authentication_error, permission_error, rate_limit_error, insufficient_quota, api_error.

      • codestring

        The stable error code.

      • paramstring | null

        The request field at fault, when there is one.

      • refusal_reasonenum

        Present only on code: refusal.

        "cyber_policy""cbrn""content_policy""recitation""data_inspection""unspecified"
  • 401

    The key is missing, malformed, expired or revoked.

    Response
    • errorobject
      error
      • messagestring

        What went wrong and how to fix it.

      • typestring

        For example invalid_request_error, authentication_error, permission_error, rate_limit_error, insufficient_quota, api_error.

      • codestring

        The stable error code.

      • paramstring | null

        The request field at fault, when there is one.

      • refusal_reasonenum

        Present only on code: refusal.

        "cyber_policy""cbrn""content_policy""recitation""data_inspection""unspecified"
  • 402

    The organization must act first: card_required, email_unverified, org_under_review, free_tier_requires_payment or promotion_ended. The message names the step; retrying does not help.

    Response
    • errorobject
      error
      • messagestring

        What went wrong and how to fix it.

      • typestring

        For example invalid_request_error, authentication_error, permission_error, rate_limit_error, insufficient_quota, api_error.

      • codestring

        The stable error code.

      • paramstring | null

        The request field at fault, when there is one.

      • refusal_reasonenum

        Present only on code: refusal.

        "cyber_policy""cbrn""content_policy""recitation""data_inspection""unspecified"
  • 429

    insufficient_quota (out of credits, over a spend limit, or the model needs a purchase) and promo_credits_now (a free promotion is used up): add credits, the message names the step. rate_limit_exceeded, free_limit_reached, admission_capacity_exceeded: wait Retry-After seconds and retry.

    Response
    • errorobject
      error
      • messagestring

        What went wrong and how to fix it.

      • typestring

        For example invalid_request_error, authentication_error, permission_error, rate_limit_error, insufficient_quota, api_error.

      • codestring

        The stable error code.

      • paramstring | null

        The request field at fault, when there is one.

      • refusal_reasonenum

        Present only on code: refusal.

        "cyber_policy""cbrn""content_policy""recitation""data_inspection""unspecified"

Request

curl https://api.experientiallabs.ai/v1/systemone \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "jev-latest",
    "state": "Customer: I was charged twice for my October invoice.",
    "questions": {
      "refund": {"type": "noul", "instructions": "Does the customer want a refund?"},
      "team": {"type": "choice", "instructions": "Which team should handle this?",
               "criteria": {"billing": "Payments and invoices", "support": "Everything else"}}
    }
  }'

Response

{
  "id": "decision_7f3a9c1e5b2d4086a4e9c1f7b3d5a28e",
  "model": "jev-latest",
  "answers": {
    "refund": {
      "type": "noul",
      "noul": "true"
    },
    "team": {
      "type": "choice",
      "choice": "billing",
      "confidence": 0.94,
      "probabilities": {
        "billing": 0.94,
        "support": 0.06
      }
    }
  },
  "usage": {
    "input_tokens": 74,
    "output_tokens": 6,
    "cost": 0.0000412,
    "is_byok": false
  },
  "provider": "typesafe"
}

https://api.experientiallabs.ai/v1/systemone