MONARK Gate API
The Gate API from MONARK — 1 operation(s) for gate.
The Gate API from MONARK — 1 operation(s) for gate.
Every API here is available over the APIs.io API and to AI agents over MCP.
One button, every client — Claude, Cursor, VS Code and the rest.
https://apis.io/mcp
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.curl "https://apis.io/api/v1/apis/monarkgate-tech:monarkgate-tech-gate-api"
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.
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. By signing up you are subscribing to the APIs.io and API Evangelist newsletters — you can unsubscribe from any issue. See our Privacy Policy and Terms.
A second provider on the same verified email joins the account you already have.
openapi: 3.2.0
info:
title: MONARK harness — HTTP/JSON mirror Gate API
version: 0.4.0
description: Plain-JSON mirror of the MONARK MCP harness (attest, gate, cascade, calibrate). Same frozen contracts as the MCP surface; derived from the frozen schemas, never hand-written. The gate only emits a decision; it never calls the named tool.
servers:
- url: https://api.monarkgate.tech
tags:
- name: Gate
paths:
/gate:
post:
operationId: gate
summary: Run the gate operation (JSON mirror of the MCP tool)
description: 'Coverage-gated decision from the real HIKAE L3 policy (commit/defer/abstain) over a caller-carried authorization budget B_t. Dispatches on task_class. The class ''btc-dir-15m'' is retired and answers a named refusal. For ''cascade-liquidable-24h'' no cascade calibration is committed; the gate abstains (under_calib) on this class. For ''stable-run-velocity-24h'' (Narabi: a redemption-flow velocity forecast) the gate holds a committed stable-run velocity calibration for the USDe synthetic-dollar-whitelisted-redeem population (key narabi:persistence-v2@eip155:1/erc20:0x4c9edd5852cd905f086c759e8383e09bff1e68b3) over calm-window redemption flow; coverage is stated under the split-conformal bound of Barber, Candes, Ramdas and Tibshirani 2023 (Thm 2, unit weights): at least 1 − α minus the average total-variation gap between calibration windows and the next one; that gap is not estimated here and the calibration is measured non-stationary across half-years, so 1 − α is the coverage only if that gap is zero (exchangeability), which is not assumed here; no coverage is measured; on that key it requires alpha = 0.1, nMin = 50; for any other population, no stable-run velocity calibration is committed for this population; the gate abstains (under_calib). For ''liquidation-eligible-coverage'' (Ukemi: a per-account liquidable-amount class, class A only) the served region is a conformal upper bound on the liquidable amount for the calibrated class; the lower edge is 0 by construction, not a calibrated bound; abstains (under_calib) outside it; this class requires alpha = 0.01, nMin = 100; calibrated on one recorded episode; no coverage is claimed on any other event; the H-3 exchangeability check is a report, a YES licenses nothing more; the bound holds only if yhat was produced by the frozen close-factor rule on a mono-collateral WETH account at the first crossing, which the gate does not check. The 32 kata classes `{btc,eth,bnb,sol}-{dir,range,mae-down,mae-up}-{1h,4h}` are served from their policy tables, which hold no committed calibration row: every well-formed kata call abstains with no region (under_calib, or non_evaluable on a dir lean of exactly 0), and no kata class has an attestation subject. A kata call carries a `predictor_id` of the form `kata:@//` (no bucket, the class horizon), a `features_digest`, alpha = 0.45, nMin = 6 on dir classes and alpha = 0.01, nMin = 299 on the others, tau at most 1 on dir classes, and a `produced_at` on the class horizon grid, received at most 300 s after it; the full request rules are in section 9 of the contract 1.1.0 specification. When the caller instead supplies a `calibration` (its own nonconformity scores plus a `mode`: `interval` ⇒ region [yhat - q̂, yhat + q̂], or `set` ⇒ a conformal set over caller `candidates`), the gate conformalizes against THOSE caller-supplied scores (BYO): split-conformal quantile at miscoverage α over caller-supplied nonconformity scores. MONARK does not see, store, or verify the caller''s data or model, and does not validate that the supplied numbers are nonconformity scores of any model. Marginal 1−α coverage holds ONLY for future points exchangeable with the supplied scores; non-exchangeable data (e.g. distribution-shifted or time-ordered) voids it. Never a probability of being right. A caller-carried `attested` price must declare a subject consistent with the committed task class (exact committed-URL membership; BYO classes do not accept `attested` in P1); the attestation is carried by the caller and is not re-verified at call time (the verifier is not executed here); `attest` only projects the committed witness — verify a caller-carried attestation offline with the Shōgen verifier; no temporal binding in P1. No served class has a committed attestation subject (the retired ''btc-dir-15m'' held the only one), so any `attested` is refused. The gate only emits a decision; it never calls the named tool.'
requestBody:
required: true
content:
application/json:
schema:
type: object
additionalProperties: false
required:
- prediction
- params
properties:
prediction:
type: object
additionalProperties: false
required:
- schema_version
- task_class
- yhat
- predictor_id
- produced_at
properties:
schema_version:
type: string
pattern: ^\d+\.\d+\.\d+$
task_class:
type: string
pattern: ^[ -~]+$
minLength: 1
yhat:
type:
- string
- number
predictor_id:
type: string
pattern: ^[ -~]+$
minLength: 1
produced_at:
type: string
format: date-time
features_digest:
type: string
pattern: ^[0-9a-f]{64}$
params:
type: object
additionalProperties: false
required:
- remainingBudget
- bFloor
- tau
- tauInterval
- alpha
- nMin
- intent
- tool
- clockOpen
properties:
remainingBudget:
type: number
description: B_t — remaining authorization capacity (caller-owned, D6).
bFloor:
type: number
description: B_floor threshold (>= 0).
tau:
type: number
description: Set-size threshold for the `set` path (>= 0).
tauInterval:
type: number
description: Width threshold for the `interval` path (>= 0).
alpha:
type: number
description: Target miscoverage in (0,1).
nMin:
type: integer
description: Minimum calibration count (>= 1).
intent:
type:
- string
- number
- 'null'
description: The intent tested against the region.
tool:
type: string
description: The NAMED gated tool (echoed, never invoked — D0/D1).
clockOpen:
type: boolean
description: Whether the coverage window is still open (caller-owned).
calibration:
type: object
additionalProperties: false
required:
- scores
- mode
description: 'OPTIONAL BYO calibration (ADR-M007 D7): caller-supplied nonconformity scores + region mode. Present ⇒ the gate conformalizes on the caller''s model, not a committed class.'
properties:
scores:
type: array
items:
type: number
maxItems: 10000
description: Caller-supplied nonconformity scores (interval mode requires all >= 0).
mode:
type: string
enum:
- interval
- set
description: '`interval` ⇒ region [yhat - q̂, yhat + q̂]; `set` ⇒ conformal set over `candidates`.'
candidates:
type: array
maxItems: 10000
description: Set-mode candidate labels with their nonconformity scores (required and non-empty when mode = set).
items:
type: object
additionalProperties: false
required:
- label
- score
properties:
label:
type: string
description: Candidate label (printable ASCII, unique, no `|`).
score:
type: number
description: The candidate's nonconformity score.
attested:
type: object
additionalProperties: false
required:
- schema_version
- subject
- attestor
- residual
- transport
- utterance
- observed_at
- octets_recalcules
- verifier_revision
properties:
schema_version:
type: string
pattern: ^\d+\.\d+\.\d+$
subject:
type: string
pattern: ^[ -~]+$
minLength: 1
attestor:
type: array
minItems: 1
uniqueItems: true
items:
type: object
additionalProperties: false
required:
- identity
- key
properties:
identity:
type: string
pattern: ^[ -~]+$
minLength: 1
key:
type: string
pattern: ^([0-9a-f]{2})+$
residual:
type: array
minItems: 1
uniqueItems: true
items:
type: string
pattern: ^[ -~]+$
minLength: 1
transport:
type: string
pattern: ^[ -~]+$
minLength: 1
utterance:
type: object
additionalProperties: false
required:
- hash
properties:
hash:
type: string
pattern: ^[0-9a-f]{64}$
bytes:
type: string
pattern: ^([0-9a-f]{2})*$
observed_at:
type: object
additionalProperties: false
required:
- clock
- instant
properties:
clock:
type: string
pattern: ^[ -~]+$
minLength: 1
instant:
type: integer
minimum: 0
octets_recalcules:
type: boolean
verifier_revision:
type: string
pattern: ^[ -~]+$
minLength: 1
sens_emis_digest:
type: string
pattern: ^[0-9a-f]{64}$
responses:
'200':
description: The frozen structuredContent plus the honesty content text (K-1).
content:
application/json:
schema:
type: object
additionalProperties: false
required:
- structuredContent
- content
properties:
structuredContent:
type: object
additionalProperties: false
required:
- schema_version
- action
- allow
- tool
- intent
- verdict
- remaining_budget
- request_sha256
- reason
properties:
schema_version:
const: 1.1.0
action:
enum:
- commit
- defer
- abstain
allow:
type: boolean
tool:
type: string
pattern: ^[ -~]+$
minLength: 1
intent:
type:
- string
- number
- 'null'
verdict:
type: object
additionalProperties: false
required:
- schema_version
- task_class
- method
- alpha
- n_calib
- region
- qhat
- abstain
- reason
- qhat_unit
- scale
- residual
- scores_sha256
- cell_key
- policy_row_sha256
- policy_table_sha256
- produced_at
properties:
schema_version:
const: 1.1.0
task_class:
type: string
pattern: ^[ -~]+$
minLength: 1
method:
enum:
- split
- hac-cp
- risk-control
alpha:
type: number
exclusiveMinimum: 0
exclusiveMaximum: 1
n_calib:
type: integer
minimum: 0
region:
oneOf:
- type: object
additionalProperties: false
required:
- kind
- labels
- label_schema
properties:
kind:
const: set
labels:
type: array
items:
type: string
pattern: ^[ -~]+$
label_schema:
type: string
pattern: ^[ -~]+$
minLength: 1
- type: object
additionalProperties: false
required:
- kind
- lo
- hi
properties:
kind:
const: interval
lo:
type: number
hi:
type: number
- type: 'null'
qhat:
type:
- number
- 'null'
qhat_unit:
enum:
- label
- scale
- score
scale:
type:
- number
- 'null'
abstain:
type: boolean
reason:
enum:
- covered
- set_too_large
- interval_too_wide
- intent_not_in_region
- under_calib
- no_label_schema
- budget_exhausted
- clock_expired
- upstream_timeout
- attestation_absent
- attestation_refused
- binding_broken
- non_evaluable
- calib_silence
- calib_vetoed
- calib_retired
- out_of_support
- region_degenerate
residual:
type: array
items:
type: string
pattern: ^[ -~]+$
scores:
type: array
items:
type: number
scores_sha256:
type: string
pattern: ^[0-9a-f]{64}$
cell_key:
type:
- string
- 'null'
pattern: ^[ -~]+$
minLength: 1
policy_row_sha256:
type:
- string
- 'null'
pattern: ^[0-9a-f]{64}$
policy_table_sha256:
type:
- string
- 'null'
pattern: ^[0-9a-f]{64}$
produced_at:
type: string
format: date-time
remaining_budget:
type: number
request_sha256:
type: string
pattern: ^[0-9a-f]{64}$
reason:
enum:
- covered
- set_too_large
- interval_too_wide
- intent_not_in_region
- under_calib
- no_label_schema
- budget_exhausted
- clock_expired
- upstream_timeout
- attestation_absent
- attestation_refused
- binding_broken
- non_evaluable
- calib_silence
- calib_vetoed
- calib_retired
- out_of_support
- region_degenerate
content:
type: array
items:
type: object
additionalProperties: false
required:
- type
- text
properties:
type:
const: text
text:
type: string
'400':
description: Input failed the frozen schema, or the tool refused the input (never a silent result).
content:
application/json:
schema:
oneOf:
- type: object
additionalProperties: false
required:
- error
- operation
- message
- code
properties:
error:
const: tool_error
operation:
type: string
minLength: 1
message:
type: string
code:
enum:
- param_invalid
- schema_version_unsupported
- byo_calibration_invalid
- byo_yhat_type
- byo_set_tau_cap
- yhat_type_mismatch
- liq_yhat_domain
- attested_inconsistent
- task_class_unknown
- byo_overrides_committed
- byo_edge_blank
- byo_lookalike_committed
- byo_reserved_kata
- byo_lookalike_confusable
- produced_at_invalid
- produced_at_future
- policy_alpha_mismatch
- policy_nmin_mismatch
- task_class_retired
- attest_refused
- calibrate_input_invalid
- cascade_input_invalid
- ukemi_predict_input_invalid
- kata_key_invalid
- kata_yhat_domain
- features_digest_required
- policy_tau_cap
- produced_at_off_grid
- produced_at_stale
- type: object
additionalProperties: false
required:
- error
- operation
- message
- code
- issues
properties:
error:
const: invalid_input
operation:
type: string
minLength: 1
message:
type: string
code:
const: input_invalid
issues:
type: array
- type: object
additionalProperties: false
required:
- error
- operation
- message
- code
properties:
error:
const: invalid_json
operation:
type: string
minLength: 1
message:
type: string
code:
const: json_invalid
'403':
description: Origin present and not a monarkgate.tech origin (K-9).
'413':
description: The request body is larger than the harness cap (payload_too_large); the connection is closed.
'500':
description: The tool output broke its frozen contract, or the tool failed (both name the operation); or the request failed in transport (no operation); never a stack.
content:
application/json:
schema:
oneOf:
- type: object
additionalProperties: false
required:
- error
- operation
properties:
error:
const: internal_error
operation:
type: string
minLength: 1
code:
const: output_invalid
- type: object
additionalProperties: false
required:
- error
properties:
error:
const: internal_error
tags:
- Gate