AGTCloud API Docs
GuidesAPI ReferenceIntegrations and resourcesUpdate and help
Structured Decisions

TypeSafe Decisions

Evaluate shared input for judgments, classification, scoring, tool selection and image localization.

Provide a shared state and named questions to receive structured answers synchronously. Both endpoints use the same requests and responses and do not support streaming. Replace MODEL_ID with an available decision model ID.

POST/v1/decisions
POST/v1/systemone

Authorization

bearerAuth
AuthorizationBearer <token>

Use an API Key issued by the current site.

In: header

Header Parameters

TypeSafe-Danger-Zone-Images?"true"

Set to true for image or Box requests; omit for plain text requests.

Value in

  • "true"
TypeSafe-Danger-Zone-Long-Context?"true"

Set to true when a longer context is needed; omitted by default. See the selected model's documentation for context limits.

Value in

  • "true"

Request Body

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

Question types and reading results

TypeReturned content and how to read it
noul · Judgmentnoul is the probability that the condition holds, from 0–1; set a threshold for your business needs
choice · Classification or tool selectionRead choice for the option name, probabilities for each option's probability, and confidence for distribution certainty
score · Scoringcriteria is numbered from 0; score is probability-weighted, can be fractional, and ranges from 0 to the number of levels minus 1; legend contains the original level descriptions
box · Image localizationRead box.top/bottom/left/right; coordinates are normalized to 0–1 relative to image height and width; confidence may be null

answers uses the question IDs from the request. For example, for question ID ticket, read answers.ticket. A request can mix question types, all sharing one state. IDs only associate questions with answers; put the complete rules in instructions.

confidence is not business accuracy. Tool selection returns an action name for your application to execute; this request does not execute tools. Scoring usually uses at least two levels to give higher and lower results a clear meaning.

Image input rules

ConfigurationUsage
assets and referencesRegister each image once and reference it in string values in state, instructions or criteria. Use unique strings; object keys are not replaced with images, and unused assets are rejected
JSON Base64Set data_base64 and format: png/jpg/jpeg; omit the data: prefix, line breaks and whitespace
MultipartSend the request JSON part first, followed by image files. In assets, part must match file part names. When both part and Base64 are provided, part takes precedence
Image switchAdd TypeSafe-Danger-Zone-Images: true for image or Box requests; omit for plain text requests
Image limitsStatic PNG/JPEG, at most 16 MiB per image; width and height must each be 280–1568 pixels. Resize oversized images locally first; automatic resizing is not performed
Request sizeThe request body, all processed images, and the request after reference expansion are each limited to 32 MiB. Repeated references to one image count repeatedly toward the expanded size

Box locates one specified target. If the target may be absent, add a Noul question in the same request to confirm its presence before using the coordinates.

Token usage

usage.input_tokens and usage.output_tokens report input and output Tokens. Images, question instructions and option descriptions also count toward input usage. For current model prices, see the Model Marketplace.

TypeSafe System One official documentationSee the upstream protocol definitions and latest field changes.