---
title: "Monte Carlo tolerance analysis (synchronous, metered)"
method: POST
path: "/v1/designs/monte-carlo"
tags: ["Solve"]
---

# Monte Carlo tolerance analysis (synchronous, metered)

`POST /v1/designs/monte-carlo`

## Request

- Base URL: `https://electronics-architect.com`
- URL: `https://electronics-architect.com/v1/designs/monte-carlo`
- Auth: HTTP bearer

Scope: `solve`. Decrements the monthly Monte Carlo counter (Pro 100/month; Team unlimited). Trials are clamped to the plan cap, to a size budget of 120 000 node-trials, and to what one request can finish inside the 300 s timeout — a trial is a full solve and a solve is superlinear in node count, so a large design gets fewer trials than its node-trial budget alone would allow. `meta.clamped` says so and `meta.clampedBy` says which (`plan limit`, `design complexity` or `request time budget`); on the last, `meta.notice` points at `POST /v1/jobs/monte-carlo`, which runs the trials you asked for in slices with no request timeout. Pass `options.seed` for a reproducible run; `meta.seed` echoes the seed used either way.

## Request body

- object: The design and Monte Carlo options.
  - `design` Design, required (unresolved $ref)
  - `options` object
    - `trials` integer
    - `seed` integer: Seed for the trial generator. Omit for a random seed; the response echoes it.
    - `ambientTemperature` number: Ambient in °C for the thermal estimates. Defaults to the design's own setting, else 25.

## Response `200`

Trials, summary statistics, and metadata.

- MonteCarloResponse
  - `result` object: trials[], summary, seed, trialCount, failedTrials — the same shape the editor's Monte Carlo panel reads.
    - `trials` object[]
    - `summary` object
    - `seed` integer
    - `trialCount` integer
    - `failedTrials` integer
  - `meta` object
    - `trials` integer
    - `requestedTrials` integer
    - `clamped` boolean
    - `clampedBy` 'plan limit' | 'design complexity' | 'request time budget' | 'null', nullable
    - `notice` string: Present only when clampedBy is `request time budget`: what the design costs a trial, and the job endpoint that will run the full count.
    - `seed` integer
    - `elapsedMs` number
    - `metered` boolean
    - `feature` string

## Other responses

- `400`: VALIDATION_FAILED or INVALID_REQUEST.
- `401`: No key, a browser token instead of a key, an unknown key, or a revoked key (code KEY_REVOKED).
- `402`: QUOTA_EXHAUSTED — the monthly Monte Carlo quota is used up.
- `403`: The key lacks a required scope (INSUFFICIENT_SCOPE), or the call needs a plan the account does not have (PLAN_REQUIRED): on the Free plan, compare, exports, Monte Carlo jobs, AI synthesis, a design with more than one sheet, or a save, share or key past the Free limits; or a team key whose team is no longer paid for.
- `413`: PAYLOAD_TOO_LARGE.
- `429`: RATE_LIMITED: the key's per-minute allowance is used up (or, before any key is recognised, too many requests from one address presented an unknown or revoked key). On the routes that solve inside the request (solve, verify, derating, compare, exports, ai/review, ai/synthesize) it can also be SOLVE_IN_PROGRESS: this account already has 3 calls of that kind running on the server that took the request (solves, AI reviews and syntheses are each counted separately). `Retry-After` is set either way; for SOLVE_IN_PROGRESS it is 2 s for solves and 30 s for AI reviews and syntheses.

---

[API](https://skmtc.dev/electronics-architect/apis/electronics-architect-api.md) · [All operations](https://skmtc.dev/electronics-architect/apis/electronics-architect-api/llms.txt) · [OpenAPI document](https://skmtc.dev/electronics-architect/apis/electronics-architect-api/revisions/98066184ba67?raw)
