---
title: Models
description: Send the native JSON definition with each case; answer names and types come from its decisions.
icon: box
---

A native model is a JSON definition containing `name`, `inputs`, `decisions`, and optional `types` and `functions`. It holds the calculations and conditions your application runs.

```json
{
  "name": "Refund amount",
  "inputs": {
    "plan_amount": { "type": "number", "desc": "Subscription price in USD" },
    "period_days": { "type": "number > 0", "desc": "Days in the subscription period" },
    "unused_days": { "type": "number >= 0", "desc": "Unused days" }
  },
  "decisions": {
    "refund_amount": {
      "type": "number",
      "expr": "decimal(plan_amount * min(unused_days, period_days) / period_days, 2)"
    }
  }
}
```

This small model illustrates the shape. The [quickstart](/docs/quickstart) provides the complete recorded cancellation model with eligibility and a deadline.

## Submit the definition with each case

```js
const model = JSON.parse(await readFile("cancellation-model.json", "utf8"));
const body = JSON.stringify({ decision: model, state });
// POST /v1/systemone — add top-level Jev `questions` when the state
// holds evidence instead of every fact.
```

Send the definition itself in `decision`, without a nested wrapper. Every named decision becomes an answer, including helper calculations. Types come from the decisions; you do not repeat a native `questions` contract. See [Answer types](/docs/concepts/questions).

Execution returns `answers`, `receipt` and `usage`; it does not echo the model, questions, state or input schema. Your application keeps the definition and supplies it on every execution. A name or hash is not a lookup key; the service does not keep a saved-model library. Native request tokens include the submitted model.

## Create or change a model

You write the JSON yourself — by hand, or with your own development tools. There is no endpoint that generates or revises a model from a prompt, questions or documents, and the console has no AI assistant: you edit the Decision pane directly and keep the file your application submits.

See [Define a model by hand](/docs/guides/define-by-hand) to write one, and [Compare revised rules](/docs/guides/revise-and-replay) to check a change against known cases before switching.

You control which definition your application submits. A console edit does not replace a model file in your application.
