WritersLogic Verifiable AI Agent Hub Electrical Calc API

The Electrical Calc API from WritersLogic Verifiable AI Agent Hub — 1 operation(s) for electrical calc.

GitHub OpenAPI

Operations 1

POST /api/v1/electrical-calc Electrical arithmetic and resistor colour codes #

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/writerslogic-com:writerslogic-com-electrical-calc-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. See our Privacy Policy and Terms.

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

OpenAPI Specification

writerslogic-com-electrical-calc-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: WritersLogic Verifiable AI Agent Hub Electrical Calc API
  version: 2.0.0
  description: Pay-per-call agents settled in USDC on Base via x402. Every response carries a signed provenance envelope.
  contact:
    name: WritersLogic
    url: https://writerslogic.com/agents
    email: agents@writerslogic.com
servers:
- url: https://agents.writerslogic.com
tags:
- name: Electrical Calc
paths:
  /api/v1/electrical-calc:
    post:
      operationId: electrical_calc
      summary: Electrical arithmetic and resistor colour codes
      description: 'Computes Ohm''s law and power from any two of V, I, R, P; series and parallel resistance with optional tolerance bounds; a voltage divider (with optional load); an LED series resistor rounded up to a preferred E-series value; conductor voltage drop from a caller-supplied resistivity; decodes or encodes 3 to 6 band IEC 60062 resistor colour codes; and tests whether a value is an official E3 to E192 value. For engineers and agents checking a circuit number before acting on it. It does not simulate AC, reactive or non-linear circuits, choose a part by power rating or look up a material''s resistivity. Exact decimal arithmetic. An optional claim map (output name to number, with a percent tolerance) turns it into a pass/fail check.


        Price: 0.005 USDC on Base (x402).'
      x-x402-price-usdc: '0.005'
      x-x402-amount: '5000'
      x-payment-info:
        protocols:
        - x402
        price:
          mode: fixed
          currency: USD
          amount: '0.005'
      x-audience: business
      x-sample-url: https://agents.writerslogic.com/api/v1/samples/electrical-calc
      security:
      - x402: []
      - apiKey: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              additionalProperties: false
              required:
              - op
              properties:
                op:
                  type: string
                  enum:
                  - ohm
                  - series
                  - parallel
                  - divider
                  - led-resistor
                  - line-drop
                  - colour-decode
                  - colour-encode
                  - e-series
                  description: ohm | series | parallel | divider | led-resistor | line-drop | colour-decode | colour-encode | e-series.
                voltage:
                  type: number
                  description: 'ohm: volts.'
                  minimum: -1000000000000000
                  maximum: 1000000000000000
                current:
                  type: number
                  description: 'ohm, led-resistor, line-drop: amperes.'
                  minimum: -1000000000000000
                  maximum: 1000000000000000
                resistance:
                  type: number
                  description: 'ohm: ohms. colour-encode and e-series: the value in ohms.'
                  minimum: -1000000000000000
                  maximum: 1000000000000000
                power:
                  type: number
                  description: 'ohm: watts.'
                  minimum: -1000000000000000
                  maximum: 1000000000000000
                resistances:
                  type: array
                  items:
                    type: number
                    description: number
                    minimum: -1000000000000000
                    maximum: 1000000000000000
                  maxItems: 100
                  description: 'series/parallel: ohms, at most 100.'
                tolerancePct:
                  type: number
                  description: 'series/parallel: shared tolerance percent for min/max bounds. colour-encode: tolerance percent to encode.'
                  minimum: 0
                  maximum: 100
                vin:
                  type: number
                  description: 'divider: input volts.'
                  minimum: -1000000000000000
                  maximum: 1000000000000000
                r1:
                  type: number
                  description: 'divider: top resistor, ohms.'
                  minimum: -1000000000000000
                  maximum: 1000000000000000
                r2:
                  type: number
                  description: 'divider: bottom resistor, ohms.'
                  minimum: -1000000000000000
                  maximum: 1000000000000000
                rLoad:
                  type: number
                  description: 'divider: optional load across r2, ohms.'
                  minimum: -1000000000000000
                  maximum: 1000000000000000
                supplyVoltage:
                  type: number
                  description: 'led-resistor: supply volts. line-drop: optional, enables dropPercent.'
                  minimum: -1000000000000000
                  maximum: 1000000000000000
                forwardVoltage:
                  type: number
                  description: 'led-resistor: LED forward volts.'
                  minimum: -1000000000000000
                  maximum: 1000000000000000
                series:
                  type: string
                  enum:
                  - E3
                  - E6
                  - E12
                  - E24
                  - E48
                  - E96
                  - E192
                  description: 'led-resistor (default E24) and e-series: preferred-value series.'
                lengthM:
                  type: number
                  description: 'line-drop: one-way length in metres.'
                  minimum: 0
                  maximum: 1000000000000000
                areaMm2:
                  type: number
                  description: 'line-drop: conductor cross-section in mm^2.'
                  minimum: 0
                  maximum: 1000000000000000
                resistivityOhmM:
                  type: number
                  description: 'line-drop: conductor resistivity in ohm-metres, supplied by the caller (not looked up).'
                  minimum: 0
                  maximum: 1
                roundTrip:
                  type: boolean
                  description: 'line-drop: count out and return conductors (default true).'
                maxDropPercent:
                  type: number
                  description: 'line-drop: fail when the drop exceeds this percent of supplyVoltage.'
                  minimum: 0
                  maximum: 100
                bands:
                  type: array
                  items:
                    type: string
                    maxLength: 12
                    description: Colour name, head end first (IEC 60062 table).
                  maxItems: 6
                  minItems: 3
                  description: 'colour-decode: 3 to 6 colours read from the head end.'
                bandCount:
                  type: integer
                  minimum: 3
                  maximum: 6
                  description: 'colour-encode: 3, 4 (default), 5 or 6 bands. 5 and 6 bands carry three digits.'
                tcrPpm:
                  type: number
                  description: 'colour-encode with 6 bands: temperature coefficient in ppm/K.'
                  minimum: 0
                  maximum: 1000
                claim:
                  type: object
                  description: Optional map from an output value name (e.g. resistance, vout, minResistance) to the number you expect.
                claimTolerancePct:
                  type: number
                  description: 'Relative tolerance for claim values, percent (default 0: exact).'
                  minimum: 0
                  maximum: 100
            example:
              op: colour-decode
              bands:
              - brown
              - black
              - red
              - gold
      responses:
        '200':
          description: Paid result with provenance
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: object
                    properties:
                      status:
                        type: string
                        enum:
                        - pass
                        - fail
                        - unknown
                        - unsupported
                        description: 'pass: every rule held. fail: a rule was violated (see witnesses). unknown: the input lacks the evidence to decide. unsupported: outside what this engine covers. Missing evidence is never a pass.'
                      operation:
                        type: string
                      values:
                        type: object
                        description: Named numeric results (a value is null where undefined, e.g. an unbounded ratio) in SI base units (ohm, volt, ampere, watt); null where undefined. colour-decode adds tolerancePct, min/maxResistance and tcrPpmPerK.
                      bands:
                        type: array
                        items:
                          type: string
                        description: 'colour-decode: the normalised colour names. colour-encode: the colours to print, head end first. Omitted for other ops.'
                      roles:
                        type: array
                        items:
                          type: string
                        description: 'colour-decode: the meaning assigned to each band position. Omitted for other ops.'
                      witnesses:
                        type: array
                        items:
                          type: object
                          properties:
                            ruleId:
                              type: string
                            detail:
                              type: string
                            path:
                              type: string
                              description: JSON pointer or dotted path into the input.
                            offset:
                              type: integer
                            index:
                              type: integer
                            expected:
                              description: What the rule required.
                            actual:
                              description: What the input had.
                      versions:
                        type: object
                        description: Every semantic dependency of this answer (engine, tables and their as-of dates, tokenizer, calendar, rounding profile).
                      limits:
                        type: array
                        items:
                          type: string
                      deterministic:
                        type: boolean
                        description: 'Always true: pure code, no model.'
                  _provenance:
                    type: object
                    description: C2PA-aligned manifest and W3C VC 2.0 (eddsa-jcs-2022) issued by the hub DID; verify at POST /api/v1/verify-provenance
                required:
                - data
                - _provenance
        '400':
          description: Invalid request (no payment consumed)
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                  code:
                    type: string
        '401':
          description: Invalid X-API-KEY
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                  code:
                    type: string
        '402':
          description: Payment required or invalid
          content:
            application/json:
              schema:
                type: object
                description: x402 v2 PaymentRequired (also base64 in the PAYMENT-REQUIRED header)
                properties:
                  x402Version:
                    type: integer
                  error:
                    type: string
                  code:
                    type: string
                  resource:
                    type: object
                  accepts:
                    type: array
                    items:
                      type: object
                  extensions:
                    type: object
        '502':
          description: Upstream failure; the payment is released or not settled
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                  code:
                    type: string
      tags:
      - Electrical Calc
components:
  securitySchemes:
    x402:
      type: apiKey
      in: header
      name: PAYMENT-SIGNATURE
      description: x402 v2 payment payload (base64) sent after a 402 challenge
    apiKey:
      type: apiKey
      in: header
      name: X-API-KEY