Cogitan
Documentation menu

Guide

Written against a local engine (localhost:8000/api/...). On the hosted API the same path is under https://api.cogitan.ai/v1/fluxus with an Authorization header; see Getting started.

AQFP API and CLI

Every AQFP route and fluxus aqfp command answers a design through one function, fluxus.neural.service.aqfp_predict_checked, so the verdict, p and refusal of a design are the same on every surface. --json on the CLI prints exactly what the API returns (the 200 body, or the {"error": ...} object of a 400). Two cells are served: majority (default) and buffer. Simulation, not silicon: each cell's measured record is its functional_caveat.

CLI exit codes: 0 answered (functional, not functional or escalate), 2 bad input, 3 refused (the head declines the design and says why).

RouteCLIWhat it returns
POST /api/aqfp/predictfluxus aqfp predictverdict, p, Mondrian set, interface flag, refusals
GET /api/aqfp/cellsfluxus aqfp cellsknobs, units, defaults, served ranges, envelope, versions, bar status
POST /api/aqfp/predict/batchfluxus aqfp batch FILEmany designs, one slot each
POST /api/aqfp/sweepfluxus aqfp sweepone or two knobs over a grid
POST /api/aqfp/netlistfluxus aqfp netlistthe circuit-test decks behind a verdict
POST /api/aqfp/interfacefluxus aqfp interfaceiface-1 margins and flag on their own
GET /api/aqfp/statusfluxus aqfp statuswhether each head serves

predict

curl -s localhost:8000/api/aqfp/predict -H 'content-type: application/json' \
  -d '{"cell": "buffer", "params": {}, "iin_ua": 55}'
fluxus aqfp predict --cell buffer --iin 55
fluxus aqfp predict --lq-ph 12 --lout-ph 6 --json

Knob flags are the AQFPCellSpec fields (--lin-ph, --l-arm-ph, --lq-ph, --lout-ph, --lx-ph, --kx, --kout, --ic-ua, --rshunt-ohm, --kd-over-kx); --param NAME=VALUE sends any other field as given. functional is null on an escalation (p between the two Mondrian thresholds). Refusals, each named in reason: malformed input (400), unknown field (400), majority-only input on the buffer (400), unseen input (kout, kd_over_kx moved), knob range, envelope (chain gate below 0.35 Ic), feature box, off manifold.

cells

curl -s localhost:8000/api/aqfp/cells
fluxus aqfp cells

batch

curl -s localhost:8000/api/aqfp/predict/batch -H 'content-type: application/json' \
  -d '{"cell": "majority", "items": [{"cell": "buffer", "params": {}}, {"params": {"lq_ph": -1}}, {"cell": "inverter"}]}'
fluxus aqfp batch designs.csv -o results.jsonl
fluxus aqfp batch designs.jsonl --format csv

results is aligned with items; a bad item is an error in its own slot. A non-finite or non-numeric value is a 422 for the whole request. Over 2000 items the API truncates with a clamped block (the CLI sends long files in chunks). A CSV has one design per row: optional cell and iin_ua columns, the rest knobs, empty cells unset. A JSONL line is {cell, params, iin_ua} or flat knobs.

sweep

curl -s localhost:8000/api/aqfp/sweep -H 'content-type: application/json' \
  -d '{"cell": "buffer", "axes": [{"knob": "lq_ph", "start": 4, "stop": 30, "n": 14}]}'
fluxus aqfp sweep --cell buffer --knob lq_ph --start 4 --stop 30 --n 14
fluxus aqfp sweep --knob lq_ph --start 4 --stop 30 --n 12 --knob2 lout_ph --start2 1 --stop2 30 --n2 30

knob is any spec field or iin_ua. n defaults to 21 and is clamped to 2..201 for one axis and 2..41 per axis for two (a clamped block says so). Each point carries its call, p and refusal kind and reason.

netlist

curl -s localhost:8000/api/aqfp/netlist -H 'content-type: application/json' -d '{"cell": "buffer"}'
fluxus aqfp netlist --cell buffer -o buf_nominal.cir
fluxus aqfp netlist --cell buffer --leg supplies_x0.9 --josim -o buf_x09.cir
josim-cli -o buf.csv -V 1 buf_x09.cir

Two legs (nominal, supplies_x0.9). deck is the label's deck byte for byte (label v2 for the majority, the buffer chain deck BUF-L1 for the buffer); josim_deck adds .print DEVI lines for every gate's LQ current. read_rule says how the label reads it: the sign of the mean current in LQN4 over N4's own peak +/- T/16 at read.times_ps, the expected bit, a floor of 0.15 Ic, both legs, three noise seeds at 4.2 K. Designs the head refuses get no deck and the same reason.

interface

curl -s localhost:8000/api/aqfp/interface -H 'content-type: application/json' -d '{"params": {"lout_ph": 2}}'
fluxus aqfp interface --lout-ph 2

For a functional design the flag fields equal those predict serves; for any other answered design served_with_verdict is false and the flag is static physics only.

status

curl -s localhost:8000/api/aqfp/status
fluxus aqfp status

Source: docs/aqfp/API_AND_CLI.md in the Fluxus repository.

Generated from Fluxus 0.3.0 at commit b9aa57d on 2026-10-20 by python -m fluxus.docs_bundle.