MakerPortal Port Length API

The Port Length API from MakerPortal — 1 operation(s) for port length.

GitHub OpenAPI

Operations 1

GET /api/v1/port-length Solve a vented loudspeaker box for the length of round port to cut, with both… #

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-port-length-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-port-length-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: MakerPortal compute Port Length 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: Port Length
paths:
  /api/v1/port-length:
    get:
      operationId: portLength
      summary: Solve a vented loudspeaker box for the length of round port to cut, with both…
      description: 'The identical function behind the worked examples on /lab/port-length-calculator and the calculator itself. Give the net box volume `vol` (litres), the port inside diameter `dia` (cm) and the tuning `fb` (Hz); `temp` (deg C, default 20) sets the speed of sound. Returns the length to cut (cm), the acoustic length and the end correction it contains, the port area, length/diameter, the air volume the port displaces, and the smallest diameter that can reach the tuning. When the port is too narrow, `tooNarrow` is true and `cutLengthCm` is negative: the end corrections alone already exceed the acoustic length the tuning needs. Add `sd` (cone area, cm^2) and `xmax` (peak excursion, mm) together for the peak port air speed.


        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: vol
        in: query
        required: true
        description: Net internal box volume, litres (after the driver, bracing and port are subtracted).
        schema:
          type: number
          minimum: 0.1
          maximum: 100000
      - name: dia
        in: query
        required: true
        description: Inside diameter of a round port, centimetres. For a slot, the diameter of the round port of equal area, 2*sqrt(w*h/pi).
        schema:
          type: number
          minimum: 0.1
          maximum: 200
      - name: fb
        in: query
        required: true
        description: Box tuning frequency, hertz.
        schema:
          type: number
          minimum: 1
          maximum: 500
      - name: temp
        in: query
        required: false
        description: Air temperature, deg C. Default 20.
        schema:
          type: number
          minimum: -50
          maximum: 60
      - name: sd
        in: query
        required: false
        description: Driver effective cone area Sd, cm^2. Give with `xmax` for the peak port air speed.
        schema:
          type: number
          minimum: 1
          maximum: 20000
      - name: xmax
        in: query
        required: false
        description: Driver peak one-way excursion, mm. Give with `sd`.
        schema:
          type: number
          minimum: 0.1
          maximum: 100
      responses:
        '200':
          description: A solved answer, with provenance.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SolverEnvelope'
              example:
                inputs:
                  boxVolumeL: 50
                  portDiameterCm: 10
                  tuningHz: 32
                  tempC: 20
                  coneAreaCm2: 520
                  peakExcursionMm: 12
                result:
                  tempC: 20
                  speedOfSoundMs: 343.21462268256795
                  portAreaCm2: 78.53981633974483
                  endCorrectionCm: 7.3165
                  acousticLengthCm: 45.771142084681586
                  cutLengthCm: 38.45464208468158
                  tooNarrow: false
                  verdict: Buildable
                  minDiameterCm: 1.5984962722720972
                  lengthToDiameter: 3.845464208468158
                  portVolumeL: 3.020220526741514
                  peakVelocityMs: 15.974399999999997
                  machFraction: 0.04654347147316735
                provenance:
                  method: 'Helmholtz resonance of the box (cavity) and port (neck), solved for length: acoustic length S/(k^2*Vb) with k = 2*pi*fb/c, minus the end corrections of both port ends, 0.85*r for the outer end flush with the baffle and 0.6133*r for the inner end free in the box (1.4633*r, the 0.732*D of vented-box port formulas; r = sqrt(S/pi)). c = 331.3*sqrt(1 + T/273.15). The smallest diameter that reaches the tuning is d_min = 8*pi*1.4633*fb^2*Vb/c^2. Peak port air speed = (Sd/S)*xmax*2*pi*fb. Straight round port of constant diameter in a rigid box; no flare, no slot outline, no stuffing. Checked in the site test suite against the resonance run backwards from the cut length and against the 0.732*D literature form. Pure mathematics - nothing is fetched and nothing is recalled.'
                  canonicalUrl: https://makerportal.ai/lab/port-length-calculator
                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:
      - Port Length
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.