MakerPortal Optics Resonator API

The Optics Resonator API from MakerPortal — 1 operation(s) for optics resonator.

GitHub OpenAPI

Operations 1

GET /api/v1/optics-resonator Solve a two-mirror laser cavity: g-parameters, stability, and the TEM00 waist… #

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/makerportal-ai:makerportal-ai-optics-resonator-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. By signing up you are subscribing to the APIs.io and API Evangelist newsletters — you can unsubscribe from any issue. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

makerportal-ai-optics-resonator-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: MakerPortal compute Optics Resonator API
  version: 1.0.0
  summary: Deterministic engineering solvers — the same functions that render the published pages.
  description: 'Three solvers, exposed as GET endpoints. Every one is the *identical function* that renders the corresponding page on makerportal.ai, assigned by reference in a single registry, so an answer here and an answer on the page cannot disagree.


    There is no market-data relay and no model proxy behind any of these — they are own-solver computation only, and no request leaves the function.


    Every response carries `provenance.canonicalUrl`: the published page for exactly these inputs when one exists, and the lane hub when the inputs are off the published grid.


    Numbers that are not finite are encoded as the strings "Infinity", "-Infinity" and "NaN". These are real answers, not error states: a notch is −∞ dB at its centre frequency and a low-pass is −∞ dB at Nyquist. JSON has no numeric literal for them and `null` would be a different claim, so a string sentinel is the only encoding that does not lose the answer.'
  license:
    name: Free with attribution
    url: https://makerportal.ai/terms
  contact:
    url: https://makerportal.ai/contact
servers:
- url: https://makerportal.ai
tags:
- name: Optics Resonator
paths:
  /api/v1/optics-resonator:
    get:
      operationId: opticsResonator
      summary: 'Solve a two-mirror laser cavity: g-parameters, stability, and the TEM00 waist…'
      description: 'The identical function behind the worked examples on /lab/optics-bench, built from the resonator code the bench runs. Give the mirror spacing `l` (cm), each mirror radius `r1`, `r2` (cm; positive is concave toward the cavity, negative convex, omitted means flat) and the wavelength `w` (nm). Returns g1, g2, their product, the round-trip half-trace and whether the cavity is stable; when it is, `mode` holds the waist radius (um), its distance from mirror 1 (cm) and the spot radius on each mirror (mm). `mode` is null for an unstable cavity or one on the g1*g2 = 0 or 1 boundary.


        Numbers that are not finite are encoded as the strings "Infinity", "-Infinity" and "NaN". These are real answers, not error states: a notch is −∞ dB at its centre frequency and a low-pass is −∞ dB at Nyquist. JSON has no numeric literal for them and `null` would be a different claim, so a string sentinel is the only encoding that does not lose the answer.'
      parameters:
      - name: l
        in: query
        required: true
        description: Mirror spacing (cavity length), centimetres.
        schema:
          type: number
          minimum: 0.1
          maximum: 10000
      - name: r1
        in: query
        required: false
        description: Radius of curvature of mirror 1, cm. Positive = concave toward the cavity, negative = convex. Omit for a flat mirror.
        schema:
          type: number
          minimum: -100000
          maximum: 100000
      - name: r2
        in: query
        required: false
        description: Radius of curvature of mirror 2, cm, same convention. Omit for a flat mirror.
        schema:
          type: number
          minimum: -100000
          maximum: 100000
      - name: w
        in: query
        required: true
        description: Wavelength, nanometres.
        schema:
          type: number
          minimum: 100
          maximum: 20000
      responses:
        '200':
          description: A solved answer, with provenance.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SolverEnvelope'
              example:
                inputs:
                  lengthCm: 30
                  r1Cm: 40
                  r2Cm: 40
                  wavelengthNm: 632.8
                result:
                  lengthCm: 30
                  r1Cm: 40
                  r2Cm: 40
                  wavelengthNm: 632.8
                  g1: 0.2500000000000001
                  g2: 0.2500000000000001
                  g1g2: 0.06250000000000006
                  roundTripHalfTrace: -0.875
                  stable: true
                  mode:
                    waistRadiusUm: 197.49955245572508
                    waistFromMirror1Cm: 14.999999999999996
                    mirror1SpotMm: 0.24981936904959695
                    mirror2SpotMm: 0.24981936904959695
                provenance:
                  method: 'Two-mirror resonator: g_i = 1 - L/R_i, stable when 0 < g1*g2 < 1. The TEM00 mode is the self-consistent Gaussian of the round trip: w0^2 = (L*lambda/pi)*sqrt(g1*g2*(1-g1*g2))/|g1 + g2 - 2*g1*g2|, mirror spots w_i^2 = (L*lambda/pi)*sqrt(g_j/(g_i*(1-g1*g2))), waist at z1 = L*g2*(1-g1)/(g1 + g2 - 2*g1*g2) from mirror 1. Ideal spherical mirrors, empty cavity, paraxial. Checked against the symmetric and plano-concave closed forms in the site test suite. Pure mathematics - nothing is fetched and nothing is recalled.'
                  canonicalUrl: https://makerportal.ai/lab/optics-bench
                license: free-with-attribution
        '400':
          description: A parameter was missing, unparseable or out of range — or the query named a parameter or include block this endpoint does not declare, or gave one twice. Never a 500.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '429':
          description: 'Best-effort per-instance rate limit. Not a quota: there is no shared counter, and identical requests are served from the CDN without reaching a function at all.'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      tags:
      - Optics Resonator
components:
  schemas:
    SolverEnvelope:
      type: object
      required:
      - inputs
      - result
      - provenance
      - license
      properties:
        inputs:
          type: object
          description: The parsed inputs, echoed back with defaults filled in.
        result:
          type: object
          description: The solved analysis. Shape is per-endpoint; see the example.
        provenance:
          type: object
          required:
          - method
          - canonicalUrl
          properties:
            method:
              type: string
              description: How the answer was computed, and what its inputs are.
            canonicalUrl:
              type: string
              format: uri
              description: The published page for these exact inputs, or the lane hub when they are off-grid.
        license:
          type: string
          enum:
          - free-with-attribution
    Error:
      type: object
      required:
      - error
      - parameter
      properties:
        error:
          type: string
          description: A sentence naming what was wrong.
        parameter:
          type: string
          description: The query parameter at fault.
        valid:
          type:
          - array
          - 'null'
          items:
            type: string
          description: Every accepted value, when the parameter is an enumeration. Null otherwise.