docs

/v1/decisions

POST /v1/decisions, the OpenAI-style route, generated from the backend OpenAPI contract.

POST /v1/decisions returns the same decisions as System One in the shape of OpenAI's Decisions API. Use it if your code already calls client.decisions.create in an OpenAI SDK. It maps one-to-one onto the same internal request as System One.

curl https://api.sieve.one/v1/decisions \
  -H "Authorization: Bearer $TYPESAFE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "sieve-latest",
    "input": "I was charged twice for my subscription this month. Please refund the extra charge.",
    "questions": [
      { "name": "billing", "type": "predicate", "instructions": "This message is about billing." },
      {
        "name": "tone",
        "type": "choice",
        "instructions": "What is the tone of this message?",
        "choices": [
          { "value": "angry", "description": "An upset or hostile message" },
          { "value": "calm", "description": "A neutral or polite message" }
        ]
      },
      {
        "name": "urgency",
        "type": "score",
        "instructions": "How urgent is this message?",
        "levels": [
          { "label": "low", "description": "Can wait" },
          { "label": "medium", "description": "Needs attention this week" },
          { "label": "high", "description": "Needs attention today" }
        ]
      }
    ]
  }'

How it differs from System One

System One/v1/decisions
Statestateinput (a string, or user messages)
QuestionsMap keyed by nameOrdered list; optional unique name
Yes/nonoulpredicate
Choice optionscriteria mapchoices: list of value and description
Number of options1 to 2552 to 255, unique values
Score levelscriteria listlevels: list of label and description (2 to 10, unique labels)
Questions per requestToken limits only1 to 400
AnswersKeyed by nameSame order as the questions
Question over the per-question token limitWhole request fails (400)That question comes back as {"name": ..., "type": "refusal"}; the others are answered
Malformed questionWhole request fails (422)Whole request fails (400)
Errorsdetail shape, 422 for validationOpenAI error shape, 400 for validation
Overload529503
box400 until a vision model ships400 (not a question type here)
Streamingn/astream: true is a 400 unsupported_parameter

Decisions are not generative, so parameters such as max_tokens and temperature are refused with wrong_model_type. Only user messages are accepted. Images must be data: URLs (the gateway never fetches a URL). prompt_cache_key, prompt_cache_options and safety_identifier are accepted and ignored.

Sieve extras

Send Sieve-Extras: true to add a top-level sieve object with model_version, answered_by (model per question name), temperature (per question name), escalated, state_tokens and latency_ms. The same header works on System One.

Full schema