[ 01 / 01 ]

[ PROTOCOLS ]

ZEQ PROTOCOLS

[01/01]
ZeqField Protocols

Five Protocols.
One Field.

The ZeqField Protocols extend the HulyaSync mathematical framework into five operational layers — from key activation to temporal projection. Each phase-locked to 1.287 Hz.

ZFK · ZeqPulse · ZeqProof · ZeqLattice · ZeqShift
ZFK
ZeqField
Key Activation
ZeqPulse
Live HulyaPulse
Synchronisation
ZeqProof
HMAC-SHA256
Result Attestation
ZeqLattice
Multi-Node
Coherence Grid
ZeqShift
Forward Time-Series
Projection
ZFK
ZeqField Key Activation
AES-256-GCM key derivation · PBKDF2-SHA256 · 200,000 iterations
Admin

ZFK is the foundation of the ZeqField cryptographic layer. It derives a 256-bit encryption key from the HULYAS framework constants — the HulyaPulse frequency (1.287 Hz), Zeqond interval (0.777 s), coupling constant α, and operator count — combined with the ZEQ_FIELD_KEY environment secret via PBKDF2-SHA256 at 200,000 iterations. The derived key encrypts all PII in the Zeq.dev system using AES-256-GCM authenticated encryption. Without ZEQ_FIELD_KEY, ZFK falls back to a DATABASE_URL-derived key — functional but weaker.

Cipher
AES-256-GCM
Key Derivation
PBKDF2-SHA256
Iterations
200,000
IV Size
96-bit (random)
Auth Tag
128-bit GCM
Key Source
ZEQ_FIELD_KEY + HULYAS salt
Check ZeqField Status (Admin)
# Requires admin authentication cookie
curl https://www.zeqsdk.com/api/admin/zeqfield/status \
  -H "Cookie: zeq_admin_token=<token>"
Response Fields
FieldTypeDescription
cipherstringAlways AES-256-GCM
ZEQ_FIELD_KEYstring"configured" or "fallback (DATABASE_URL hash)"
protocolsstring[]All five active ZeqField protocol names
endpointsobjectLists public and auth-required protocol endpoints
ZeqPulse
Live HulyaPulse Synchronisation
Real-time 1.287 Hz heartbeat · Zeqond counter · Phase φ · SSE stream
Public + Auth

ZeqPulse exposes the live state of the HulyaSync master clock. The public endpoint returns a single snapshot: the current Zeqond index τ, phase φ within the active Zeqond, and the instantaneous R(t) value. The authenticated SSE stream delivers a new pulse tick every 777 ms — one per Zeqond — allowing agents to synchronise operations, replay computations deterministically, or detect temporal drift. The Zeqond is a monotonically-increasing integer counter; two calls at the same Zeqond will return identical phase and R(t) values.

Public Endpoint
GET /api/zeq/pulse
Stream Endpoint
GET /api/zeq/pulse/stream
Stream Auth
zeq_ak_ required
Stream Protocol
SSE (text/event-stream)
Tick Interval
777 ms (1 Zeqond)
MCP Tool
zeq_pulse
GET /api/zeq/pulse — snapshot (no key required)
curl https://www.zeqsdk.com/api/zeq/pulse
Response
{
  "protocol": "ZeqPulse",
  "zeqond": 2941083127,            // τ — current Zeqond index
  "phase": 0.3214,               // φ ∈ [0,1] within this Zeqond
  "R_t": 1.000412,               // HulyaPulse modulation value
  "pulseHz": 1.287,
  "zeqondSec": 0.777,
  "alpha": 0.00129,
  "precision": 0.000412,
  "timestamp": "2026-03-27T14:22:08.123Z",
  "modulation": "R(t) = [1 + α·sin(2π·f·t)]  where f=1.287 Hz, α=0.00129"
}
GET /api/zeq/pulse/stream — SSE (zeq_ak_ required)
curl -N https://www.zeqsdk.com/api/zeq/pulse/stream \
  -H "Authorization: Bearer $ZEQ_API_KEY"

# Returns one event every 777 ms:
data: {"zeqond":2941083127,"phase":0.0012,"R_t":1.000013,"pulseHz":1.287,...}

data: {"zeqond":2941083128,"phase":0.0015,"R_t":1.000891,"pulseHz":1.287,...}
Snapshot Response Fields
FieldTypeDescription
zeqondintegerZeqond index τ = floor(unix_ms / 777). Monotonically increasing.
phasenumberφ ∈ [0,1] — fractional position within the current Zeqond.
R_tnumberR(t) = 1 + α·sin(2π·f·t) — instantaneous HulyaPulse modulation.
pulseHznumberAlways 1.287. The HulyaPulse carrier frequency.
precisionnumber|α·sin(2π·f·t)|, capped at 0.001. Precision guarantee.
WS
WebSocket Streaming
Full-duplex real-time compute stream · wss://www.zeqsdk.com/api/zeq/ws
Auth Required

For low-latency applications requiring bidirectional communication, ZEQ exposes a WebSocket endpoint at wss://www.zeqsdk.com/api/zeq/ws. Once connected, clients send JSON compute requests and receive streamed ZeqState responses synchronised to the 1.287 Hz HulyaPulse. The connection stays open, eliminating HTTP handshake overhead on repeated calls. Authentication is sent as the first message after open — the server closes the socket with code 4401 if no valid zeq_ak_ key is received within 5 seconds.

Endpoint
wss://www.zeqsdk.com/api/zeq/ws
Protocol
WebSocket (RFC 6455)
Message format
JSON — newline-delimited
Auth timeout
5 s (close 4401 on failure)
Browser / Node — connect & authenticate
const ws = new WebSocket('wss://www.zeqsdk.com/api/zeq/ws');

ws.addEventListener('open', () => {
  // Authenticate immediately after connection open
  ws.send(JSON.stringify({ type: 'auth', token: process.env.ZEQ_API_KEY }));
});

ws.addEventListener('message', (event) => {
  const msg = JSON.parse(event.data);
  if (msg.type === 'auth_ok') {
    // Now send a compute request
    ws.send(JSON.stringify({
      type:      'compute',
      domain:    'quantum_mechanics',
      operators: ['KO42'],
      inputs:    { E: 13.6, m: 9.11e-31 }
    }));
  }
  if (msg.type === 'result') {
    console.log('R(t):', msg.zeqState.masterSum);
    console.log('Precision:', msg.zeqState.precision); // always ≤ 0.001
  }
});
Message Types
TypeDirectionDescription
authclient → serverFirst message. Must include token field with zeq_ak_ key.
auth_okserver → clientAuthentication accepted. Client may now send compute requests.
computeclient → serverPhysics compute request. Fields: domain, operators, inputs.
resultserver → clientCompute response with full zeqState object and result payload.
pulseserver → clientUnsolicited HulyaPulse tick every 777 ms. Includes zeqond, R_t, phase.
errorserver → clientError response. Includes code (HTTP-equivalent) and message.
ZeqProof
HMAC-SHA256 Result Attestation
Tamper-evident proof seal on every compute response · 64-char hex HMAC
Auth Required

Every response from POST /api/zeq/compute now includes a zeqProof field — a 64-character hex HMAC-SHA256 digest that seals the computation result. The proof covers the operator IDs, R(t) value, Zeqond counter, and the first 8 characters of the calling user's ID. Any mutation to these values — even a single bit flip — produces a completely different HMAC, immediately detectable by calling POST /api/zeq/verify. ZeqProof provides the chain-of-custody attestation layer that makes Zeq.dev results auditable and verifiable by third parties.

Algorithm
HMAC-SHA256
Output
64-char hex
Key Source
ZEQ_FIELD_KEY
Scope
operatorIds, R_t, zeqond, keyPrefix
Added To
All compute responses
MCP Tool
zeq_verify
POST /api/zeq/compute — zeqProof in response
curl -X POST https://www.zeqsdk.com/api/zeq/compute \
  -H "Authorization: Bearer $ZEQ_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"domain":"quantum_mechanics","inputs":{"E":13.6}}'

# Response includes zeqProof:
{
  "zeqState": { "operators": ["KO42", "QM01"], "masterSum": 1.000514, ... },
  "zeqProof": "a3f8c2e1d4b7a9f2c5e8d1b4a7f0c3e6d9b2a5f8c1e4d7b0a3f6c9e2d5b8a1f4"
}
POST /api/zeq/verify — validate the proof
curl -X POST https://www.zeqsdk.com/api/zeq/verify \
  -H "Authorization: Bearer $ZEQ_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "proof": "a3f8c2e1d4b7a9f2c5e8d1b4a7f0c3e6d9b2a5f8c1e4d7b0a3f6c9e2d5b8a1f4",
    "operatorIds": ["KO42", "QM01"],
    "R_t": 1.000514,
    "zeqond": 2941083127
  }'
Response
{
  "protocol": "ZeqProof",
  "valid": true,
  "zeqond": 2941083127,
  "R_t": 1.000514,
  "operatorIds": ["KO42", "QM01"],
  "verifiedAt": "2026-03-27T14:22:09.000Z"
}
Verify Response Fields
FieldTypeDescription
validbooleanTrue if HMAC matches. False if any input field was mutated.
zeqondintegerThe Zeqond value included in the proof scope.
R_tnumberThe R_t value included in the proof scope.
hintstring?Present only when valid=false. Debugging guidance for mismatches.
ZeqLattice
Multi-Node Coherence Grid
2–5 nodes · Shared Zeqond · Staggered phases · Coherence score
Auth Required

A ZeqLattice is a coherence grid of 2–5 computation nodes that share the same base Zeqond but operate at staggered HulyaPulse phases — each node offset by Δᵢ = i·τ/N from the base time. This models distributed physics computations where multiple agents must operate in phase-coordinated synchrony. The coherenceScore (0–1) measures how tightly the lattice nodes track each other: 1.0 = perfect synchronisation, 0.0 = complete phase divergence. The lattice equation describes the mean R(t) across all nodes.

Endpoint
POST /api/zeq/lattice
Node Range
2–5 nodes
Phase Offset
Δᵢ = i·τ/N
Coherence
1 − σ/μ of R_t values
Shared Clock
Base Zeqond τ
MCP Tool
zeq_lattice
POST /api/zeq/lattice — array of 2–5 node specs
curl -X POST https://www.zeqsdk.com/api/zeq/lattice \
  -H "Authorization: Bearer $ZEQ_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "nodes": [
      { "domain": "quantum_mechanics", "inputs": { "E": 13.6 } },
      { "domain": "thermodynamics",    "inputs": { "T": 300 } },
      { "domain": "fluid_dynamics",    "inputs": { "v": 1.5 } },
      { "domain": "electromagnetism",  "inputs": { "B": 0.5 } }
    ]
  }'
Response
{
  "protocol": "ZeqLattice",
  "nodeCount": 4,
  "sharedZeqond": 2941083127,
  "coherenceScore": 0.999812,  // 1.0 = perfect sync
  "latticeEquation": "L(t) = (1/4) Σᵢ Rᵢ(t+Δᵢ)  Δᵢ=i·τ/4  coherence=0.9998",
  "callsConsumed": 4,
  "latticeNodes": [
    { "node": 1, "domain": "Quantum Mechanics", "zeqond": 2941083127, "phase": 0.1234, "R_t": 7.004823, "operator": "QM01" },
    { "node": 2, "domain": "Thermodynamics",    "zeqond": 2941083127, "phase": 0.3734, "R_t": 1.000312, "operator": "TH01" },
    { "node": 3, "domain": "Fluid Dynamics",    "zeqond": 2941083127, "phase": 0.6234, "R_t": 1.000379, "operator": "FD01" },
    { "node": 4, "domain": "Electromagnetism",  "zeqond": 2941083127, "phase": 0.8734, "R_t": 1.000451, "operator": "EM01" }
  ],
  "pulseHz": 1.287,
  "computedAt": "2026-03-27T14:22:10.000Z"
}
Response Fields
FieldTypeDescription
coherenceScorenumber1 − (σ / μ) of all node R_t values. 1.0 = perfectly synchronised. Values near 1.0 indicate stable phase coherence across the lattice.
sharedZeqondintegerThe base Zeqond τ shared by all lattice nodes at computation time.
latticeNodesarrayPer-node results: node index, domain, zeqond, phase φ, R_t, and operator ID.
latticeEquationstringHuman-readable lattice equation: L(t) = (1/N) Σᵢ Rᵢ(t+Δᵢ) with coherence score.
callsConsumedintegerNumber of compute tokens deducted from your daily quota (equals node count).
ZeqShift
Forward Time-Series Projection
Up to 64 Zeqond steps · R(t) trajectory · Phase-accurate future states
Auth Required

ZeqShift projects the R(t) value forward through time, one Zeqond step (0.777 s) at a time, for up to 64 steps. Because R(t) is deterministic and phase-locked to HulyaPulse, ZeqShift produces exact future values — not approximations. Each step returns the future Zeqond index, phase φ, and R_t. The summary includes min, max, and mean R_t across the full projection window. ZeqShift is the temporal forecasting layer of the Zeq.dev framework, enabling agents to predict the exact phase state of any future computation before committing to it.

Endpoint
POST /api/zeq/shift
Max Steps
64 Zeqonds
Step Size
0.777 s (1 Zeqond)
Projection
Exact (deterministic)
Summary
min, max, mean R_t
MCP Tool
zeq_shift
POST /api/zeq/shift
curl -X POST https://www.zeqsdk.com/api/zeq/shift \
  -H "Authorization: Bearer $ZEQ_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "steps": 8,
    "domain": "thermodynamics",
    "inputs": { "temp_K": 500, "pressure_Pa": 101325 }
  }'
Response
{
  "protocol": "ZeqShift",
  "domain": "Thermodynamics",
  "baseZeqond": 2941083127,
  "stepCount": 8,
  "callsConsumed": 8,  // equals stepCount
  "S_t": 50712.5,
  "summary": { "minRt": 50645.891, "maxRt": 50779.108, "meanRt": 50712.499 },
  "projection": [
    { "step": 0, "t": 1743084130.2, "zeqond": 2941083127, "phase": 0.3214, "R_t": 50712.500, "delta": 0 },
    { "step": 1, "t": 1743084130.977, "zeqond": 2941083128, "phase": 0.3214, "R_t": 50753.891, "delta": 41.391 },
    { "step": 2, "t": 1743084131.754, "zeqond": 2941083129, "phase": 0.3214, "R_t": 50779.108, "delta": 25.217 },
    // ... 5 more steps
  ],
  "equation": "R_t(step) = S(t) × [1 + α·sin(2π·f·(t₀ + step·τ))]",
  "computedAt": "2026-03-27T14:22:11.000Z"
}
Response Fields
FieldTypeDescription
baseZeqondintegerZeqond τ at computation start (step 0).
S_tnumberMean absolute value of input parameters — the unmodulated signal.
summaryobjectMin, max, and mean R_t values across all projected steps.
projectionarrayArray of {step, t, zeqond, phase, R_t, delta} — one per Zeqond step. t is absolute Unix seconds; delta is the R_t change from the previous step.
equationstringThe ZeqShift projection equation with full parameter values.
callsConsumedintegerNumber of compute tokens deducted from your daily quota. Equal to the number of steps projected.
REST API Endpoint Reference

All REST endpoints at a glance

Every endpoint is available at https://www.zeqsdk.com. Endpoints marked Auth require a zeq_ak_ API key in the Authorization header.

MethodPathAuthProtocolDescription
POST/api/zeq/keysZFKActivate a ZeqField API key (ZFK). Returns zeq_ak_ bearer token.
GET/api/zeq/pulseZeqPulsePublic HulyaPulse snapshot: zeqond, phase φ, R(t), precision.
GET/api/zeq/pulse/streamKeyZeqPulse SSEServer-Sent Events stream delivering one pulse tick every 777 ms.
WS/api/zeq/wsKeyWebSocketFull-duplex WebSocket streaming — authenticated compute + pulse push.
POST/api/zeq/computeKeyZeqComputePhysics compute: domain + operators + inputs → ZeqState + result.
POST/api/zeq/verifyKeyZeqProofVerify a zeqProof HMAC returned by /compute. Returns valid: true/false.
POST/api/zeq/latticeKeyZeqLatticeMulti-node coherence grid (2–5 nodes). Returns per-node R_t + coherenceScore.
POST/api/zeq/shiftKeyZeqShiftForward time-series projection (1–64 steps). Returns per-step phase + R_t array.
GET/api/zeq/operatorsReferenceFull operator catalog — 1,576 operators across 64 domains. Paginated.
POST/api/mcpKeyMCP JSON-RPCMCP JSON-RPC 2.0 endpoint. Routes to 7 tools: zeq_compute, zeq_pulse, zeq_verify, zeq_lattice, zeq_shift, zeq_list_operators, zeq_field_status.
MCP JSON-RPC Specification

MCP JSON-RPC 2.0 over HTTPS

The MCP endpoint at POST /api/mcp implements the Model Context Protocol JSON-RPC 2.0 specification. AI clients (Cursor, Windsurf, Claude Desktop, Continue) send JSON-RPC requests; the server routes them to the appropriate ZEQ operator and returns a structured JSON-RPC response.

JSON-RPC 2.0 Request Structure
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "zeq_compute",
    "arguments": {
      "domain": "quantum_mechanics",
      "operators": ["KO42"],
      "inputs": { "E": 13.6, "m": 9.11e-31 }
    }
  }
}
MCP ToolREST EquivalentDescription
zeq_computePOST /api/zeq/computePhysics compute across 64 domains with KO42 precision verification.
zeq_pulseGET /api/zeq/pulseLive HulyaPulse snapshot — zeqond, phase φ, R(t).
zeq_verifyPOST /api/zeq/verifyVerify zeqProof HMAC attestation from any prior compute result.
zeq_latticePOST /api/zeq/latticeMulti-node coherence grid for distributed physics computation.
zeq_shiftPOST /api/zeq/shiftForward time-series projection across Zeqond boundaries.
zeq_list_operatorsGET /api/zeq/operatorsList available operators filtered by domain, category, or search term.
zeq_field_statusGET /api/zeq/keys/statusCurrent API key status: plan tier, daily token quota, tokens remaining.
Rate Limiting & Quotas

Daily compute quotas by plan tier

Rate limiting is enforced at the API key level. Daily token quotas reset at the UTC midnight zeqond boundary. Exceeding your daily quota returns HTTP 429 Too Many Requests with a Retry-After header indicating seconds until next quota reset.

PlanTokens/DayRate LimitZeqShift StepsZeqLattice Nodes
Free (trial)10010 req/minUp to 8Up to 2
Starter ($29/mo)50060 req/minUp to 16Up to 3
Builder ($79/mo)2,500120 req/minUp to 32Up to 4
Advanced ($199/mo)7,500300 req/minUp to 64Up to 5
Architect ($499/mo)25,000CustomUp to 64Up to 5
429 Too Many Requests
Daily token quota exceeded. Check X-RateLimit-Remaining and Retry-After response headers. Quota resets at the UTC midnight zeqond boundary.
Rate-Limit Response Headers
X-RateLimit-Limit: daily token quota
X-RateLimit-Remaining: tokens left today
X-RateLimit-Reset: unix timestamp of next reset