CloudPC.live — Decision API
Jev / SystemOne-compatible decision endpoint

Get decisions, not text, from your own code

A decision model reads a state (text, JSON or images) and answers named, typed questions — yes/no, pick-one, or a score — with a calibrated probability for every option, in one forward pass. No text is generated, so answers come back in milliseconds and there is nothing to parse.

Overview

Your instance's Base URL is the same link you use to open Decision Studio. The API is the one Decision Studio itself calls.

Base URLBASE_URL
AuthAuthorization: Bearer YOUR_SHARE_PASSWORD — see Authentication
EndpointsPOST /v1/systemone, POST /v1/systemone/batch, GET /api/info
ModelCloudflare Clef 27B on an RTX 6000 GPU: text decisions in about 0.2 s; accepts images as well as text
Compatible withThe Jev / SystemOne request and response body, so existing clients only change the URL and key

1 Authentication

Use your instance's Share Access Password (Instance Configuration on CloudPC.live) as a bearer token on every request.

curl -s "BASE_URL/api/info" \
  -H "Authorization: Bearer YOUR_SHARE_PASSWORD"
# {"model": "Cloudflare/clef", "name": "Cloudflare Clef 27B", "hardware": "RTX 6000", "vision": true, ...}
Regenerating the Share Access Password in Instance Configuration invalidates the old one within 10 minutes.

2 Make a decision

One state, any number of named questions (up to 32), one pass.

POST /v1/systemone
curl -s "BASE_URL/v1/systemone" \
  -H "Authorization: Bearer YOUR_SHARE_PASSWORD" \
  -H "Content-Type: application/json" \
  -d '{
    "state": "I was charged twice this month, please refund one of them.",
    "questions": {
      "refund":  {"type": "noul", "instructions": "Is the customer asking for a refund?"},
      "team":    {"type": "choice", "instructions": "Which team should handle this?",
                  "criteria": {"billing": "Charges, refunds, invoices",
                               "technical": "App or site faults",
                               "fraud": "Suspected unauthorised use"}},
      "urgency": {"type": "score", "instructions": "How urgent is this?",
                  "criteria": ["Can wait", "Today", "Blocking the customer now"]}
    }
  }'
import requests

BASE = "BASE_URL"
H = {"Authorization": "Bearer YOUR_SHARE_PASSWORD"}

r = requests.post(f"{BASE}/v1/systemone", headers=H, timeout=60, json={
    "state": "I was charged twice this month, please refund one of them.",
    "questions": {
        "refund": {"type": "noul", "instructions": "Is the customer asking for a refund?"},
        "team": {"type": "choice", "instructions": "Which team should handle this?",
                 "criteria": {"billing": "Charges, refunds, invoices",
                              "technical": "App or site faults",
                              "fraud": "Suspected unauthorised use"}},
    },
})
r.raise_for_status()
ans = r.json()["answers"]
if ans["refund"]["noul"] > 0.8:
    print("route to", ans["team"]["choice"], ans["team"]["confidence"])
const resp = await fetch("BASE_URL/v1/systemone", {
  method: "POST",
  headers: { "Authorization": "Bearer " + process.env.CLOUDPC_SHARE_PASSWORD,
             "Content-Type": "application/json" },
  body: JSON.stringify({
    state: { ticket: "App crashes when I open settings", plan: "pro" },
    questions: { bug: { type: "noul", instructions: "Is this a software bug report?" } },
  }),
});
const { answers } = await resp.json();
console.log(answers.bug.noul);   // e.g. 0.97

Response

{
  "model": "Cloudflare/clef",
  "answers": {
    "refund":  {"noul": 0.98},
    "team":    {"choice": "billing", "confidence": 0.95,
                "probabilities": {"billing": 0.95, "technical": 0.02, "fraud": 0.03}},
    "urgency": {"score": 0.71, "confidence": 0.62, "legend": {"0": "Can wait", "1": "Today", "2": "Blocking the customer now"},
                "probabilities": {"0": 0.34, "1": 0.62, "2": 0.04}}
  },
  "usage": {"input_tokens": 142, "output_tokens": 0},
  "latency_ms": 214.6
}
The numbers above are illustrative. latency_ms is the model time on your instance (a CloudPC addition; Jev/SystemOne clients ignore it).

3 Question types

typecriteriaanswer fields
noul (yes/no)optional {"true": "...", "false": "..."} to define each sidenoul = probability of yes
choice{option_id: description}, 2 or morechoice, confidence, probabilities
scorelist of 2–10 level descriptions, lowest firstscore (expected level, 0-based), confidence, probabilities, legend
instructions is optional (the question id is used when omitted), but clear instructions and option descriptions improve accuracy noticeably. Probabilities are calibrated: treat 0.5–0.8 as "send to a human or a stronger check".

4 Images

The model reads images, as data: URIs or public https:// URLs. The state can be null when the images are the whole state.

InstanceImages per requestDownscaled toTime per image
Cloudflare Clef 27B (RTX 6000)up to 81280pxabout 0.5–1 s
IMG=$(base64 -w0 receipt.jpg)
curl -s "BASE_URL/v1/systemone" \
  -H "Authorization: Bearer YOUR_SHARE_PASSWORD" \
  -H "Content-Type: application/json" \
  -d @- <<JSON
{
  "state": "Expense claim attachment.",
  "images": ["data:image/jpeg;base64,$IMG"],
  "questions": {
    "legible":  {"type": "noul", "instructions": "Is the total amount clearly legible?"},
    "category": {"type": "choice", "criteria": {"meals": "Meals", "travel": "Travel", "office": "Office supplies", "other": "Other"}}
  }
}
JSON

5 Batch

Send up to 100 requests in one call; responses come back in the same order. A failed item returns {"error": "..."} in its slot without failing the rest.

POST /v1/systemone/batch
curl -s "BASE_URL/v1/systemone/batch" \
  -H "Authorization: Bearer YOUR_SHARE_PASSWORD" \
  -H "Content-Type: application/json" \
  -d '{"requests": [
        {"state": "Where is my parcel? It was due Monday.", "questions": {"team": {"type": "choice", "criteria": {"shipping": "Delivery", "billing": "Payments", "technical": "App faults"}}}},
        {"state": "The app crashes when I open settings.",   "questions": {"team": {"type": "choice", "criteria": {"shipping": "Delivery", "billing": "Payments", "technical": "App faults"}}}}
      ]}'
# {"responses": [{"answers": {"team": {...}}, ...}, {"answers": {"team": {...}}, ...}]}
Rate limit: CloudPC's edge blocks an IP that sends more than ~1,000 requests a minute to instance URLs, for 10 minutes. Use the batch endpoint for bulk work instead of many single calls in parallel. For spreadsheets, Decision Studio's Batch (CSV) tab does this for you in the browser.

Notes & troubleshooting

401 {"error":"invalid password"} or "password required"

The bearer token is missing or isn't the instance's current Share Access Password. Copy it again from Instance Configuration.

Getting HTML back instead of JSON

A request without any auth to a non-API path returns the password page with a 200. Add the Authorization header.

400 errors

The message says what is wrong: a missing questions object, a choice with fewer than 2 options, a score outside 2–10 levels, more than 8 images, or an image URL that can't be fetched.

Your instance has to be running

If it's paused, requests fail or time out. Start it from CloudPC.live first. The instance needs about 2 minutes to load Clef after a start.

Medical and other high-stakes use

Decision models give probabilities, not diagnoses or final judgments. For clinical triage or similar workflows, route results to a qualified person and test on your own labelled examples first.