Skip to main content
Docs

One endpoint,
every model.

Tare is an OpenAI-compatible gateway in front of every model you use — ours and the ones you bring yourself. One base URL, one key, and every token accounted for.

GuidesDecisions

Decisions

What this covers: sending a text and a few questions and getting back the probability of each answer. Suited to intent detection, ticket routing and content screening, where the answer is one of a few options and no written reply is needed.

Compared with chat

POST /v1/decisionsPOST /v1/chat/completions
ReplyA probability for each answer to each questionGenerated text
One requestOne text, up to 64 questionsOne conversation
BillingInput tokens onlyInput + output tokens
StreamingNoYes

Requests and replies use the same format as TypeSafe Jev and OpenRouter Decisions. POST /v1/systemone is the same endpoint under the path name Jev and Microsoft Foundry use: code written for the Jev SDK works after changing the base URL to https://tare.jamerly.ai.

Models

ModelLanguagesPrice
microsoft/microsoft-decision-1Chinese, EnglishInput $0.045 / M tokens, output free

Request

Code / Terminal
curl https://tare.jamerly.ai/v1/decisions \
  -H "Authorization: Bearer $TARE_API_KEY" \
  -H "Content-Type: application/json" \
  -d @request.json

request.json:

Code / Terminal
{
  "model": "microsoft/microsoft-decision-1",
  "state": "The box arrived empty. This is the second time!",
  "questions": {
    "complaint": {"type": "noul", "instructions": "Is the customer complaining?"},
    "team": {
      "type": "choice",
      "instructions": "Which team should handle this message?",
      "criteria": {"billing": "payments, charges, refunds", "shipping": "deliveries, missing items", "product": "quality, taste"}
    },
    "anger": {"type": "score", "instructions": "How angry is the customer?", "criteria": ["calm", "annoyed", "angry", "furious"]}
  }
}
FieldDescription
modelRequired
stateRequired. The text the questions are about; may also be a JSON object or array, and every string in it is read
questionsRequired. Named questions, up to 64. answers in the reply uses the same names
questions.*.typenoul (yes/no), choice (one of several options), score (a level on a scale)
questions.*.instructionsThe question itself
questions.*.criteriachoice: option name → description (may be an empty string), at least two. score: levels from lowest to highest, at least two

Reply

Code / Terminal
{
  "id": "gen-7f3c1a9e2b4d4c6f8a0e1b2c3d4e5f60",
  "model": "microsoft/microsoft-decision-1",
  "answers": {
    "complaint": {"type": "noul", "noul": 0.999},
    "team": {
      "type": "choice", "choice": "shipping", "confidence": 0.99,
      "probabilities": {"billing": 0.001, "shipping": 0.994, "product": 0.005}
    },
    "anger": {
      "type": "score", "score": 2.07, "confidence": 0.87,
      "legend": {"0": "calm", "1": "annoyed", "2": "angry", "3": "furious"},
      "probabilities": {"0": 0.0004, "1": 0.016, "2": 0.93, "3": 0.05}
    }
  },
  "usage": {"input_tokens": 98, "output_tokens": 3, "cost": 0.00000441}
}
FieldDescription
noulP(yes), from 0 to 1
choiceThe most probable option
scoreThe expected level, counted from 0; legend maps each index to its level name
probabilitieschoice / score: the probability of each option (level), summing to 1
confidencechoice / score: 0 means no better than an even spread, 1 means certain
usage.costWhat this call was charged (USD)
idThe call's id, the same as the X-Generation-Id response header

Getting good answers

  • Put the rule in the question. For example: "Our policy is to resend missing items within 30 days. Should this customer get a replacement?" Asked only "Should they get a replacement?", the model can only guess from common sense.
  • Do calculations in your own code. Date comparisons, sums and scoring belong in code; put the result into the question.
  • Send low-confidence answers to a person. Set the threshold from your own data: run a hundred or two labelled real messages and find the line above which accuracy is good enough.
  • Ask all questions about one text in one request. One question and six questions take about the same time.

Other differences from chat

  • No models fallback chain and no provider routing preferences. Routing and failover follow the rules configured in the console.
  • No streaming; stream: true returns 400.
  • DLP applies as usual: state and the question texts are scanned.

Errors

StatusWhen
400model / state / questions missing, an unknown question type, fewer than two options, or blocked by DLP
401No key, or an invalid key
403The key is disabled, expired or out of credit; the account is overdrawn; the monthly budget is used up
404No route is configured for this model
503The upstream is temporarily unavailable; retry shortly

The error body format is described in Errors.

Docs last updated Nov 27, 2026, 12:56 (UTC+8)