curl SDK
One-line bash wrapper for the Zeq /api/zeq/compute endpoint.
Download
zeq_compute.sh online · v1.1.3POSIX sh
Bash one-liner against /api/zeq/compute — useful for CI jobs, Makefiles, and quick REPL-style math checks. Verified live: NM21 → 1.98049e20 N.
Quickstart
export ZEQ_TOKEN=zeq_ak_...
./zeq_compute.sh # NM21 Earth-Moon gravity
./zeq_compute.sh NM19 '{"m":10,"a":9.8}' # any operator + any inputs
./zeq_compute.sh NM23 '{"m":2,"v":10}' # kinetic energy, etc.
Direct curl (no script)
curl -sS \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $ZEQ_TOKEN" \
-d '{"operator_id":"NM21","inputs":{"m1":5.972e24,"m2":7.342e22,"r":3.844e8}}' \
https://www.zeq.dev/api/zeq/compute | jq .
# Response:
# {
# "value": 1.98049e+20,
# "unit": "N",
# "uncertainty": 1.98e+19,
# "operator_id": "NM21",
# "solver": "operator:NM21",
# "binding_overlay": "1.1.3",
# "zeqProof": "9deb4dbe…",
# "compliance": { "fda_21_cfr_11": true, "iso_27001": true, ... },
# ...
# }
Full source — zeq_compute.sh
Why inline? The full SDK source is pasted below so the mathematics is auditable.
Copy-paste it, read it, self-host it — you never have to trust the Zeq API as a black box.
Use our key for convenience, or wire it into your own backend. The v1.1.3 binding contract and ZeqProof HMAC are identical either way.
zeq_compute.sh 800 bytes 24 lines bash 4+
#!/usr/bin/env bash
# zeq_compute.sh — minimal curl smoke test against /api/zeq/compute (v1.1.3)
#
# export ZEQ_TOKEN=zeq_ak_...
# ./zeq_compute.sh # NM21 Earth-Moon gravity
# ./zeq_compute.sh NM19 '{"m":10,"a":9.8}'
#
# Requires: curl, and optionally jq for pretty output.
#
# [Zeq Daemon] HulyaPulse 1.287 Hz — τ_zeqond = 0.777 s — α_K = 0.00129
set -euo pipefail
: "${ZEQ_TOKEN:?Set ZEQ_TOKEN=zeq_ak_... first}"
OPERATOR="${1:-NM21}"
INPUTS="${2:-{\"m1\":5.972e24,\"m2\":7.342e22,\"r\":3.844e8}}"
curl -sS \
--fail-with-body \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${ZEQ_TOKEN}" \
-d "{\"operator_id\":\"${OPERATOR}\",\"inputs\":${INPUTS}}" \
https://www.zeq.dev/api/zeq/compute \
| (command -v jq >/dev/null && jq . || cat)