{
 "openapi": "3.1.0",
 "info": {
  "title": "Vana Decision API",
  "description": "Vana 3.0 by annamal.ai: answers typed decision questions (choice / noul / score) about any state in a single forward pass.",
  "version": "0.1.0"
 },
 "paths": {
  "/health": {
   "get": {
    "summary": "Health",
    "operationId": "health_health_get",
    "responses": {
     "200": {
      "description": "Successful Response",
      "content": {
       "application/json": {
        "schema": {
         "additionalProperties": true,
         "type": "object",
         "title": "Response Health Health Get"
        }
       }
      }
     }
    }
   }
  },
  "/v1/models": {
   "get": {
    "summary": "List Models",
    "operationId": "list_models_v1_models_get",
    "parameters": [
     {
      "name": "authorization",
      "in": "header",
      "required": false,
      "schema": {
       "anyOf": [
        {
         "type": "string"
        },
        {
         "type": "null"
        }
       ],
       "title": "Authorization"
      }
     }
    ],
    "responses": {
     "200": {
      "description": "Successful Response",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ModelsList"
        }
       }
      }
     },
     "422": {
      "description": "Validation Error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/HTTPValidationError"
        }
       }
      }
     }
    },
    "security": [
     {
      "bearer": []
     }
    ]
   }
  },
  "/v1/balance": {
   "get": {
    "summary": "Balance",
    "operationId": "balance_v1_balance_get",
    "parameters": [
     {
      "name": "authorization",
      "in": "header",
      "required": false,
      "schema": {
       "anyOf": [
        {
         "type": "string"
        },
        {
         "type": "null"
        }
       ],
       "title": "Authorization"
      }
     }
    ],
    "responses": {
     "200": {
      "description": "Successful Response",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "additionalProperties": true,
         "title": "Response Balance V1 Balance Get"
        }
       }
      }
     },
     "422": {
      "description": "Validation Error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/HTTPValidationError"
        }
       }
      }
     }
    },
    "security": [
     {
      "bearer": []
     }
    ]
   }
  },
  "/v1/systemone": {
   "post": {
    "summary": "Systemone",
    "operationId": "systemone_v1_systemone_post",
    "parameters": [
     {
      "name": "authorization",
      "in": "header",
      "required": false,
      "schema": {
       "anyOf": [
        {
         "type": "string"
        },
        {
         "type": "null"
        }
       ],
       "title": "Authorization"
      }
     }
    ],
    "requestBody": {
     "required": true,
     "content": {
      "application/json": {
       "schema": {
        "$ref": "#/components/schemas/DecisionRequest"
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "Successful Response",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/DecisionResponse"
        }
       }
      }
     },
     "422": {
      "description": "Validation Error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/HTTPValidationError"
        }
       }
      }
     }
    },
    "security": [
     {
      "bearer": []
     }
    ]
   }
  },
  "/v1/decide": {
   "post": {
    "summary": "Decide Alias",
    "operationId": "decide_alias_v1_decide_post",
    "parameters": [
     {
      "name": "authorization",
      "in": "header",
      "required": false,
      "schema": {
       "anyOf": [
        {
         "type": "string"
        },
        {
         "type": "null"
        }
       ],
       "title": "Authorization"
      }
     }
    ],
    "requestBody": {
     "required": true,
     "content": {
      "application/json": {
       "schema": {
        "$ref": "#/components/schemas/DecisionRequest"
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "Successful Response",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/DecisionResponse"
        }
       }
      }
     },
     "422": {
      "description": "Validation Error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/HTTPValidationError"
        }
       }
      }
     }
    },
    "security": [
     {
      "bearer": []
     }
    ]
   }
  }
 },
 "components": {
  "schemas": {
   "ChoiceAnswer": {
    "properties": {
     "type": {
      "type": "string",
      "const": "choice",
      "title": "Type",
      "default": "choice"
     },
     "choice": {
      "type": "string",
      "title": "Choice"
     },
     "probabilities": {
      "additionalProperties": {
       "type": "number"
      },
      "type": "object",
      "title": "Probabilities"
     },
     "confidence": {
      "type": "number",
      "title": "Confidence"
     }
    },
    "type": "object",
    "required": [
     "choice",
     "probabilities",
     "confidence"
    ],
    "title": "ChoiceAnswer"
   },
   "DecisionRequest": {
    "properties": {
     "model": {
      "anyOf": [
       {
        "type": "string"
       },
       {
        "type": "null"
       }
      ],
      "title": "Model",
      "description": "Model id: vana-3.0 (aliases vana-3, vana-latest). Default vana-3.0."
     },
     "state": {
      "anyOf": [
       {
        "type": "string"
       },
       {
        "additionalProperties": true,
        "type": "object"
       },
       {
        "items": {},
        "type": "array"
       }
      ],
      "title": "State"
     },
     "questions": {
      "additionalProperties": {
       "$ref": "#/components/schemas/QuestionSpec"
      },
      "type": "object",
      "minProperties": 1,
      "title": "Questions"
     }
    },
    "type": "object",
    "required": [
     "state",
     "questions"
    ],
    "title": "DecisionRequest",
    "description": "POST /v1/systemone body."
   },
   "DecisionResponse": {
    "properties": {
     "model": {
      "type": "string",
      "title": "Model"
     },
     "answers": {
      "additionalProperties": {
       "anyOf": [
        {
         "$ref": "#/components/schemas/ChoiceAnswer"
        },
        {
         "$ref": "#/components/schemas/NoulAnswer"
        },
        {
         "$ref": "#/components/schemas/ScoreAnswer"
        }
       ]
      },
      "type": "object",
      "title": "Answers"
     },
     "usage": {
      "$ref": "#/components/schemas/Usage"
     }
    },
    "type": "object",
    "required": [
     "model",
     "answers"
    ],
    "title": "DecisionResponse"
   },
   "HTTPValidationError": {
    "properties": {
     "detail": {
      "items": {
       "$ref": "#/components/schemas/ValidationError"
      },
      "type": "array",
      "title": "Detail"
     }
    },
    "type": "object",
    "title": "HTTPValidationError"
   },
   "ModelInfo": {
    "properties": {
     "id": {
      "type": "string",
      "title": "Id"
     },
     "object": {
      "type": "string",
      "title": "Object",
      "default": "model"
     },
     "owned_by": {
      "type": "string",
      "title": "Owned By",
      "default": "annamal.ai"
     },
     "display_name": {
      "anyOf": [
       {
        "type": "string"
       },
       {
        "type": "null"
       }
      ],
      "title": "Display Name"
     },
     "aliases": {
      "items": {
       "type": "string"
      },
      "type": "array",
      "title": "Aliases"
     },
     "context_length": {
      "anyOf": [
       {
        "type": "integer"
       },
       {
        "type": "null"
       }
      ],
      "title": "Context Length"
     },
     "languages": {
      "items": {
       "type": "string"
      },
      "type": "array",
      "title": "Languages"
     }
    },
    "type": "object",
    "required": [
     "id"
    ],
    "title": "ModelInfo"
   },
   "ModelsList": {
    "properties": {
     "object": {
      "type": "string",
      "title": "Object",
      "default": "list"
     },
     "data": {
      "items": {
       "$ref": "#/components/schemas/ModelInfo"
      },
      "type": "array",
      "title": "Data"
     }
    },
    "type": "object",
    "required": [
     "data"
    ],
    "title": "ModelsList"
   },
   "NoulAnswer": {
    "properties": {
     "type": {
      "type": "string",
      "const": "noul",
      "title": "Type",
      "default": "noul"
     },
     "noul": {
      "type": "number",
      "title": "Noul"
     },
     "probabilities": {
      "anyOf": [
       {
        "additionalProperties": {
         "type": "number"
        },
        "type": "object"
       },
       {
        "type": "null"
       }
      ],
      "title": "Probabilities"
     },
     "confidence": {
      "anyOf": [
       {
        "type": "number"
       },
       {
        "type": "null"
       }
      ],
      "title": "Confidence"
     }
    },
    "type": "object",
    "required": [
     "noul"
    ],
    "title": "NoulAnswer"
   },
   "QuestionSpec": {
    "properties": {
     "type": {
      "$ref": "#/components/schemas/QuestionType"
     },
     "instructions": {
      "type": "string",
      "title": "Instructions",
      "default": ""
     },
     "criteria": {
      "title": "Criteria"
     }
    },
    "type": "object",
    "required": [
     "type"
    ],
    "title": "QuestionSpec",
    "description": "One typed decision question."
   },
   "QuestionType": {
    "type": "string",
    "enum": [
     "choice",
     "noul",
     "score"
    ],
    "title": "QuestionType"
   },
   "ScoreAnswer": {
    "properties": {
     "type": {
      "type": "string",
      "const": "score",
      "title": "Type",
      "default": "score"
     },
     "score": {
      "type": "number",
      "title": "Score"
     },
     "legend": {
      "additionalProperties": {
       "type": "string"
      },
      "type": "object",
      "title": "Legend"
     },
     "probabilities": {
      "additionalProperties": {
       "type": "number"
      },
      "type": "object",
      "title": "Probabilities"
     },
     "confidence": {
      "type": "number",
      "title": "Confidence"
     }
    },
    "type": "object",
    "required": [
     "score",
     "legend",
     "probabilities",
     "confidence"
    ],
    "title": "ScoreAnswer"
   },
   "Usage": {
    "properties": {
     "input_tokens": {
      "type": "integer",
      "title": "Input Tokens",
      "default": 0
     },
     "output_tokens": {
      "type": "integer",
      "title": "Output Tokens",
      "default": 0
     }
    },
    "type": "object",
    "title": "Usage"
   },
   "ValidationError": {
    "properties": {
     "loc": {
      "items": {
       "anyOf": [
        {
         "type": "string"
        },
        {
         "type": "integer"
        }
       ]
      },
      "type": "array",
      "title": "Location"
     },
     "msg": {
      "type": "string",
      "title": "Message"
     },
     "type": {
      "type": "string",
      "title": "Error Type"
     },
     "input": {
      "title": "Input"
     },
     "ctx": {
      "type": "object",
      "title": "Context"
     }
    },
    "type": "object",
    "required": [
     "loc",
     "msg",
     "type"
    ],
    "title": "ValidationError"
   }
  },
  "securitySchemes": {
   "bearer": {
    "type": "http",
    "scheme": "bearer",
    "description": "vana_live_… or vana_test_… key"
   }
  }
 },
 "servers": [
  {
   "url": "https://api.vana.annamal.ai"
  }
 ]
}