POST /v1/decisions, change the base URL to https://api.levanto.ai/v1 and use your Levanto key. Set model to levanto-sage-2 or sage-latest. Each question is answered as /decide answers the same question.
Which format to use
/decideis Sage’s own format: all five decision kinds,nullwhen Sage isn’t sure, reasoning and grounding. Start here./v1/decisionsis for code and frameworks that speak OpenAI’s format, and for judging a conversation with tool calls, as in Guard tool calls./v1/systemoneis for code and frameworks that speak the SystemOne format.
Request
Response
answers follows the order of questions.
Questions
Every question takes an optional
name, returned with its answer. Each probabilities list sums to 1, and confidence is its highest value.
Input
input is text, or a list of items in conversation order:
Tool calls and their results are read as turns of the conversation. An image is an
input_image part whose image_url is a base64 data: URI:
prompt_cache_key, prompt_cache_options, safety_identifier and an image’s detail are accepted and ignored.
Differences
- Every question gets an answer, never
null. Set your own threshold, or use/decideto getnullwhen Sage isn’t sure. - Sort, Tags, reasoning and grounding are on
/decideand/v1/systemone. Any other field in the body returns 400. - Errors use OpenAI’s error body. See Errors.