Skip to main content
POST
/api/v1/decisions

التفويضات

Authorization
string
header
مطلوب

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

الترويسات

Accept-Encoding
string

Supported compression encodings (gzip, br)

مثال:

"gzip, br"

الجسم

application/json

Evaluate a state against a map of typed questions and get back structured answers, one per question.

state
مطلوب

The content to evaluate: a plain string for text, or structured data (object/array) for things like chat logs, records, or application state.

Minimum string length: 1
مثال:

"Help! My payouts have been failing for 3 days."

model
مطلوب

ID of the decision model to use. You can use the List models API (type=decision) to see available models, or see our Model overview for descriptions of them.

مثال:

"jev-latest"

questions
object
مطلوب

Map of typed questions, keyed by an id you choose. Answers come back under the same ids. Every question is evaluated in parallel and in isolation against the same state. Question ids are not sent to the model.

مثال:

الاستجابة

OK

model
string
مطلوب

The model that performed the evaluation.

answers
object
مطلوب

One answer per question, keyed by the same ids used in the request.

usage
object
مطلوب