# Create presets

URL: https://docs.hanzo.ai/docs/openapi/benchmark/post-benchmark-presets

> Validates a router blend — its name, its arms, the rank they escalate through and the panel fan-out width — and answers 202 with the preset and the enso-<name> it would be served as.

`POST /v1/benchmark/presets`

> [Benchmark →](https://docs.hanzo.ai/docs/openapi/benchmark) · [All API references →](https://docs.hanzo.ai/docs/openapi) · [Get started →](https://docs.hanzo.ai/docs/guides)

|               |                                             |
| ------------- | ------------------------------------------- |
| **Address**   | `https://api.hanzo.ai/v1/benchmark/presets` |
| **Method**    | `POST`                                      |
| **Operation** | `post_benchmark_presets`                    |
| **Auth**      | `Authorization: Bearer $HANZO_API_KEY`      |

Validates a router blend — its name, its arms, the rank they escalate
through and the panel fan-out width — and answers 202 with the preset and the
enso-\<name> it would be served as.

It VALIDATES AND ECHOES: the definition is not persisted yet, so a preset
accepted here is not one the model layer will resolve. Treat the response as a
check on the blend, not a promise to serve it.

Any signed-in caller may compose; a caller with no verified principal is refused
401\. Owner is the caller's verified org whatever the body says, so a blend is
never checked or echoed as another org's.

Defaults fill the shape rather than refusing it: an omitted rank becomes the arms
in declared order and a panel below 1 becomes 1. The one real invariant is that
rank may only name arms the blend declares — the same rule the model catalog
enforces — and a rank naming anything else is a 422 listing exactly which entries
were undeclared. A blend with no name or no arms is a 400.

## Request

6 fields, body `application/json` (required).

| Field   | In   | Type            | Required | Description                                                                 |
| ------- | ---- | --------------- | -------- | --------------------------------------------------------------------------- |
| `arms`  | body | string\[]       | —        | the blend — model ids from the arena                                        |
| `name`  | body | string          | —        | served as enso-\<name>                                                      |
| `note`  | body | string          | —        | why this blend (audit)                                                      |
| `owner` | body | string          | —        | the org the blend belongs to: the writer's verified org, never a value sent |
| `panel` | body | integer (int64) | —        | fan-out width (>=1)                                                         |
| `rank`  | body | string\[]       | —        | escalation order over arms                                                  |

## Response

| Status    | Body                     | Meaning  |
| --------- | ------------------------ | -------- |
| `202`     | benchmark.presetAccepted | accepted |
| `default` | problem-details          | refused  |

`202` body — 11 fields.

| Field          | In   | Type             | Always | Description                                                                 |
| -------------- | ---- | ---------------- | ------ | --------------------------------------------------------------------------- |
| `by`           | body | string           | —      | By is the verified user who composed it.                                    |
| `note`         | body | string           | —      | Note explains what acceptance does and does not promise.                    |
| `preset`       | body | benchmark.Preset | —      |                                                                             |
| `preset.arms`  | body | string\[]        | —      | the blend — model ids from the arena                                        |
| `preset.name`  | body | string           | —      | served as enso-\<name>                                                      |
| `preset.note`  | body | string           | —      | why this blend (audit)                                                      |
| `preset.owner` | body | string           | —      | the org the blend belongs to: the writer's verified org, never a value sent |
| `preset.panel` | body | integer (int64)  | —      | fan-out width (>=1)                                                         |
| `preset.rank`  | body | string\[]        | —      | escalation order over arms                                                  |
| `served_as`    | body | string           | —      | ServedAs is the model id the serving layer would resolve this blend under.  |
| `status`       | body | string           | —      | Status is "accepted": the blend is well-formed, not that it is now served.  |

Failure carries the platform error shape — see [Errors](https://docs.hanzo.ai/docs/errors).

## Examples

**CLI**

```bash
hanzo benchmark presets create
```

**SDK**

**.ts**

```ts
import { Configuration, BenchmarkApi } from 'hanzoai';

const api = new BenchmarkApi(new Configuration({ accessToken: process.env.HANZO_API_KEY }));
const { data } = await api.postBenchmarkPresets({ arms: ["<arms>"], name: "<name>" });
```

**.py**

```python
from hanzoai.cloud import ApiClient, Configuration
from hanzoai.cloud.api import BenchmarkApi

client = ApiClient(Configuration(access_token=os.environ["HANZO_API_KEY"]))
result = BenchmarkApi(client).post_benchmark_presets(arms=["<arms>"], name="<name>")
```

**.go**

```go
cfg := hanzoai.NewConfiguration()
cfg.AddDefaultHeader("Authorization", "Bearer "+os.Getenv("HANZO_API_KEY"))
client := hanzoai.NewAPIClient(cfg)

resp, _, err := client.BenchmarkAPI.PostBenchmarkPresets(context.Background()).Execute()
if err != nil {
	return err
}
```

**.rs**

```rust
use hanzo_client::apis::{configuration::Configuration, benchmark_api};

let mut cfg = Configuration::new();
cfg.bearer_access_token = std::env::var("HANZO_API_KEY").ok();

let result = benchmark_api::post_benchmark_presets(&cfg, Default::default()).await?;
```

**.java**

```java
import ai.hanzo.cloud.ApiClient;
import ai.hanzo.cloud.api.BenchmarkApi;

ApiClient client = new ApiClient();
client.setBearerToken(System.getenv("HANZO_API_KEY"));

var result = new BenchmarkApi(client).postBenchmarkPresets();
```

**HTTP**

```bash
curl -X POST https://api.hanzo.ai/v1/benchmark/presets \
  -H "Authorization: Bearer $HANZO_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
       "arms": [
         "<arms>"
       ],
       "name": "<name>"
     }'
```

**MCP**

MCP reaches **benchmark** through the `benchmark` tool, which names its 9 operations with its own verbs — this one among them, under a name only MCP declares. `describe` explains any of them:

```bash
curl -X POST https://api.hanzo.ai/v1/mcp \
  -H "Content-Type: application/json" \
  -d '{
       "jsonrpc": "2.0",
       "id": 1,
       "method": "tools/call",
       "params": {
         "name": "describe",
         "arguments": {
           "op": "get_benchmark_catalog"
         }
       }
     }'
```

---

[Benchmark API](https://docs.hanzo.ai/docs/openapi/benchmark) · [All Hanzo APIs](https://docs.hanzo.ai/docs/openapi) · [Interactive reference](https://docs.hanzo.ai/docs/openapi/reference)
