← Back to Home

Geometry API

Pricing and reference for the metered resources.

Exact geometry, built on demand by Genworks GDL on the SMLib kernel, returned as a CAD file. Each request is priced in cents and paid at the moment of the request by any x402 client: no account, no API key, no invoice. Humans keep the free interactive demos in the browser; this page is for scripts and agents.

How a request is paid

  1. GET the resource URL with the parameters you want. The answer is HTTP 402 with a PAYMENT-REQUIRED header (x402 version 2, scheme exact, USDC on Base, network eip155:8453) and the same JSON as the body, quoting the exact amount for that request.
  2. Your client signs a USDC transfer authorization for that amount and repeats the request with a PAYMENT-SIGNATURE header.
  3. The signature is verified, the geometry is built, the payment settles on chain, and the file comes back with a PAYMENT-RESPONSE header naming the transaction.

Nothing is charged unless the file is served: a request the engine refuses (an undercut gear, a malformed airfoil code) is answered 400 with the reason and settles nothing. Any x402 v2 client works, for example the @x402/fetch package for Node with an EVM signer, or the x402 Python client.

# see the quote (no wallet needed)
curl -si 'https://genworks.com/demo/naca-nurbs/cad?digits=2412' | grep -i payment-required

# pay and fetch, with @x402/fetch (Node)
import { wrapFetchWithPayment } from '@x402/fetch';
const paidFetch = wrapFetchWithPayment(fetch, signer);   // an EVM signer holding USDC on Base
const res = await paidFetch('https://genworks.com/demo/naca-nurbs/cad?digits=2412');
await Bun.write('naca2412.stp', await res.arrayBuffer());

Resources and prices

Prices are per request and follow what the request asks for. The 402 is authoritative; these are the current values.

ResourceWhat you getPrice
/demo/naca-nurbs/cadOne NACA 4- or 5-digit airfoil as NURBS curves, STEP (AP203) or IGES3 ¢
/demo/naca-nurbs/cadA family of up to twelve airfoils in one file (comma-separated codes)8 ¢
/demo/gear/cadThe drawing numbers alone as JSON: pitch, base, tip and root diameters, tooth thickness, span over k teeth, contact ratio of a pair1 ¢
/demo/gear/cadInvolute spur gear outline as STEP or IGES curves (ISO 21771, trochoid root fillet)3 ¢
/demo/gear/cadA meshing pair of outlines at the working center distance (mate)5 ¢
/demo/gear/cadAn extruded solid (face_width)15 ¢
/demo/gear/cadA meshing pair of solids (face_width and mate)25 ¢

NACA airfoil

Any NACA 4- or 5-digit airfoil, or a family of up to twelve, as clean NURBS curves fitted to a tolerance you choose.

GET https://genworks.com/demo/naca-nurbs/cad?digits=2412
GET https://genworks.com/demo/naca-nurbs/cad.igs?digits=0012,2412,23012&chord=250
    digits     one NACA code, or a comma-separated family (max 12)   required
    chord      scale factor applied to the unit chord, default 1
    points     samples per airfoil, 50-500, default 216
    tolerance  NURBS approximation tolerance, 0.0001-0.01, default 0.0005
    format     step | iges   (or use /cad.stp, /cad.igs)
    trace      1 to include the free verification record in the STEP header

Involute spur gear

ISO 21771 geometry with the flank from the base circle and the root fillet the basic rack's tip generates, profile shift and backlash, as a planar outline, an extruded solid, or a meshing pair at the working center distance. An undercut request is refused with the profile shift that fixes it.

GET https://genworks.com/demo/gear/cad?module=2&teeth=20
GET https://genworks.com/demo/gear/cad.stp?module=2&teeth=20&mate=40&face_width=10
GET https://genworks.com/demo/gear/cad.json?module=2&teeth=20&mate=40
    teeth            6-200                                  required
    module           mm (pitch diameter / teeth), default 1
    pressure_angle   degrees: 14.5, 20 or 25, default 20
    shift            profile shift coefficient x, default 0
    backlash         tooth thickness reduction at the pitch circle, mm
    face_width       mm: when given, the file holds the extruded solid
    mate             tooth count of a mating gear: both gears, meshed
    mate_shift       the mate's profile shift coefficient
    format           step | iges | json   (or /cad.stp, /cad.igs, /cad.json)
    trace            1 to include the free verification record

Verification

Every STEP file's header records the resource and the parameters it was built from. Each resource's free /trace path is a verification record: the standards the geometry follows, the checks made on every result, and the derived numbers for a given request; for the demos published as open source, the source itself. Add trace=1 and the JSON report and the STEP header name it.

Not offered yet?

A gear rack, a lofted wing from root and tip sections, a standard beam section, a STEP conversion: a free GET of /demo/geometry/wishlist?want=... records the ask, and the next resources are chosen from that list. The resources are also listed in the x402 catalog (Coinbase's Bazaar), so an agent that browses the catalog finds them without this page.

Need volume pricing, a private endpoint, or a resource built to your own standard part table? Contact Genworks. Everything on this page runs on Genworks GDL Enterprise; the same engine is licensed for your own deployment — see Licensing.