Decision Models
TypeScript SDK reference for decision models: methods create, decide, delete, get, list, update.
Decision-model registration and typed evaluation.
Methods on this page are called through client.decision_models.
client.decision_models.create
client.decision_models.create(request: CreateDecisionModelRequest, requestOptions?: RequestOptions): Promise<DecisionModelResponseShape>Saves the connection settings for a decision model. Requires CREATE_DECISION_MODEL for the new model and its owner. You can register the same provider connection more than once, but each registration must have a unique UUID. Credentials are omitted from the response.
HTTP: POST /v1/decision-models
Parameters
| Parameter | Type | Description |
|---|---|---|
request | CreateDecisionModelRequest | Request body. |
requestOptions | RequestOptions optional | Per-call signal, timeout, or headers. |
Returns: Promise<DecisionModelResponseShape>
Example
const model = await client.decisionModels.create({
displayName: "Doc decision model", providerType: "LAYA",
endpointUrl: "http://localhost:8000", modelIdentifier: "laya",
monitoringEndpoint: "http://localhost:8000/health",
});client.decision_models.decide
client.decision_models.decide(id: string, request: DecisionRequest, requestOptions?: RequestOptions): Promise<DecisionResponseShape>Sends the supplied questions and content to the registered provider. Requires READ_DECISION_MODEL and EXECUTE_DECISION_MODEL. Each request calls the provider once and may incur charges, so do not retry automatically. GoodMem does not store the input or answers. Unsupported questions or media return 400. Problems with the stored provider credentials or settings return 412.
HTTP: POST /v1/decision-models/{id}/decide
Parameters
| Parameter | Type | Description |
|---|---|---|
id | string | UUID of the decision model |
request | DecisionRequest | Request body. |
requestOptions | RequestOptions optional | Per-call signal, timeout, or headers. |
Returns: Promise<DecisionResponseShape>
Example
const result = await client.decisionModels.decide(model.decisionModelId, {
state: { text: "The account has been verified." },
questions: { verified: {
instructions: { text: "Is the account verified?" },
noul: {},
} },
});
console.log(result.answers.verified.noul?.probabilityTrue);client.decision_models.delete
client.decision_models.delete(id: string, requestOptions?: RequestOptions): Promise<void>Removes the decision model from GoodMem. Requires DELETE_DECISION_MODEL. This does not contact or delete the model at the provider. Returns 404 if the registration has already been deleted.
HTTP: DELETE /v1/decision-models/{id}
Parameters
| Parameter | Type | Description |
|---|---|---|
id | string | UUID of the decision model |
requestOptions | RequestOptions optional | Per-call signal, timeout, or headers. |
Returns: Promise<void>
Example
await client.decisionModels.delete(model.decisionModelId);client.decision_models.get
client.decision_models.get(id: string, options?: DecisionModelsGetOptions, requestOptions?: RequestOptions): Promise<DecisionModelResponseShape>Returns the connection settings and supported features of a decision model. Requires READ_DECISION_MODEL. Set includeCredentials=true to include stored credentials; this also requires READ_DECISION_MODEL_CREDENTIALS. Returns 404 if the model does not exist, or 403 if it exists but you lack permission.
HTTP: GET /v1/decision-models/{id}
Parameters
| Parameter | Type | Description |
|---|---|---|
id | string | UUID of the decision model |
options | DecisionModelsGetOptions optional | Optional query parameters. |
requestOptions | RequestOptions optional | Per-call signal, timeout, or headers. |
Returns: Promise<DecisionModelResponseShape>
Example
const fetched = await client.decisionModels.get(model.decisionModelId);client.decision_models.list
client.decision_models.list(options?: DecisionModelsListOptions, requestOptions?: RequestOptions): Promise<ListDecisionModelsResponseShape>Lists decision models that you have permission to read. Requires LIST_DECISION_MODEL for the instance and READ_DECISION_MODEL for each returned model. Results are ordered by creation time, newest first, with UUID descending to break ties. Credentials are omitted.
LABEL FILTERS: Label filters accept either label.<key>=<value> or label[key]=value (for example, label.environment=production or label[environment]=production).
HTTP: GET /v1/decision-models
Parameters
| Parameter | Type | Description |
|---|---|---|
options | DecisionModelsListOptions optional | Optional query parameters. |
requestOptions | RequestOptions optional | Per-call signal, timeout, or headers. |
Returns: Promise<ListDecisionModelsResponseShape>
Example
const page = await client.decisionModels.list({ providerType: "LAYA", pageSize: 20 });
console.log(page.totalCount, page.nextPageToken);client.decision_models.update
client.decision_models.update(id: string, request: UpdateDecisionModelRequest, requestOptions?: RequestOptions): Promise<DecisionModelResponseShape>Changes only the fields supplied in the request. Requires UPDATE_DECISION_MODEL. Send an empty string to clear description, version, or monitoringEndpoint. A supplied configuration replaces all existing settings; use {} to reset them to defaults. The provider and owner cannot be changed. Credentials are omitted from the response.
HTTP: PUT /v1/decision-models/{id}
Parameters
| Parameter | Type | Description |
|---|---|---|
id | string | UUID of the decision model |
request | UpdateDecisionModelRequest | Request body. |
requestOptions | RequestOptions optional | Per-call signal, timeout, or headers. |
Returns: Promise<DecisionModelResponseShape>
Example
await client.decisionModels.update(model.decisionModelId, { displayName: "Updated decision model" });Data Models
Enum Values
DecisionModelProviderType
JEV, LAYA, CLEF
Interfaces
CreateDecisionModelRequest
Connection settings for a new decision model.
| Field | Type | Required | Description |
|---|---|---|---|
displayName | string | yes | Name shown in the console and CLI. |
description | string | null | no | Optional description. |
providerType | DecisionModelProviderType | yes | Provider used by this model. This cannot be changed after creation. |
endpointUrl | string | yes | Base URL of the provider, starting with http:// or https://. Do not include a query string, fragment, or username and password. |
apiPath | string | null | no | Path appended to endpointUrl when sending a request. Jev and Laya use /v1/systemone if omitted. Clef requires the path for your account and model. |
modelIdentifier | string | yes | Model identifier accepted by the provider. |
credentials | EndpointAuthentication | null | no | API key for the provider, supplied in credentials.apiKey.inlineSecret with kind set to CREDENTIAL_KIND_API_KEY. May be omitted for Laya when the endpoint allows anonymous access. |
configuration | Record<string, unknown> | null | no | Provider settings. Supported keys are image_preview (Jev only), timeout_millis, and max_response_bytes. These settings cannot change which features the model supports. |
labels | Record<string, string> | null | no | Labels for filtering and organization. |
version | string | null | no | Optional version label. |
monitoringEndpoint | string | null | no | Optional URL for the provider health or metrics endpoint. Must start with http:// or https://. |
ownerId | string | null | no | UUID of the principal that will own the model. If omitted, the authenticated principal becomes the owner. |
decisionModelId | string | null | no | Optional UUID for the new model. GoodMem generates one if omitted. A UUID that is already in use returns 409; reusing connection settings is allowed. |
DecisionAnswer
Answer to one question. Exactly one of choice, score, noul, or box is present.
| Field | Type | Required | Description |
|---|---|---|---|
choice | DecisionChoiceAnswer | null | no | Selected option and the probability assigned to each option. |
score | DecisionScoreAnswer | null | no | Score and the probability assigned to each score level. |
noul | DecisionNoulAnswer | null | no | Probability that the statement is true. |
box | DecisionBoxAnswer | null | no | Normalized image coordinates. |
DecisionArray
Ordered decision content elements.
| Field | Type | Required | Description |
|---|---|---|---|
values | Array<DecisionContent> | yes | Ordered content elements. |
DecisionBoxAnswer
Rectangle with coordinates expressed as fractions of the image width or height. A returned box does not guarantee that the object is present.
| Field | Type | Required | Description |
|---|---|---|---|
left | number | yes | Left edge as a fraction of image width. |
top | number | yes | Top edge as a fraction of image height. |
right | number | yes | Right edge as a fraction of image width. |
bottom | number | yes | Bottom edge as a fraction of image height. |
confidence | number | null | no | Optional provider confidence. |
DecisionBoxQuestion
Locate an object in an image. Use instructions to describe the object.
No fields.
DecisionChoiceAnswer
Selected option and probability distribution.
| Field | Type | Required | Description |
|---|---|---|---|
choice | string | yes | Selected option identifier. |
probabilities | Record<string, number> | yes | Probability for every option. |
confidence | number | null | no | Confidence reported by the provider. This is not a calibrated probability that the answer is correct. |
confidenceMeaning | "ADJUSTED_TOP_PROBABILITY" | "NORMALIZED_ENTROPY_COMPLEMENT" | "TOP_PROBABILITY" | "ORDERED_MEAN_ABSOLUTE_DEVIATION" | "PROVIDER_DEFINED" | "NOT_REPORTED" | yes | Interpretation of confidence. |
DecisionChoiceQuestion
Choice options.
| Field | Type | Required | Description |
|---|---|---|---|
options | Record<string, DecisionContent> | yes | Option identifiers and descriptions. |
DecisionContent
Set exactly one of text, jsonValue, objectValue, arrayValue, or media. Use text for ordinary text. Use jsonValue to preserve a complete JSON value, including the exact precision of its numbers.
| Field | Type | Required | Description |
|---|---|---|---|
jsonValue | string | null | no | A complete JSON value encoded as a string. For example, {"jsonValue":"null"} represents JSON null. For ordinary text, use the text field. |
text | string | null | no | Ordinary text without JSON quoting. |
objectValue | DecisionObject | null | no | Object whose fields can contain nested media. |
arrayValue | DecisionArray | null | no | Ordered array whose elements can contain nested media. |
media | DecisionMedia | null | no | Media file included in the request. GoodMem does not download media from URLs. |
DecisionLimit
A known numeric limit.
| Field | Type | Required | Description |
|---|---|---|---|
type | "MAX_QUESTIONS" | "MIN_CHOICES" | "MAX_CHOICES" | "MIN_SCORE_LEVELS" | "MAX_SCORE_LEVELS" | "MAX_TOTAL_OPTIONS" | "MAX_STATE_CHARACTERS" | "MAX_BODY_BYTES" | "MAX_CONTENT_DEPTH" | "MAX_INPUT_TOKENS" | "MAX_QUESTION_ID_CHARACTERS" | "MAX_AUDIO_VIDEO_BYTES" | yes | Limit identifier. |
value | number | yes | Known limit value. |
DecisionMedia
Media file included in the request. The provider and model determine which formats and sizes are supported.
| Field | Type | Required | Description |
|---|---|---|---|
kind | "IMAGE" | "AUDIO" | "VIDEO" | yes | Media category. |
mimeType | string | yes | Declared MIME type. |
data | string | yes | Base64-encoded file bytes. |
DecisionMediaLimit
A known media limit.
| Field | Type | Required | Description |
|---|---|---|---|
type | "MAX_ITEMS" | "MAX_ITEM_BYTES" | "MAX_TOTAL_BYTES" | "MAX_PIXELS" | "MIN_WIDTH" | "MAX_WIDTH" | "MIN_HEIGHT" | "MAX_HEIGHT" | "MIN_PIXELS" | "MAX_DURATION_MILLIS" | yes | Media limit identifier. |
value | number | yes | Known limit value. |
DecisionMediaSupport
Media formats, placements and provider constraints.
| Field | Type | Required | Description |
|---|---|---|---|
kind | "IMAGE" | "AUDIO" | "VIDEO" | yes | Media category. |
mimeTypes | Array<string> | yes | Accepted MIME types. |
placements | Array<string> | yes | Allowed content positions. |
limits | Array<DecisionMediaLimit> | yes | Known limits for media. The provider checks dimensions and duration. |
DecisionModelCapabilities
Supported features and known limits for this provider and model. An omitted limit is unknown; it does not mean unlimited.
| Field | Type | Required | Description |
|---|---|---|---|
questionTypes | Array<string> | yes | Types of questions this model can answer. |
media | Array<DecisionMediaSupport> | yes | Supported media formats, placements and known limits. |
limits | Array<DecisionLimit> | yes | Known numeric limits. |
contextBoundLimits | Array<string> | yes | Limits that depend on the provider context window instead of a fixed count. |
semantics | Array<DecisionQuestionSemantics> | yes | Meaning of the answer and confidence value for each question type. |
inputOverflow | "REJECTS" | "TRUNCATES_STATE" | "TRUNCATES_STATE_AND_OPTIONS" | yes | What the provider does when the input exceeds its context window. |
DecisionModelResponse
Connection settings and supported features of a registered decision model.
| Field | Type | Required | Description |
|---|---|---|---|
decisionModelId | string | yes | UUID of the decision model. |
displayName | string | yes | Name shown in the console and CLI. |
description | string | null | no | Optional description. |
providerType | DecisionModelProviderType | yes | Provider used by this model. |
endpointUrl | string | yes | Provider base URL. |
apiPath | string | yes | Inference path appended to the base URL. |
modelIdentifier | string | yes | Configured model identifier. |
credentials | EndpointAuthentication | null | no | Stored credentials. Returned only by get when includeCredentials=true and you have READ_DECISION_MODEL_CREDENTIALS permission. |
configuration | Record<string, unknown> | yes | Settings used when calling the provider. These do not change which features the model supports. |
labels | Record<string, string> | yes | Labels for filtering and organization. |
version | string | null | no | Optional version label. |
monitoringEndpoint | string | null | no | Optional HTTP(S) health or metrics URL. |
ownerId | string | yes | UUID of the principal that owns this model. |
capabilities | DecisionModelCapabilities | yes | Supported questions and media, known limits, and the meaning of each answer type. |
createdAt | number | yes | Creation time in milliseconds since epoch. |
updatedAt | number | yes | Last update time in milliseconds since epoch. |
createdById | string | yes | UUID of the principal or API key that created this model. |
updatedById | string | yes | UUID of the principal or API key that last updated this model. |
DecisionNoulAnswer
Probability that the proposition is true.
| Field | Type | Required | Description |
|---|---|---|---|
probabilityTrue | number | yes | Probability that the statement is true. Your application decides what threshold to use. |
DecisionNoulQuestion
Optional true and false descriptions.
| Field | Type | Required | Description |
|---|---|---|---|
trueCriterion | DecisionContent | null | no | Description of the true outcome. |
falseCriterion | DecisionContent | null | no | Description of the false outcome. |
DecisionObject
Named decision content fields.
| Field | Type | Required | Description |
|---|---|---|---|
fields | Record<string, DecisionContent> | yes | Content keyed by field name. |
DecisionQuestion
Set exactly one of choice, score, noul, or box. Clef requires instructions for every question.
| Field | Type | Required | Description |
|---|---|---|---|
instructions | DecisionContent | null | no | Instructions for this question. Clef requires nonblank text, an object, or an array. Other providers allow omission; to supply JSON null, use {"jsonValue":"null"}. |
choice | DecisionChoiceQuestion | null | no | Choose one labeled option. |
score | DecisionScoreQuestion | null | no | Score the content against a list of levels ordered from lowest to highest. |
noul | DecisionNoulQuestion | null | no | Estimate the probability that a statement is true. |
box | DecisionBoxQuestion | null | no | Locate an object in an image. A returned box does not guarantee that the object is present. |
DecisionQuestionSemantics
Meaning of the answer and confidence value for one question type.
| Field | Type | Required | Description |
|---|---|---|---|
questionType | "CHOICE" | "SCORE" | "NOUL" | "BOX" | yes | Question type. |
confidence | "ADJUSTED_TOP_PROBABILITY" | "NORMALIZED_ENTROPY_COMPLEMENT" | "TOP_PROBABILITY" | "ORDERED_MEAN_ABSOLUTE_DEVIATION" | "PROVIDER_DEFINED" | "NOT_REPORTED" | yes | How to interpret the confidence value reported by the provider. |
output | "CANDIDATE_IDENTIFIER" | "EXPECTED_ZERO_BASED_LEVEL" | "PROBABILITY_TRUE" | "NORMALIZED_EDGES_NO_ABSENCE_SENTINEL" | yes | Meaning of the primary answer value. |
DecisionRequest
Sends named questions and content to a registered decision model. The provider may charge for this request.
| Field | Type | Required | Description |
|---|---|---|---|
state | DecisionContent | yes | Content evaluated by all questions. |
attachments | Array<DecisionMedia> | null | no | Media files included with the request. Their order is preserved within each media type. |
questions | Record<string, DecisionQuestion> | yes | Questions keyed by names that you choose. The model must support each question type and its media. |
DecisionResponse
Structured provider answers with reported usage.
| Field | Type | Required | Description |
|---|---|---|---|
model | string | yes | Provider-reported model identifier. |
answers | Record<string, DecisionAnswer> | yes | Answers keyed by the original question identifiers. |
usage | DecisionUsage | yes | Token counts reported by the provider. An omitted count is unknown; a count of 0 means the provider reported zero. |
DecisionScoreAnswer
Expected zero-based rubric level; not a percentage.
| Field | Type | Required | Description |
|---|---|---|---|
score | number | yes | Score on the scale defined by levels. The first level has value 0, and fractional values fall between levels. |
probabilities | Record<string, number> | yes | Probability assigned to each level, using its index starting at 0. |
levels | Array<DecisionContent> | yes | Original caller rubric, including structured content and media. |
confidence | number | null | no | Confidence reported by the provider. This is not a calibrated probability that the answer is correct. |
confidenceMeaning | "ADJUSTED_TOP_PROBABILITY" | "NORMALIZED_ENTROPY_COMPLEMENT" | "TOP_PROBABILITY" | "ORDERED_MEAN_ABSOLUTE_DEVIATION" | "PROVIDER_DEFINED" | "NOT_REPORTED" | yes | Interpretation of confidence. |
DecisionScoreQuestion
Ordered rubric levels.
| Field | Type | Required | Description |
|---|---|---|---|
levels | Array<DecisionContent> | yes | Descriptions of the score levels, ordered from lowest to highest. The first level has index 0. |
DecisionUsage
Token usage reported by the provider. Counts are omitted when unknown.
| Field | Type | Required | Description |
|---|---|---|---|
inputTokens | number | null | no | Reported input tokens. |
outputTokens | number | null | no | Reported output tokens. |
ListDecisionModelsResponse
One page of decision models that you have permission to read.
| Field | Type | Required | Description |
|---|---|---|---|
decisionModels | Array<DecisionModelResponse> | yes | Decision models ordered by creation time, newest first, with UUID descending to break ties. |
nextPageToken | string | null | no | Token to pass as pageToken in the next request. Omitted when there are no more results. |
totalCount | number | yes | Total number of models that match the filters and that you have permission to read, across all pages. |
UpdateDecisionModelRequest
Changes only the supplied fields. Omitted fields keep their current values. A supplied configuration replaces all existing provider settings.
| Field | Type | Required | Description |
|---|---|---|---|
displayName | string | null | no | Name shown in the console and CLI. |
description | string | null | no | Description of the model. Send an empty string to clear it, or omit it to keep the current value. |
endpointUrl | string | null | no | Base URL of the provider, starting with http:// or https://. Do not include a query string, fragment, or username and password. |
apiPath | string | null | no | Path appended to endpointUrl when sending a request. Omit it to keep the current path. An empty string resets Jev and Laya to /v1/systemone; Clef requires the path for your account and model. |
modelIdentifier | string | null | no | Model identifier accepted by the provider. |
credentials | EndpointAuthentication | null | no | Replacement API key for the provider, supplied in credentials.apiKey.inlineSecret with kind set to CREDENTIAL_KIND_API_KEY. Omit credentials to keep the current key. |
configuration | Record<string, unknown> | null | no | Replacement provider settings. Supported keys are image_preview (Jev only), timeout_millis, and max_response_bytes. Send {} to reset all settings to defaults, or omit configuration to keep the current settings. |
version | string | null | no | Version label. Send an empty string to clear it, or omit it to keep the current value. |
monitoringEndpoint | string | null | no | URL for the provider health or metrics endpoint. Must start with http:// or https://. Send an empty string to clear it, or omit it to keep the current value. |
replaceLabels | Record<string, string> | null | no | Replace all labels with this map. Send {} to remove all labels. Do not combine with mergeLabels. |
mergeLabels | Record<string, string> | null | no | Add labels and replace the values of matching keys. Other labels are unchanged. Do not combine with replaceLabels. |
Response Shapes
Response shape types model values returned by the SDK after forward-compatible unknown enum strings are coerced to null.
DecisionLimitResponseShape
| Field | Type | Required | Description |
|---|---|---|---|
type | "MAX_QUESTIONS" | "MIN_CHOICES" | "MAX_CHOICES" | "MIN_SCORE_LEVELS" | "MAX_SCORE_LEVELS" | "MAX_TOTAL_OPTIONS" | "MAX_STATE_CHARACTERS" | "MAX_BODY_BYTES" | "MAX_CONTENT_DEPTH" | "MAX_INPUT_TOKENS" | "MAX_QUESTION_ID_CHARACTERS" | "MAX_AUDIO_VIDEO_BYTES" | null | yes | Limit identifier. |
value | number | yes | Known limit value. |
DecisionMediaLimitResponseShape
| Field | Type | Required | Description |
|---|---|---|---|
type | "MAX_ITEMS" | "MAX_ITEM_BYTES" | "MAX_TOTAL_BYTES" | "MAX_PIXELS" | "MIN_WIDTH" | "MAX_WIDTH" | "MIN_HEIGHT" | "MAX_HEIGHT" | "MIN_PIXELS" | "MAX_DURATION_MILLIS" | null | yes | Media limit identifier. |
value | number | yes | Known limit value. |
DecisionMediaSupportResponseShape
| Field | Type | Required | Description |
|---|---|---|---|
kind | "IMAGE" | "AUDIO" | "VIDEO" | null | yes | Media category. |
mimeTypes | Array<string> | yes | Accepted MIME types. |
placements | Array<string> | yes | Allowed content positions. |
limits | Array<DecisionMediaLimitResponseShape> | yes | Known limits for media. The provider checks dimensions and duration. |
DecisionModelCapabilitiesResponseShape
| Field | Type | Required | Description |
|---|---|---|---|
questionTypes | Array<string> | yes | Types of questions this model can answer. |
media | Array<DecisionMediaSupportResponseShape> | yes | Supported media formats, placements and known limits. |
limits | Array<DecisionLimitResponseShape> | yes | Known numeric limits. |
contextBoundLimits | Array<string> | yes | Limits that depend on the provider context window instead of a fixed count. |
semantics | Array<DecisionQuestionSemanticsResponseShape> | yes | Meaning of the answer and confidence value for each question type. |
inputOverflow | "REJECTS" | "TRUNCATES_STATE" | "TRUNCATES_STATE_AND_OPTIONS" | null | yes | What the provider does when the input exceeds its context window. |
DecisionModelResponseShape
| Field | Type | Required | Description |
|---|---|---|---|
decisionModelId | string | yes | UUID of the decision model. |
displayName | string | yes | Name shown in the console and CLI. |
description | string | null | no | Optional description. |
providerType | DecisionModelProviderType | null | yes | Provider used by this model. |
endpointUrl | string | yes | Provider base URL. |
apiPath | string | yes | Inference path appended to the base URL. |
modelIdentifier | string | yes | Configured model identifier. |
credentials | EndpointAuthenticationResponseShape | null | no | Stored credentials. Returned only by get when includeCredentials=true and you have READ_DECISION_MODEL_CREDENTIALS permission. |
configuration | Record<string, unknown> | yes | Settings used when calling the provider. These do not change which features the model supports. |
labels | Record<string, string> | yes | Labels for filtering and organization. |
version | string | null | no | Optional version label. |
monitoringEndpoint | string | null | no | Optional HTTP(S) health or metrics URL. |
ownerId | string | yes | UUID of the principal that owns this model. |
capabilities | DecisionModelCapabilitiesResponseShape | yes | Supported questions and media, known limits, and the meaning of each answer type. |
createdAt | number | yes | Creation time in milliseconds since epoch. |
updatedAt | number | yes | Last update time in milliseconds since epoch. |
createdById | string | yes | UUID of the principal or API key that created this model. |
updatedById | string | yes | UUID of the principal or API key that last updated this model. |
DecisionQuestionSemanticsResponseShape
| Field | Type | Required | Description |
|---|---|---|---|
questionType | "CHOICE" | "SCORE" | "NOUL" | "BOX" | null | yes | Question type. |
confidence | "ADJUSTED_TOP_PROBABILITY" | "NORMALIZED_ENTROPY_COMPLEMENT" | "TOP_PROBABILITY" | "ORDERED_MEAN_ABSOLUTE_DEVIATION" | "PROVIDER_DEFINED" | "NOT_REPORTED" | null | yes | How to interpret the confidence value reported by the provider. |
output | "CANDIDATE_IDENTIFIER" | "EXPECTED_ZERO_BASED_LEVEL" | "PROBABILITY_TRUE" | "NORMALIZED_EDGES_NO_ABSENCE_SENTINEL" | null | yes | Meaning of the primary answer value. |
DecisionResponseShape
| Field | Type | Required | Description |
|---|---|---|---|
model | string | yes | Provider-reported model identifier. |
answers | Record<string, DecisionAnswer> | yes | Answers keyed by the original question identifiers. |
usage | DecisionUsageResponseShape | yes | Token counts reported by the provider. An omitted count is unknown; a count of 0 means the provider reported zero. |
DecisionUsageResponseShape
| Field | Type | Required | Description |
|---|---|---|---|
inputTokens | number | null | no | Reported input tokens. |
outputTokens | number | null | no | Reported output tokens. |
ListDecisionModelsResponseShape
| Field | Type | Required | Description |
|---|---|---|---|
decisionModels | Array<DecisionModelResponseShape> | yes | Decision models ordered by creation time, newest first, with UUID descending to break ties. |
nextPageToken | string | null | no | Token to pass as pageToken in the next request. Omitted when there are no more results. |
totalCount | number | yes | Total number of models that match the filters and that you have permission to read, across all pages. |