{"openapi":"3.1.0","info":{"title":"Electronics Architect API","version":"1.0.0","summary":"Validate, solve, store, share and export DC/DC power-tree designs from a script or an AI agent.","description":"The agent door to Electronics Architect. Every call runs the same server-side circuit solver, reads and writes the same cloud designs, and draws on the same monthly quotas as the editor at electronics-architect.com/app.\n\n**Designs** are schema v1 documents (https://electronics-architect.com/schema/design-v1.json). Numbers are SI base units with no prefix — 0.0006 for 600 µA, 47e-6 for 47 µF — as JSON numbers, never strings. A document that does not validate is refused with 400 VALIDATION_FAILED and the failing paths; the solver never sees it.\n\n**Identity** is an API key created in the editor under Account → Developer: `Authorization: Bearer ea_live_…`. Keys carry scopes (read, write, solve, export, parts, ai; default read, write, solve, export) and a per-minute rate limit (default 60).\n\n**Metering.** Solving is unmetered — only the rate limit applies. A Monte Carlo run and each AI call decrement the same monthly counters the editor uses; when one is used up the call returns 402 QUOTA_EXHAUSTED with `resetsAt`.\n\n**Errors** are always `{ \"error\": { \"code\", \"message\", \"field\"? } }` with stable codes.\n\n**Warnings** in solve results carry `code` (the stable key), `level`, `label`, `message` and `remedy`; `summary.warningGroups` collapses repeats.\n\nNot in this version: asynchronous jobs (`/v1/jobs/*`, derating) and the parts search (`/v1/parts/*`). Both are planned; see the developer page.","contact":{"name":"Electronics Architect","url":"https://electronics-architect.com/contact.html"},"termsOfService":"https://electronics-architect.com/terms.html"},"servers":[{"url":"https://electronics-architect.com"}],"security":[{"apiKey":[]}],"tags":[{"name":"Account","description":"The key and its account."},{"name":"Solve","description":"Validate and solve designs. Solving is synchronous and unmetered."},{"name":"Templates","description":"The design templates that ship with the editor — starting points to solve as-is or edit and save. Static and cacheable."},{"name":"Library","description":"The part library — parametric simulation models (Vin range, Vout, Imax, dropout, Iq, efficiency handles, thermal, ratings) for real parts, ready to paste into a node's properties. Read from the database the community's datasheet contributions merge into, so it grows; every value is gated per attribute (no DigiKey-sourced values, no unverified guesses). No pricing, stock or distributor data."},{"name":"Designs","description":"Cloud designs — the same rows \"Save to Cloud\" writes, so agent output appears in My Designs / Team Designs."},{"name":"Exports","description":"Bill of materials and design JSON. PDF exports are rendered in the editor."},{"name":"AI","description":"The editor's AI features on the account's included quota. Requires the `ai` scope."}],"paths":{"/v1/openapi.json":{"get":{"tags":["Account"],"summary":"This document","security":[],"responses":{"200":{"description":"The OpenAPI 3.1 description."}}}},"/v1/me":{"get":{"tags":["Account"],"summary":"The key, its scopes, and this month's usage","responses":{"200":{"description":"Key, account tier, and per-feature usage with the reset date.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Me"}}}},"401":{"description":"No key, a browser token instead of a key, an unknown key, or a revoked key (code KEY_REVOKED).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":{"code":"UNAUTHENTICATED","message":"Send an API key as \"Authorization: Bearer ea_live_…\"."}}}}},"403":{"description":"The key lacks a required scope (INSUFFICIENT_SCOPE) or the plan behind it no longer allows keys (PLAN_REQUIRED).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":{"code":"INSUFFICIENT_SCOPE","message":"This key does not have the \"solve\" scope.","requiredScopes":["solve"],"keyScopes":["read"]}}}}},"429":{"description":"The key's per-minute allowance is used up. `Retry-After` is set.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":{"code":"RATE_LIMITED","message":"This key allows 60 requests per minute. Retry in 23 s.","limitPerMinute":60,"retryAfterSeconds":23}}}}}}}},"/v1/designs/validate":{"post":{"tags":["Solve"],"summary":"Schema and structure check, no solve","description":"Scope: `read`. Always 200; read `valid` and `errors`. Checks the JSON Schema and that every connection names a node on its sheet.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","description":"The design to check. A bare design document (with `sheets`) is also accepted.","properties":{"design":{"$ref":"#/components/schemas/Design"},"options":{"type":"object","properties":{}}},"required":["design"]}}}},"responses":{"200":{"description":"Validation result.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationResult"}}}},"401":{"description":"No key, a browser token instead of a key, an unknown key, or a revoked key (code KEY_REVOKED).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":{"code":"UNAUTHENTICATED","message":"Send an API key as \"Authorization: Bearer ea_live_…\"."}}}}},"403":{"description":"The key lacks a required scope (INSUFFICIENT_SCOPE) or the plan behind it no longer allows keys (PLAN_REQUIRED).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":{"code":"INSUFFICIENT_SCOPE","message":"This key does not have the \"solve\" scope.","requiredScopes":["solve"],"keyScopes":["read"]}}}}},"429":{"description":"The key's per-minute allowance is used up. `Retry-After` is set.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":{"code":"RATE_LIMITED","message":"This key allows 60 requests per minute. Retry in 23 s.","limitPerMinute":60,"retryAfterSeconds":23}}}}}}}},"/v1/designs/solve":{"post":{"tags":["Solve"],"summary":"Solve one tolerance corner","description":"Scope: `solve`. Synchronous; unmetered. Payload caps: 20 sheets, 500 nodes per sheet, 2000 total nodes.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","description":"The design and solve options.","properties":{"design":{"$ref":"#/components/schemas/Design"},"options":{"type":"object","properties":{"corner":{"type":"string","enum":["nom","min","max"],"default":"nom","description":"Which tolerance corner to solve. `min`/`max` push every toleranced value to its extreme."},"ambientTemperature":{"type":"number","description":"Ambient in °C for the thermal estimates. Defaults to the design's own setting, else 25."},"includePortVoltages":{"type":"boolean","default":false,"description":"Include per-port voltages on every node result."}}}},"required":["design"]}}}},"responses":{"200":{"description":"The solver result and request metadata.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SolveResponse"}}}},"400":{"description":"VALIDATION_FAILED with the failing schema paths, or INVALID_REQUEST for a bad option.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":{"code":"VALIDATION_FAILED","message":"The design does not validate against schema v1 (1 problem). First: /sheets/0/nodes/2/properties must NOT have additional properties (peakEff)","field":"/sheets/0/nodes/2/properties","errors":[{"path":"/sheets/0/nodes/2/properties","message":"must NOT have additional properties (peakEff)"}]}}}}},"401":{"description":"No key, a browser token instead of a key, an unknown key, or a revoked key (code KEY_REVOKED).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":{"code":"UNAUTHENTICATED","message":"Send an API key as \"Authorization: Bearer ea_live_…\"."}}}}},"403":{"description":"The key lacks a required scope (INSUFFICIENT_SCOPE) or the plan behind it no longer allows keys (PLAN_REQUIRED).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":{"code":"INSUFFICIENT_SCOPE","message":"This key does not have the \"solve\" scope.","requiredScopes":["solve"],"keyScopes":["read"]}}}}},"413":{"description":"PAYLOAD_TOO_LARGE — a payload cap was exceeded.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":{"code":"PAYLOAD_TOO_LARGE","message":"2100 nodes across all sheets exceeds maximum of 2000"}}}}},"429":{"description":"The key's per-minute allowance is used up. `Retry-After` is set.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":{"code":"RATE_LIMITED","message":"This key allows 60 requests per minute. Retry in 23 s.","limitPerMinute":60,"retryAfterSeconds":23}}}}},"500":{"description":"SOLVE_FAILED — the solver refused the circuit.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":{"code":"SOLVE_FAILED","message":"singular matrix"}}}}}}}},"/v1/designs/monte-carlo":{"post":{"tags":["Solve"],"summary":"Monte Carlo tolerance analysis (synchronous, metered)","description":"Scope: `solve`. Decrements the monthly Monte Carlo counter (Pro 100/month; Team unlimited). Trials are clamped to the plan cap and to a CPU budget of 120 000 node-trials; `meta.clamped` says so. Pass `options.seed` for a reproducible run; `meta.seed` echoes the seed used either way.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","description":"The design and Monte Carlo options.","properties":{"design":{"$ref":"#/components/schemas/Design"},"options":{"type":"object","properties":{"trials":{"type":"integer","minimum":1,"default":1000},"seed":{"type":"integer","description":"Seed for the trial generator. Omit for a random seed; the response echoes it."},"ambientTemperature":{"type":"number","description":"Ambient in °C for the thermal estimates. Defaults to the design's own setting, else 25."}}}},"required":["design"]}}}},"responses":{"200":{"description":"Trials, summary statistics, and metadata.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MonteCarloResponse"}}}},"400":{"description":"VALIDATION_FAILED or INVALID_REQUEST.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":{"code":"INVALID_REQUEST","message":"options.trials must be a positive integer.","field":"options.trials"}}}}},"401":{"description":"No key, a browser token instead of a key, an unknown key, or a revoked key (code KEY_REVOKED).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":{"code":"UNAUTHENTICATED","message":"Send an API key as \"Authorization: Bearer ea_live_…\"."}}}}},"402":{"description":"QUOTA_EXHAUSTED — the monthly Monte Carlo quota is used up.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":{"code":"QUOTA_EXHAUSTED","message":"The monthly monte carlo quota for this account is used up (100/100). It resets on 2026-10-01.","feature":"monte_carlo","limit":100,"used":100,"resetsAt":"2026-10-01T00:00:00.000Z"}}}}},"403":{"description":"The key lacks a required scope (INSUFFICIENT_SCOPE) or the plan behind it no longer allows keys (PLAN_REQUIRED).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":{"code":"INSUFFICIENT_SCOPE","message":"This key does not have the \"solve\" scope.","requiredScopes":["solve"],"keyScopes":["read"]}}}}},"413":{"description":"PAYLOAD_TOO_LARGE.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":{"code":"PAYLOAD_TOO_LARGE","message":"21 sheets exceeds maximum of 20"}}}}},"429":{"description":"The key's per-minute allowance is used up. `Retry-After` is set.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":{"code":"RATE_LIMITED","message":"This key allows 60 requests per minute. Retry in 23 s.","limitPerMinute":60,"retryAfterSeconds":23}}}}}}}},"/v1/library/parts":{"get":{"tags":["Library"],"summary":"List the part models the library stands behind","description":"Scope: `read`. Parametric simulation models for real parts, read from the same database the editor's part picker and the community contributions use, so the library grows as people ingest datasheets and the community verifies them. Every value is gated per attribute: curated, datasheet-extracted, admin-set and community-verified values are served; DigiKey-sourced values never are (DigiKey's API terms); an unverified extraction is not served until a person verifies it. Filter with `?type=` (see `types` in the response). Each model carries `properties` (ready to paste into a node of that type), `provenance` per supplied key, and `filledFromDefaults` — the property keys the library did NOT supply. Physics only: no pricing, stock or distributor links. `Cache-Control: private, max-age=300`.","parameters":[{"name":"type","in":"query","required":false,"schema":{"type":"string"},"description":"A node type to filter by, e.g. `SMPS`. Omit for every model."}],"responses":{"200":{"description":"The models.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PartModelList"}}}},"400":{"description":"`type` is not one the library has models for; the message lists them.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":{"code":"INVALID_REQUEST","message":"type must be one of LDO, SMPS.","field":"type"}}}}},"401":{"description":"No key, a browser token instead of a key, an unknown key, or a revoked key (code KEY_REVOKED).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":{"code":"UNAUTHENTICATED","message":"Send an API key as \"Authorization: Bearer ea_live_…\"."}}}}},"403":{"description":"The key lacks a required scope (INSUFFICIENT_SCOPE) or the plan behind it no longer allows keys (PLAN_REQUIRED).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":{"code":"INSUFFICIENT_SCOPE","message":"This key does not have the \"solve\" scope.","requiredScopes":["solve"],"keyScopes":["read"]}}}}},"429":{"description":"The key's per-minute allowance is used up. `Retry-After` is set.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":{"code":"RATE_LIMITED","message":"This key allows 60 requests per minute. Retry in 23 s.","limitPerMinute":60,"retryAfterSeconds":23}}}}}}}},"/v1/library/parts/{mpn}":{"get":{"tags":["Library"],"summary":"Read one curated part model by manufacturer part number","description":"Scope: `read`. Exact MPN, case-insensitive, e.g. `TPS54824`. 404 `NOT_FOUND` when the library has no model for it — the library is curated, not exhaustive, so a miss means \"enter the datasheet values by hand\", not \"the part does not exist\".","parameters":[{"name":"mpn","in":"path","required":true,"schema":{"type":"string"},"description":"The manufacturer part number."}],"responses":{"200":{"description":"The model.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PartModel"}}}},"401":{"description":"No key, a browser token instead of a key, an unknown key, or a revoked key (code KEY_REVOKED).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":{"code":"UNAUTHENTICATED","message":"Send an API key as \"Authorization: Bearer ea_live_…\"."}}}}},"403":{"description":"The key lacks a required scope (INSUFFICIENT_SCOPE) or the plan behind it no longer allows keys (PLAN_REQUIRED).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":{"code":"INSUFFICIENT_SCOPE","message":"This key does not have the \"solve\" scope.","requiredScopes":["solve"],"keyScopes":["read"]}}}}},"404":{"description":"The library has no model for that MPN.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":{"code":"NOT_FOUND","message":"No curated model for \"XYZ123\". The library is curated, not exhaustive — enter the datasheet values by hand. GET /v1/library/parts lists what it has."}}}}},"429":{"description":"The key's per-minute allowance is used up. `Retry-After` is set.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":{"code":"RATE_LIMITED","message":"This key allows 60 requests per minute. Retry in 23 s.","limitPerMinute":60,"retryAfterSeconds":23}}}}}}}},"/v1/templates":{"get":{"tags":["Templates"],"summary":"List the shipped design templates","description":"Scope: `read`. The same starting points the editor offers on first run: each template's id, its sheet names, a component census by node type, and the explanatory notes it carries on canvas. Start here when the user describes a design that probably already exists (an FPGA rail set, a USB-C PD supply, a motor driver). Static files shipped with the build; `Cache-Control: private, max-age=3600`.","responses":{"200":{"description":"Every template's summary.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TemplateList"}}}},"401":{"description":"No key, a browser token instead of a key, an unknown key, or a revoked key (code KEY_REVOKED).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":{"code":"UNAUTHENTICATED","message":"Send an API key as \"Authorization: Bearer ea_live_…\"."}}}}},"403":{"description":"The key lacks a required scope (INSUFFICIENT_SCOPE) or the plan behind it no longer allows keys (PLAN_REQUIRED).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":{"code":"INSUFFICIENT_SCOPE","message":"This key does not have the \"solve\" scope.","requiredScopes":["solve"],"keyScopes":["read"]}}}}},"429":{"description":"The key's per-minute allowance is used up. `Retry-After` is set.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":{"code":"RATE_LIMITED","message":"This key allows 60 requests per minute. Retry in 23 s.","limitPerMinute":60,"retryAfterSeconds":23}}}}}}}},"/v1/templates/{id}":{"get":{"tags":["Templates"],"summary":"Read one template as a design document","description":"Scope: `read`. A schema-valid design you can solve as-is with POST /v1/designs/solve, or edit and save with POST /v1/designs.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"A template id from GET /v1/templates, e.g. `fpga_multi_rail`."}],"responses":{"200":{"description":"The template.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TemplateRecord"}}}},"401":{"description":"No key, a browser token instead of a key, an unknown key, or a revoked key (code KEY_REVOKED).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":{"code":"UNAUTHENTICATED","message":"Send an API key as \"Authorization: Bearer ea_live_…\"."}}}}},"403":{"description":"The key lacks a required scope (INSUFFICIENT_SCOPE) or the plan behind it no longer allows keys (PLAN_REQUIRED).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":{"code":"INSUFFICIENT_SCOPE","message":"This key does not have the \"solve\" scope.","requiredScopes":["solve"],"keyScopes":["read"]}}}}},"404":{"description":"No template with that id.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":{"code":"NOT_FOUND","message":"No template \"fpga\". GET /v1/templates lists the ids."}}}}},"429":{"description":"The key's per-minute allowance is used up. `Retry-After` is set.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":{"code":"RATE_LIMITED","message":"This key allows 60 requests per minute. Retry in 23 s.","limitPerMinute":60,"retryAfterSeconds":23}}}}}}}},"/v1/designs":{"get":{"tags":["Designs"],"summary":"List designs visible to this key","description":"Scope: `read`. A personal key lists the account's personal designs; a team key lists the team's.","responses":{"200":{"description":"Newest first, up to 500.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DesignList"}}}},"401":{"description":"No key, a browser token instead of a key, an unknown key, or a revoked key (code KEY_REVOKED).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":{"code":"UNAUTHENTICATED","message":"Send an API key as \"Authorization: Bearer ea_live_…\"."}}}}},"403":{"description":"The key lacks a required scope (INSUFFICIENT_SCOPE) or the plan behind it no longer allows keys (PLAN_REQUIRED).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":{"code":"INSUFFICIENT_SCOPE","message":"This key does not have the \"solve\" scope.","requiredScopes":["solve"],"keyScopes":["read"]}}}}},"429":{"description":"The key's per-minute allowance is used up. `Retry-After` is set.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":{"code":"RATE_LIMITED","message":"This key allows 60 requests per minute. Retry in 23 s.","limitPerMinute":60,"retryAfterSeconds":23}}}}}}},"post":{"tags":["Designs"],"summary":"Create a cloud design","description":"Scope: `write`. The design must validate. Send an `Idempotency-Key` header to make retries safe: the first response is replayed for 24 hours (`Idempotent-Replayed: true`).","parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","maxLength":200}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["name","design"],"properties":{"name":{"type":"string","maxLength":200},"design":{"$ref":"#/components/schemas/Design"}}}}}},"responses":{"201":{"description":"Created.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DesignCreated"}}}},"400":{"description":"VALIDATION_FAILED or INVALID_REQUEST.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":{"code":"INVALID_REQUEST","message":"name is required (1 to 200 characters).","field":"name"}}}}},"401":{"description":"No key, a browser token instead of a key, an unknown key, or a revoked key (code KEY_REVOKED).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":{"code":"UNAUTHENTICATED","message":"Send an API key as \"Authorization: Bearer ea_live_…\"."}}}}},"403":{"description":"The key lacks a required scope (INSUFFICIENT_SCOPE) or the plan behind it no longer allows keys (PLAN_REQUIRED).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":{"code":"INSUFFICIENT_SCOPE","message":"This key does not have the \"solve\" scope.","requiredScopes":["solve"],"keyScopes":["read"]}}}}},"413":{"description":"PAYLOAD_TOO_LARGE — over 500 KB.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":{"code":"PAYLOAD_TOO_LARGE","message":"Design data too large. Maximum size is 500 KB.","field":"design"}}}}},"429":{"description":"The key's per-minute allowance is used up. `Retry-After` is set.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":{"code":"RATE_LIMITED","message":"This key allows 60 requests per minute. Retry in 23 s.","limitPerMinute":60,"retryAfterSeconds":23}}}}}}}},"/v1/designs/{id}":{"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"get":{"tags":["Designs"],"summary":"Read a design","description":"Scope: `read`.","responses":{"200":{"description":"The design document and its metadata.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DesignRecord"}}}},"401":{"description":"No key, a browser token instead of a key, an unknown key, or a revoked key (code KEY_REVOKED).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":{"code":"UNAUTHENTICATED","message":"Send an API key as \"Authorization: Bearer ea_live_…\"."}}}}},"403":{"description":"The key lacks a required scope (INSUFFICIENT_SCOPE) or the plan behind it no longer allows keys (PLAN_REQUIRED).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":{"code":"INSUFFICIENT_SCOPE","message":"This key does not have the \"solve\" scope.","requiredScopes":["solve"],"keyScopes":["read"]}}}}},"404":{"description":"NOT_FOUND — no such design visible to this key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":{"code":"NOT_FOUND","message":"No design with that id is visible to this key."}}}}},"429":{"description":"The key's per-minute allowance is used up. `Retry-After` is set.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":{"code":"RATE_LIMITED","message":"This key allows 60 requests per minute. Retry in 23 s.","limitPerMinute":60,"retryAfterSeconds":23}}}}}}},"put":{"tags":["Designs"],"summary":"Replace a design (keeps history)","description":"Scope: `write`. The previous state is snapshotted into the revision history with the key's label as the author (\"via key nightly-optimizer\"), exactly as a save in the editor snapshots the state it replaces.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["design"],"properties":{"name":{"type":"string","maxLength":200},"design":{"$ref":"#/components/schemas/Design"},"message":{"type":"string","maxLength":500,"description":"A revision note."}}}}}},"responses":{"200":{"description":"Updated.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DesignUpdated"}}}},"400":{"description":"VALIDATION_FAILED or INVALID_REQUEST.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":{"code":"VALIDATION_FAILED","message":"…"}}}}},"401":{"description":"No key, a browser token instead of a key, an unknown key, or a revoked key (code KEY_REVOKED).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":{"code":"UNAUTHENTICATED","message":"Send an API key as \"Authorization: Bearer ea_live_…\"."}}}}},"403":{"description":"The key lacks a required scope (INSUFFICIENT_SCOPE) or the plan behind it no longer allows keys (PLAN_REQUIRED).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":{"code":"INSUFFICIENT_SCOPE","message":"This key does not have the \"solve\" scope.","requiredScopes":["solve"],"keyScopes":["read"]}}}}},"404":{"description":"NOT_FOUND.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":{"code":"NOT_FOUND","message":"No design with that id is visible to this key."}}}}},"413":{"description":"PAYLOAD_TOO_LARGE.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":{"code":"PAYLOAD_TOO_LARGE","message":"Design data too large. Maximum size is 500 KB."}}}}},"429":{"description":"The key's per-minute allowance is used up. `Retry-After` is set.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":{"code":"RATE_LIMITED","message":"This key allows 60 requests per minute. Retry in 23 s.","limitPerMinute":60,"retryAfterSeconds":23}}}}}}},"delete":{"tags":["Designs"],"summary":"Delete a design","description":"Scope: `write`.","responses":{"200":{"description":"Deleted.","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"deleted":{"type":"boolean"}}}}}},"401":{"description":"No key, a browser token instead of a key, an unknown key, or a revoked key (code KEY_REVOKED).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":{"code":"UNAUTHENTICATED","message":"Send an API key as \"Authorization: Bearer ea_live_…\"."}}}}},"403":{"description":"The key lacks a required scope (INSUFFICIENT_SCOPE) or the plan behind it no longer allows keys (PLAN_REQUIRED).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":{"code":"INSUFFICIENT_SCOPE","message":"This key does not have the \"solve\" scope.","requiredScopes":["solve"],"keyScopes":["read"]}}}}},"404":{"description":"NOT_FOUND.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":{"code":"NOT_FOUND","message":"No design with that id is visible to this key."}}}}},"429":{"description":"The key's per-minute allowance is used up. `Retry-After` is set.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":{"code":"RATE_LIMITED","message":"This key allows 60 requests per minute. Retry in 23 s.","limitPerMinute":60,"retryAfterSeconds":23}}}}}}}},"/v1/designs/{id}/share":{"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"post":{"tags":["Designs"],"summary":"Create or update the public share link","description":"Scope: `write`. The same expiring link the editor's Share dialog makes; one public link per design, updated in place.","requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"permissions":{"type":"string","enum":["view","edit","clone"],"default":"view"},"expiresInDays":{"type":"integer","enum":[1,7,30,90],"description":"Omit or null for a link that never expires."}}}}}},"responses":{"200":{"description":"The link.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ShareLink"}}}},"400":{"description":"INVALID_REQUEST.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":{"code":"INVALID_REQUEST","message":"expiresInDays must be one of 1, 7, 30, 90, or omitted for a link that does not expire.","field":"expiresInDays"}}}}},"401":{"description":"No key, a browser token instead of a key, an unknown key, or a revoked key (code KEY_REVOKED).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":{"code":"UNAUTHENTICATED","message":"Send an API key as \"Authorization: Bearer ea_live_…\"."}}}}},"403":{"description":"The key lacks a required scope (INSUFFICIENT_SCOPE) or the plan behind it no longer allows keys (PLAN_REQUIRED).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":{"code":"INSUFFICIENT_SCOPE","message":"This key does not have the \"solve\" scope.","requiredScopes":["solve"],"keyScopes":["read"]}}}}},"404":{"description":"NOT_FOUND.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":{"code":"NOT_FOUND","message":"No design with that id is visible to this key."}}}}},"429":{"description":"The key's per-minute allowance is used up. `Retry-After` is set.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":{"code":"RATE_LIMITED","message":"This key allows 60 requests per minute. Retry in 23 s.","limitPerMinute":60,"retryAfterSeconds":23}}}}}}}},"/v1/designs/{id}/exports":{"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"post":{"tags":["Exports"],"summary":"Export the bill of materials or the design JSON","description":"Scope: `export`. Returns the document inline. `bom_json` and `bom_csv` list every part-bearing node with designator, type, nameplate value, MPN, manufacturer, package and DigiKey part number. `pdf`, `mc_report`, `derating_report` and `dossier` are rendered by the editor and return 501 EXPORT_TYPE_UNAVAILABLE here.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["type"],"properties":{"type":{"type":"string","enum":["bom_json","bom_csv","design_json","pdf","mc_report","derating_report","dossier"]}}}}}},"responses":{"200":{"description":"The export.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Export"}}}},"400":{"description":"INVALID_REQUEST — unknown type.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":{"code":"INVALID_REQUEST","message":"type must be one of bom_json, bom_csv, design_json.","field":"type"}}}}},"401":{"description":"No key, a browser token instead of a key, an unknown key, or a revoked key (code KEY_REVOKED).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":{"code":"UNAUTHENTICATED","message":"Send an API key as \"Authorization: Bearer ea_live_…\"."}}}}},"403":{"description":"The key lacks a required scope (INSUFFICIENT_SCOPE) or the plan behind it no longer allows keys (PLAN_REQUIRED).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":{"code":"INSUFFICIENT_SCOPE","message":"This key does not have the \"solve\" scope.","requiredScopes":["solve"],"keyScopes":["read"]}}}}},"404":{"description":"NOT_FOUND.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":{"code":"NOT_FOUND","message":"No design with that id is visible to this key."}}}}},"429":{"description":"The key's per-minute allowance is used up. `Retry-After` is set.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":{"code":"RATE_LIMITED","message":"This key allows 60 requests per minute. Retry in 23 s.","limitPerMinute":60,"retryAfterSeconds":23}}}}},"501":{"description":"EXPORT_TYPE_UNAVAILABLE — an editor-rendered type.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":{"code":"EXPORT_TYPE_UNAVAILABLE","message":"\"pdf\" is rendered by the editor and has no server-side renderer yet.","field":"type","available":["bom_json","bom_csv","design_json"]}}}}}}}},"/v1/ai/explain":{"post":{"tags":["AI"],"summary":"Explain a design or a solve result in plain English","description":"Scope: `ai`. Decrements the monthly AI-analysis counter (Pro 25, Team 100; an account with its own AI key is not metered). Mode `explain`. Send the design, or a solve result for a richer answer.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","description":"The design (or a solve result) to analyse.","properties":{"design":{"$ref":"#/components/schemas/Design"},"options":{"type":"object","properties":{}}},"required":["design"]}}}},"responses":{"200":{"description":"Summary and suggestions.","content":{"application/json":{"schema":{"type":"object","properties":{"summary":{"type":"string"},"suggestions":{"type":"array","items":{"type":"object"}},"remaining":{},"limit":{},"model":{"type":"string"},"cached":{"type":"boolean"}}}}}},"400":{"description":"INVALID_REQUEST.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":{"code":"INVALID_REQUEST","message":"Send { design } — the design document, or a solve result for a richer explanation.","field":"design"}}}}},"401":{"description":"No key, a browser token instead of a key, an unknown key, or a revoked key (code KEY_REVOKED).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":{"code":"UNAUTHENTICATED","message":"Send an API key as \"Authorization: Bearer ea_live_…\"."}}}}},"402":{"description":"QUOTA_EXHAUSTED.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":{"code":"QUOTA_EXHAUSTED","message":"The monthly ai calls quota for this account is used up (25/25). It resets on 2026-10-01.","feature":"ai_calls","limit":25,"used":25,"resetsAt":"2026-10-01T00:00:00.000Z"}}}}},"403":{"description":"The key lacks a required scope (INSUFFICIENT_SCOPE) or the plan behind it no longer allows keys (PLAN_REQUIRED).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":{"code":"INSUFFICIENT_SCOPE","message":"This key does not have the \"solve\" scope.","requiredScopes":["solve"],"keyScopes":["read"]}}}}},"429":{"description":"The key's per-minute allowance is used up. `Retry-After` is set.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":{"code":"RATE_LIMITED","message":"This key allows 60 requests per minute. Retry in 23 s.","limitPerMinute":60,"retryAfterSeconds":23}}}}},"503":{"description":"SERVICE_UNAVAILABLE — AI is not configured on this deployment.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":{"code":"SERVICE_UNAVAILABLE","message":"AI analysis is not currently available."}}}}}}}},"/v1/ai/suggest":{"post":{"tags":["AI"],"summary":"Suggest architectural improvements","description":"Scope: `ai`. Decrements the monthly AI-analysis counter (Pro 25, Team 100; an account with its own AI key is not metered). Mode `suggest`. Send the design, or a solve result for a richer answer.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","description":"The design (or a solve result) to analyse.","properties":{"design":{"$ref":"#/components/schemas/Design"},"options":{"type":"object","properties":{}}},"required":["design"]}}}},"responses":{"200":{"description":"Summary and suggestions.","content":{"application/json":{"schema":{"type":"object","properties":{"summary":{"type":"string"},"suggestions":{"type":"array","items":{"type":"object"}},"remaining":{},"limit":{},"model":{"type":"string"},"cached":{"type":"boolean"}}}}}},"400":{"description":"INVALID_REQUEST.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":{"code":"INVALID_REQUEST","message":"Send { design } — the design document, or a solve result for a richer explanation.","field":"design"}}}}},"401":{"description":"No key, a browser token instead of a key, an unknown key, or a revoked key (code KEY_REVOKED).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":{"code":"UNAUTHENTICATED","message":"Send an API key as \"Authorization: Bearer ea_live_…\"."}}}}},"402":{"description":"QUOTA_EXHAUSTED.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":{"code":"QUOTA_EXHAUSTED","message":"The monthly ai calls quota for this account is used up (25/25). It resets on 2026-10-01.","feature":"ai_calls","limit":25,"used":25,"resetsAt":"2026-10-01T00:00:00.000Z"}}}}},"403":{"description":"The key lacks a required scope (INSUFFICIENT_SCOPE) or the plan behind it no longer allows keys (PLAN_REQUIRED).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":{"code":"INSUFFICIENT_SCOPE","message":"This key does not have the \"solve\" scope.","requiredScopes":["solve"],"keyScopes":["read"]}}}}},"429":{"description":"The key's per-minute allowance is used up. `Retry-After` is set.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":{"code":"RATE_LIMITED","message":"This key allows 60 requests per minute. Retry in 23 s.","limitPerMinute":60,"retryAfterSeconds":23}}}}},"503":{"description":"SERVICE_UNAVAILABLE — AI is not configured on this deployment.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":{"code":"SERVICE_UNAVAILABLE","message":"AI analysis is not currently available."}}}}}}}},"/v1/ai/synthesize":{"post":{"tags":["AI"],"summary":"Generate a design from a plain-English brief","description":"Scope: `ai`. Decrements the monthly synthesis counter (Pro 5, Team 15; an account with its own AI key is not metered). Returns the generated design, already solved, with the same disclaimer the editor shows.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["prompt"],"properties":{"prompt":{"type":"string","maxLength":5000},"conversationHistory":{"type":"array","items":{"type":"object"}}}}}}},"responses":{"200":{"description":"The generated design and its solve.","content":{"application/json":{"schema":{"type":"object","properties":{"designJson":{"type":"object"},"simulationResults":{"type":"object"},"componentCount":{"type":"integer"},"connectionCount":{"type":"integer"},"remaining":{},"disclaimer":{"type":"string"}}}}}},"400":{"description":"INVALID_REQUEST.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":{"code":"INVALID_REQUEST","message":"prompt is required: describe the power tree in plain English.","field":"prompt"}}}}},"401":{"description":"No key, a browser token instead of a key, an unknown key, or a revoked key (code KEY_REVOKED).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":{"code":"UNAUTHENTICATED","message":"Send an API key as \"Authorization: Bearer ea_live_…\"."}}}}},"402":{"description":"QUOTA_EXHAUSTED.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":{"code":"QUOTA_EXHAUSTED","message":"The monthly synthesis calls quota for this account is used up (5/5). It resets on 2026-10-01.","feature":"synthesis_calls","limit":5,"used":5,"resetsAt":"2026-10-01T00:00:00.000Z"}}}}},"403":{"description":"The key lacks a required scope (INSUFFICIENT_SCOPE) or the plan behind it no longer allows keys (PLAN_REQUIRED).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":{"code":"INSUFFICIENT_SCOPE","message":"This key does not have the \"solve\" scope.","requiredScopes":["solve"],"keyScopes":["read"]}}}}},"422":{"description":"UNPROCESSABLE — the model returned an unusable design; retry or rephrase.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":{"code":"UNPROCESSABLE","message":"AI generated a design with schema errors. Please try again.","retryable":true}}}}},"429":{"description":"The key's per-minute allowance is used up. `Retry-After` is set.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":{"code":"RATE_LIMITED","message":"This key allows 60 requests per minute. Retry in 23 s.","limitPerMinute":60,"retryAfterSeconds":23}}}}},"502":{"description":"UPSTREAM_UNAVAILABLE — the model call failed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":{"code":"UPSTREAM_UNAVAILABLE","message":"AI generation failed: …","retryable":true}}}}}}}}},"components":{"securitySchemes":{"apiKey":{"type":"http","scheme":"bearer","bearerFormat":"ea_live_…","description":"An API key from Account → Developer in the editor. Pro and Team plans."}},"schemas":{"Design":{"$ref":"https://electronics-architect.com/schema/design-v1.json","description":"Design schema v1, generated from the attribute registry and published at https://electronics-architect.com/schema/design-v1.json."},"Error":{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string","description":"Stable identifier. Branch on this, not on the message."},"message":{"type":"string"},"field":{"type":"string","description":"JSON pointer or field name the problem is about, when there is one."}},"additionalProperties":true}}},"ValidationError":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}}},"ValidationResult":{"type":"object","properties":{"valid":{"type":"boolean"},"schemaVersion":{"type":"integer"},"schema":{"type":"string"},"errors":{"type":"array","items":{"$ref":"#/components/schemas/ValidationError"}},"counts":{"type":"object","properties":{"sheets":{"type":"integer"},"nodes":{"type":"integer"},"connections":{"type":"integer"}}}}},"Warning":{"type":"object","description":"One solver warning. `code` is the stable key; `remedy` says what to change.","properties":{"code":{"type":"string"},"type":{"type":"string"},"level":{"type":"string","enum":["info","caution","warning","critical"]},"label":{"type":"string"},"message":{"type":"string"},"remedy":{"type":"string"},"nodeId":{"type":"string"},"nodeName":{"type":"string"},"details":{"type":"object"}}},"SheetResult":{"type":"object","description":"One sheet's solve: per-node results, warnings and summary. `converged` is the solver's own verdict — read it, never infer it from the absence of `error`.","properties":{"converged":{"type":"boolean"},"iterations":{"type":"integer"},"error":{"type":"string"},"nodes":{"type":"array","items":{"type":"object"}},"warnings":{"type":"array","items":{"$ref":"#/components/schemas/Warning"}},"summary":{"type":"object"}}},"SolveResult":{"type":"object","properties":{"version":{"type":"string"},"simulatedAt":{"type":"string","format":"date-time"},"elapsedMs":{"type":"number"},"toleranceMode":{"type":"string"},"sheets":{"type":"array","items":{"$ref":"#/components/schemas/SheetResult"}}}},"SolveResponse":{"type":"object","properties":{"result":{"$ref":"#/components/schemas/SolveResult"},"meta":{"type":"object","properties":{"schemaVersion":{"type":"integer"},"corner":{"type":"string"},"nodes":{"type":"integer"},"sheets":{"type":"integer"},"elapsedMs":{"type":"number"},"metered":{"type":"boolean"}}}}},"MonteCarloResponse":{"type":"object","properties":{"result":{"type":"object","description":"trials[], summary, seed, trialCount, failedTrials — the same shape the editor's Monte Carlo panel reads.","properties":{"trials":{"type":"array","items":{"type":"object"}},"summary":{"type":"object"},"seed":{"type":"integer"},"trialCount":{"type":"integer"},"failedTrials":{"type":"integer"}}},"meta":{"type":"object","properties":{"trials":{"type":"integer"},"requestedTrials":{"type":"integer"},"clamped":{"type":"boolean"},"clampedBy":{"type":["string","null"]},"seed":{"type":"integer"},"elapsedMs":{"type":"number"},"metered":{"type":"boolean"},"feature":{"type":"string"}}}}},"TemplateSummary":{"type":"object","properties":{"id":{"type":"string"},"sheets":{"type":"array","items":{"type":"string"},"description":"Sheet names."},"nodes":{"type":"integer"},"componentCounts":{"type":"object","additionalProperties":{"type":"integer"},"description":"Node count by type, e.g. { \"SMPS\": 3, \"Load\": 3 }."},"notes":{"type":"array","items":{"type":"string"},"description":"The explanatory text the template carries on canvas."},"url":{"type":"string","description":"Where to read the document: /v1/templates/{id}."}}},"TemplateList":{"type":"object","properties":{"count":{"type":"integer"},"schema":{"type":"string","description":"The design schema every template validates against."},"templates":{"type":"array","items":{"$ref":"#/components/schemas/TemplateSummary"}}}},"PartModel":{"type":"object","description":"A parametric model the library stands behind: identity (mpn, manufacturer, type, package, notes, grade, datasheetUrl) plus `properties` — the node's FULL property set with the library's values applied by the same routine the editor's part picker uses (an SMPS's single typical efficiency becomes the three handles), `provenance` — for each key the library supplied, what stands behind it (`curated`, `datasheet_extracted`, `community`, `admin`, or `verified` when a person verified it), and `filledFromDefaults` — the property keys the library did NOT supply, which are registry defaults, not datasheet figures. Copy `properties` into a node of that `type`; check `filledFromDefaults` before trusting a number the datasheet should have given.","properties":{"mpn":{"type":"string"},"manufacturer":{"type":"string"},"type":{"type":"string","description":"The node type this model fills, e.g. `SMPS`."},"package":{"type":"string"},"notes":{"type":"string"},"grade":{"type":"string"},"datasheetUrl":{"type":"string"},"source":{"type":"string","enum":["library"]},"properties":{"type":"object","additionalProperties":true,"description":"The complete, schema-valid property block for a node of this type, SI base units."},"provenance":{"type":"object","additionalProperties":{"type":"string"},"description":"Per supplied key: curated | datasheet_extracted | community | admin | verified."},"filledFromDefaults":{"type":"array","items":{"type":"string"},"description":"Property keys the library did not supply."},"updatedAt":{"type":["string","null"]}}},"PartModelList":{"type":"object","properties":{"count":{"type":"integer"},"type":{"type":["string","null"],"description":"The filter applied, or null for every model."},"types":{"type":"array","items":{"type":"string"},"description":"Every node type the library has models for."},"note":{"type":"string"},"parts":{"type":"array","items":{"$ref":"#/components/schemas/PartModel"}}}},"TemplateRecord":{"type":"object","properties":{"id":{"type":"string"},"design":{"$ref":"#/components/schemas/Design"},"counts":{"type":"object","properties":{"sheets":{"type":"integer"},"nodes":{"type":"integer"}}}}},"DesignSummary":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}}},"DesignList":{"type":"object","properties":{"designs":{"type":"array","items":{"$ref":"#/components/schemas/DesignSummary"}},"scope":{"type":"object"}}},"DesignRecord":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"design":{"$ref":"#/components/schemas/Design"},"revisions":{"type":"integer"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}}},"DesignCreated":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"version":{"type":"integer"},"createdAt":{"type":"string","format":"date-time"},"editorUrl":{"type":"string","description":"Where a person opens it: My Designs (or Team Designs) in the editor."}}},"DesignUpdated":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"version":{"type":"integer"},"updatedAt":{"type":"string","format":"date-time"},"revisionAuthor":{"type":"string"}}},"ShareLink":{"type":"object","properties":{"shareId":{"type":"string"},"url":{"type":"string"},"permissions":{"type":"string"},"expiresInDays":{"type":["integer","null"]},"expiresAt":{"type":["string","null"],"format":"date-time"}}},"BomRow":{"type":"object","properties":{"designator":{"type":"string"},"type":{"type":"string"},"value":{"type":"string","description":"Nameplate value (what you order), not the solved rail."},"mpn":{"type":"string"},"manufacturer":{"type":"string"},"package":{"type":"string"},"digikeyPartNumber":{"type":"string"},"quantity":{"type":"integer"},"sheet":{"type":"string"}}},"Export":{"type":"object","properties":{"type":{"type":"string"},"filename":{"type":"string"},"contentType":{"type":"string"},"generatedAt":{"type":"string","format":"date-time"},"content":{"description":"A CSV string for bom_csv; an object for bom_json ({design, generatedAt, lineItems, rows[]}) and design_json."}}},"Usage":{"type":"object","properties":{"used":{"type":"integer"},"limit":{"type":["integer","null"]},"unlimited":{"type":"boolean"},"resetsAt":{"type":"string","format":"date-time"}}},"Me":{"type":"object","properties":{"key":{"type":"object","properties":{"id":{"type":"string"},"label":{"type":"string"},"scopes":{"type":"array","items":{"type":"string","enum":["read","write","solve","export","parts","ai"]}},"rateLimitPerMin":{"type":"integer"},"teamId":{"type":["string","null"]}}},"account":{"type":"object","properties":{"tier":{"type":"string","enum":["pro","team"]}}},"usage":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/Usage"}},"solve":{"type":"object"}}}}}}