MakerPortal Solenoid Field API

The Solenoid Field API from MakerPortal — 1 operation(s) for solenoid field.

GitHub OpenAPI

Operations 1

GET /api/v1/solenoid-field Solve the on-axis magnetic field of an air-core solenoid #

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-solenoid-field-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-solenoid-field-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: MakerPortal compute Solenoid Field 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: Solenoid Field
paths:
  /api/v1/solenoid-field:
    get:
      operationId: solenoidField
      summary: Solve the on-axis magnetic field of an air-core solenoid
      description: 'The identical function behind the /lab/solenoid table. Returns the centre field per amp-turn and at the requested turns and current, the on-axis profile out to three half-lengths, the span over which the field holds to within 1% and 5% of its centre value, the field at the coil mouth as a fraction of the centre, how far the infinite-solenoid shortcut mu0*n*I overstates the answer, and the turn count below which the closed form should not be used on this geometry. Dimensions are in millimetres. The field is exactly linear in turns x current, so only that product changes the answer.


        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: diameter
        in: query
        required: true
        description: Mean winding diameter in millimetres.
        schema:
          type: number
          minimum: 0.1
          maximum: 2000
      - name: length
        in: query
        required: true
        description: Winding length along the axis, in millimetres.
        schema:
          type: number
          minimum: 0.1
          maximum: 5000
      - name: turns
        in: query
        required: false
        description: Number of turns. Defaults to 1, which is what the published pages state (their figures are per amp-turn). The field is exactly linear in turns x current.
        schema:
          type: integer
          minimum: 1
          maximum: 1000000
          default: 1
      - name: current
        in: query
        required: false
        description: Winding current in amperes. Defaults to 1. Only the product of turns and current changes the answer.
        schema:
          type: number
          minimum: 1.0e-06
          maximum: 10000
          default: 1
      responses:
        '200':
          description: A solved answer, with provenance.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SolverEnvelope'
              example:
                inputs:
                  diameterMm: 25
                  lengthMm: 100
                  turns: 1
                  currentA: 1
                  slug: 25x100mm
                result:
                  spec:
                    diameterMm: 25
                    lengthMm: 100
                  turns: 1
                  currentA: 1
                  ampTurns: 1
                  dims:
                    diameterM: 0.025
                    lengthM: 0.1
                    radiusM: 0.0125
                  aspectRatio: 4
                  centreFieldT: 1.2191170205567238e-05
                  centreFieldPerAmpTurnT: 1.2191170205567238e-05
                  infiniteApproxPerAmpTurnT: 1.2566370614359172e-05
                  infiniteOverstatement: 0.030776406404415146
                  endFieldRatio: 0.5114083119567588
                  uniformSpans:
                  - tolerance: 0.01
                    spanMm: 32.165207824350354
                    fractionOfLength: 0.3216520782435035
                  - tolerance: 0.05
                    spanMm: 58.704366536070275
                    fractionOfLength: 0.5870436653607027
                  profile:
                  - zMm: 0
                    fieldT: 1.2191170205567236e-05
                    ofCentre: 0.9999999999999999
                    isMouth: false
                  - zMm: 12.5
                    fieldT: 1.212192305348308e-05
                    ofCentre: 0.9943198929293485
                    isMouth: false
                  - zMm: 25
                    fieldT: 1.1817547594145925e-05
                    ofCentre: 0.9693530149180679
                    isMouth: false
                  - zMm: 37.50000000000001
                    fieldT: 1.0662919051580076e-05
                    ofCentre: 0.8746427842267949
                    isMouth: false
                  - zMm: 50
                    fieldT: 6.234665775606674e-06
                    ofCentre: 0.5114083119567588
                    isMouth: true
                  - zMm: 75.00000000000001
                    fieldT: 6.32151268792083e-07
                    ofCentre: 0.05185320671705525
                    isMouth: false
                  - zMm: 100
                    fieldT: 1.6589656335274912e-07
                    ofCentre: 0.013607927750610073
                    isMouth: false
                  - zMm: 150.00000000000003
                    fieldT: 3.628352130971204e-08
                    ofCentre: 0.0029762131688673126
                    isMouth: false
                  workingPoints:
                  - ampTurns: 100
                    fieldT: 0.0012191170205567239
                  - ampTurns: 500
                    fieldT: 0.006095585102783619
                  - ampTurns: 1000
                    fieldT: 0.012191170205567238
                  - ampTurns: 5000
                    fieldT: 0.06095585102783619
                  sheetFloor:
                    turns: 9
                    relativeErrorAtFloor: 0.006487905915032137
                    verifiedTo: 27
                  mirror:
                    diameterMm: 100
                    lengthMm: 25
                provenance:
                  method: Current-sheet solenoid solved in closed form, B(z) = (mu0*n*I/2)*[(L/2-z)/sqrt(R^2+(L/2-z)^2) + (L/2+z)/sqrt(R^2+(L/2+z)^2)], which at the centre reduces to mu0*N*I/sqrt(L^2+D^2). Air core (mu_r = 1), single layer, on-axis only. The turn-count floor below which the closed form is more than 1% from a real discrete winding is measured against an independent Biot-Savart sum over the individual turns, not against a rearrangement of the same formula. Pure mathematics - nothing is fetched and nothing is recalled.
                  canonicalUrl: https://makerportal.ai/lab/solenoid
                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:
      - Solenoid Field
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.