---
title: "Run Optimization"
method: POST
path: "/api/contracts/{contract_id}/optimize"
tags: ["Optimization"]
---

# Run Optimization

`POST /api/contracts/{contract_id}/optimize`

## Path parameters

- `contract_id` string, required

## Query parameters

- `scope_name` string, nullable
- `output_var` string, nullable
- `num_test_inputs` integer
- `party_position` string
- `analysis_concurrency` integer

## Response `200`

Successful Response

- unknown

## Other responses

- `422` — Validation Error

## Changes

- **2026-03-17** `68622707ed43` — 2 info
  - the endpoint scheme security `APIKeyHeader` was added to the API
  - the endpoint scheme security `HTTPBearer` was added to the API

[Change history](https://skmtc.dev/benchify/apis/benchify-contract-api/changes/api/contracts/:contract_id/optimize/post.md)

---

[API](https://skmtc.dev/benchify/apis/benchify-contract-api.md) · [All operations](https://skmtc.dev/benchify/apis/benchify-contract-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/benchify/benchify-contract-api/revisions/68622707ed43/schema)
