{"openapi":"3.1.0","info":{"title":"MOEModels public API","version":"1.1.0","description":"Versioned model evidence, calculated checkpoint-residency lower bounds, reported benchmark claims, deployment-validation plans, and the hosted evidence service for Deployment Passports. Calculated outputs are not measured performance or deployment certification.","license":{"name":"Apache-2.0","identifier":"Apache-2.0"}},"servers":[{"url":"https://moemodels.ai","description":"Public API"}],"tags":[{"name":"Catalogue","description":"Hub-derived records computed mechanically from publisher metadata. Never measurements."},{"name":"Registry","description":"Sourced exact-artifact records."},{"name":"Planning","description":"Deterministic calculations and validation plans."},{"name":"Evidence","description":"Owner-reported claims and normalized runs."},{"name":"Passports","description":"The hosted evidence service. Organisations submit Deployment Passports with an API key; the server runs the @moemodels/bench verifier, stores the exact canonical bytes, and serves public records as a live registry. A Passport proves the record was not altered and who signed it; it does not by itself prove which weights or hardware served it."}],"paths":{"/api/v1/openapi":{"get":{"operationId":"getOpenApiDocument","summary":"Get this OpenAPI 3.1 document","responses":{"200":{"description":"The machine-readable REST contract for the public API.","content":{"application/json":{"schema":{"type":"object"}}}}}}},"/api/v1/catalog":{"get":{"operationId":"getHubCatalog","tags":["Catalogue"],"summary":"Get the Hub-derived catalogue of expert-routed repositories","description":"Records computed mechanically from Hugging Face Hub API responses. Evidence class `hub_derived`: exact where the artifact is exact, undetermined with a reason where the Hub does not establish a value. It is not a measurement and carries no quality score. Published under CC BY 4.0.","parameters":[{"name":"format","in":"query","description":"`json` returns the full manifest; `csv` returns a flat projection for bulk analysis.","schema":{"type":"string","enum":["json","csv"],"default":"json"}},{"name":"moe","in":"query","description":"Restrict to expert-routed repositories.","schema":{"type":"boolean"}},{"name":"arch","in":"query","description":"Restrict to one architecture family, matched against `config.model_type`.","schema":{"type":"string"}},{"name":"limit","in":"query","required":false,"description":"Maximum records to return.","schema":{"type":"integer","default":100,"minimum":1,"maximum":100000}}],"responses":{"200":{"description":"The catalogue manifest, or a CSV projection when `format=csv`. The record count is repeated in the `X-MOEModels-Catalog-Records` header.","content":{"application/json":{"schema":{"type":"object"}},"text/csv":{"schema":{"type":"string"}}}}}}},"/api/v1/catalog/{id}":{"get":{"operationId":"getHubCatalogRecord","tags":["Catalogue"],"summary":"Get one catalogue record with its provenance intact","description":"The id is the repository address `owner/name`, percent-encoded, so `openai/gpt-oss-20b` is requested as `openai%2Fgpt-oss-20b`.","parameters":[{"name":"id","in":"path","required":true,"description":"Percent-encoded `owner/name` repository address.","schema":{"type":"string"}}],"responses":{"200":{"description":"One record, every field carrying the API field it was derived from.","content":{"application/json":{"schema":{"type":"object"}}}},"404":{"description":"The repository is not in this snapshot.","content":{"application/json":{"schema":{"type":"object"}}}}}}},"/api/v1/registry":{"get":{"operationId":"getRegistry","tags":["Registry"],"summary":"Get the versioned model and hardware registry","responses":{"200":{"description":"A registry containing sourced facts and explicit unknowns.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Registry"}}}}}}},"/api/v1/fit":{"get":{"operationId":"calculateStaticFit","tags":["Planning"],"summary":"Calculate a checkpoint-residency lower bound","description":"Uses exact checkpoint tensor bytes and advertised accelerator memory. It does not measure runtime compatibility, KV cache, throughput, latency, or cost.","parameters":[{"name":"model","in":"query","schema":{"type":"string","default":"kimi-k3"}},{"name":"hardware","in":"query","schema":{"type":"string","default":"h200"}},{"name":"devices","in":"query","required":false,"description":"Requested accelerator count.","schema":{"type":"integer","default":8,"minimum":1,"maximum":4096}},{"name":"devicesPerNode","in":"query","required":false,"description":"Accelerators in one planning node.","schema":{"type":"integer","default":8,"minimum":1,"maximum":256}},{"name":"reserveBps","in":"query","required":false,"description":"Capacity reserve in basis points.","schema":{"type":"integer","default":1300,"minimum":0,"maximum":9999}}],"responses":{"200":{"description":"Calculated static fit with limitations.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FitResponse"}}}},"400":{"$ref":"#/components/responses/InvalidInput"},"404":{"$ref":"#/components/responses/NotFound"}}}},"/api/v1/plan":{"get":{"operationId":"createDeploymentValidationPlan","tags":["Planning"],"summary":"Create a deterministic deployment-validation plan","description":"Returns a calculated static verdict and ordered evidence gates. The response contains no measured performance prediction.","parameters":[{"name":"model","in":"query","schema":{"type":"string","default":"kimi-k3"}},{"name":"hardware","in":"query","schema":{"type":"string","default":"h200"}},{"name":"devices","in":"query","required":false,"description":"Requested accelerator count.","schema":{"type":"integer","default":8,"minimum":1,"maximum":4096}},{"name":"devicesPerNode","in":"query","required":false,"description":"Accelerators in one planning node.","schema":{"type":"integer","default":8,"minimum":1,"maximum":256}},{"name":"reserveBps","in":"query","required":false,"description":"Capacity reserve in basis points.","schema":{"type":"integer","default":1300,"minimum":0,"maximum":9999}},{"name":"runtime","in":"query","schema":{"type":"string","default":"unspecified","pattern":"^[a-z0-9][a-z0-9._-]{0,63}$"}},{"name":"inputTokens","in":"query","required":false,"description":"Target input length.","schema":{"type":"integer","default":4096,"minimum":1,"maximum":10000000}},{"name":"outputTokens","in":"query","required":false,"description":"Target output length.","schema":{"type":"integer","default":1024,"minimum":1,"maximum":1000000}},{"name":"concurrency","in":"query","required":false,"description":"Simultaneous requests.","schema":{"type":"integer","default":1,"minimum":1,"maximum":100000}},{"name":"targetTtftMs","in":"query","required":false,"description":"P95 time-to-first-token target in milliseconds.","schema":{"type":"integer","default":1000,"minimum":1,"maximum":600000}},{"name":"targetInterTokenMs","in":"query","required":false,"description":"P95 inter-token target in milliseconds.","schema":{"type":"integer","default":50,"minimum":1,"maximum":60000}},{"name":"availability","in":"query","schema":{"type":"string","enum":["single","ha"],"default":"single"}}],"responses":{"200":{"description":"A versioned validation plan with explicit unknowns.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PlanResponse"}}}},"400":{"$ref":"#/components/responses/InvalidInput"},"404":{"$ref":"#/components/responses/NotFound"}}}},"/api/v1/evaluations":{"get":{"operationId":"listEvaluationEvidence","tags":["Evidence"],"summary":"List evaluation evidence without merging evidence classes","parameters":[{"name":"model","in":"query","schema":{"type":"string"}},{"name":"suite","in":"query","schema":{"type":"string"}},{"name":"artifactAssociation","in":"query","schema":{"type":"string","enum":["artifact_snapshot_associated","model_name_only"]}}],"responses":{"200":{"description":"Owner-reported claims, normalized runs, sources, and counts.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"$ref":"#/components/responses/InvalidInput"}}}},"/api/v1/evaluations/{id}":{"get":{"operationId":"getEvaluationEvidence","tags":["Evidence"],"summary":"Get one claim or normalized run with supporting evidence","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","minLength":1}}],"responses":{"200":{"description":"Evidence record, referenced sources, and raw artifacts when available.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"404":{"$ref":"#/components/responses/NotFound"}}}},"/api/v1/evidence/passports":{"post":{"operationId":"submitPassport","tags":["Passports"],"summary":"Submit a Deployment Passport","description":"The body is the Passport document as `moemodels bench` wrote it, optionally with a top-level `visibility` of `private` (default) or `public`. The server verifies the Passport with @moemodels/bench; an invalid or tampered Passport is refused with the verifier report and nothing is stored. Stored records are identified by `documentSha256`, the SHA-256 of the canonical bytes of the whole envelope, which differs from `passportId` (the payload digest) once signatures are appended. Submitting the same bytes twice returns the existing record with status 200. Bodies are capped at 16 MiB and keys at 30 submissions per minute per server instance.","security":[{"apiKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PassportSubmission"}}}},"responses":{"200":{"description":"Already stored for this organisation; the existing record, unchanged.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PassportReceipt"}}}},"201":{"description":"Stored. The `Location` header is the bytes endpoint.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PassportReceipt"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"413":{"description":"The body exceeds 16 MiB.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Refused: `passport_invalid` when the Passport does not verify, `passport_incomplete` when it verifies but its reproducibility gates are not complete. `failedGates` names the gates; `verification` is the full verifier report.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PassportRejected"}}}},"429":{"description":"Rate limited; see `Retry-After`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"$ref":"#/components/responses/ServiceUnavailable"}}},"get":{"operationId":"listPassports","tags":["Passports"],"summary":"List public Passport records, plus the caller's private ones when a key is presented","description":"Exact-match filters on the artifact repository, the runtime name and the hardware string as declared in the Passport. Public responses are cacheable; responses to a key are `no-store`.","security":[{},{"apiKey":[]}],"parameters":[{"name":"model","in":"query","description":"Artifact repository, e.g. `mlx-community/Qwen3-Coder-30B-A3B-Instruct-8bit`.","schema":{"type":"string","maxLength":200}},{"name":"runtime","in":"query","description":"Runtime name as declared, e.g. `mlx-lm`.","schema":{"type":"string","maxLength":200}},{"name":"hardware","in":"query","description":"Hardware string as declared.","schema":{"type":"string","maxLength":200}},{"name":"limit","in":"query","required":false,"description":"Maximum records to return.","schema":{"type":"integer","default":100,"minimum":1,"maximum":500}}],"responses":{"200":{"description":"Records newest first, each with its organisation, summary and verification state. Never the bytes.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PassportList"}}}},"400":{"$ref":"#/components/responses/InvalidInput"},"401":{"$ref":"#/components/responses/Unauthorized"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}}}},"/api/v1/evidence/passports/{sha}":{"get":{"operationId":"getPassportBytes","tags":["Passports"],"summary":"Get the exact stored bytes of a Passport","description":"Returns the canonical bytes exactly as stored, with `ETag` equal to the document SHA-256. Hash the body and compare; `moemodels verify` on the saved file reproduces the server's verdict. Private records are readable only with the owning organisation's key.","security":[{},{"apiKey":[]}],"parameters":[{"name":"sha","in":"path","required":true,"description":"Lowercase SHA-256 of the canonical document bytes.","schema":{"type":"string","pattern":"^[0-9a-f]{64}$"}}],"responses":{"200":{"description":"The Passport bytes.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"304":{"description":"`If-None-Match` matched the document digest."},"404":{"$ref":"#/components/responses/NotFound"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}}}},"/api/v1/evidence/passports/{sha}/verify":{"get":{"operationId":"verifyStoredPassport","tags":["Passports"],"summary":"Re-run the verifier on the stored bytes","description":"Recomputes the document digest from the stored bytes and runs @moemodels/bench `verifyEvidencePassport` at request time. The response carries the full report and the verdict stored at submission so the two can be compared.","security":[{},{"apiKey":[]}],"parameters":[{"name":"sha","in":"path","required":true,"schema":{"type":"string","pattern":"^[0-9a-f]{64}$"}}],"responses":{"200":{"description":"The recomputed verification.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PassportVerification"}}}},"404":{"$ref":"#/components/responses/NotFound"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}}}},"/api/v1/evidence/access-requests":{"post":{"operationId":"createAccessRequest","tags":["Passports"],"summary":"Request an API key for the evidence service","description":"Unauthenticated. Strictly validated; limited to ten requests per hour per client address per server instance. A key is issued by the lab after review, never automatically.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AccessRequest"}}}},"responses":{"202":{"description":"Recorded.","content":{"application/json":{"schema":{"type":"object","required":["accepted"],"properties":{"accepted":{"type":"boolean","const":true},"id":{"type":"string","format":"uuid"}}}}}},"400":{"$ref":"#/components/responses/InvalidInput"},"429":{"description":"Rate limited; see `Retry-After`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"$ref":"#/components/responses/ServiceUnavailable"}}}}},"components":{"securitySchemes":{"apiKey":{"type":"http","scheme":"bearer","description":"An evidence service API key (`moem_` followed by 40 characters), issued per organisation. The server stores only its SHA-256."}},"schemas":{"PassportSubmission":{"type":"object","description":"A Deployment Passport (schema 0.2.0, kind moemodels_deploybench_passport) with an optional `visibility`.","required":["schemaVersion","kind","passportId","canonicalization","payloadSha256","classification","payload","signatures"],"properties":{"visibility":{"type":"string","enum":["private","public"],"default":"private"},"schemaVersion":{"type":"string"},"kind":{"type":"string"},"passportId":{"type":"string","pattern":"^deploybench-passport-sha256-[0-9a-f]{64}$"},"payloadSha256":{"type":"string","pattern":"^[0-9a-f]{64}$"},"payload":{"type":"object","additionalProperties":true},"signatures":{"type":"array","items":{"type":"object","additionalProperties":true}}},"additionalProperties":true},"PassportSummary":{"type":"object","description":"Filterable digest of a verified Passport. Declared fields (artifact, runtime, hardware) are bound into the digest, not proven by it; measured fields were timed at the endpoint.","properties":{"label":{"type":"string"},"precision":{"type":"string"},"model":{"type":"string","description":"The artifact repository."},"artifact":{"type":"object","properties":{"repository":{"type":"string"},"revision":{"type":"string"}}},"runtime":{"type":"object","properties":{"name":{"type":"string"},"version":{"type":"string"}}},"hardware":{"type":"string"},"topology":{"type":"string"},"workloadSha256":{"type":"string"},"trials":{"type":"integer"},"requiredTrials":{"type":"integer"},"requests":{"type":"object","properties":{"attempted":{"type":"integer"},"successful":{"type":"integer"},"failed":{"type":"integer"}}},"successRate":{"type":"number"},"ttftMs":{"type":"object","properties":{"p50":{"type":"array","items":{"type":"number"}},"p95":{"type":"array","items":{"type":"number"}}}},"latencyMs":{"type":"object","properties":{"p50":{"type":"array","items":{"type":"number"}},"p95":{"type":"array","items":{"type":"number"}}}},"outputTokensPerSecond":{"type":"array","items":{"type":"number"},"description":"Per trial, in run order."},"measuredFrom":{"type":"string","format":"date-time"},"measuredTo":{"type":"string","format":"date-time"}},"additionalProperties":true},"PassportRecord":{"type":"object","required":["id","passportId","documentSha256","organisation","visibility","verification","summary","submittedAt","links"],"properties":{"id":{"type":"string","format":"uuid"},"passportId":{"type":"string"},"payloadSha256":{"type":"string"},"documentSha256":{"type":"string"},"organisation":{"type":"object","properties":{"slug":{"type":"string"},"name":{"type":"string"}}},"visibility":{"type":"string","enum":["private","public"]},"verification":{"type":"object","properties":{"valid":{"type":"boolean"},"signatureState":{"type":"string","enum":["unsigned","self_signed","trusted","invalid"]}}},"summary":{"$ref":"#/components/schemas/PassportSummary"},"submittedAt":{"type":"string","format":"date-time"},"links":{"type":"object","properties":{"document":{"type":"string"},"verify":{"type":"string"}}}}},"PassportList":{"type":"object","required":["apiVersion","count","scope","records"],"properties":{"apiVersion":{"type":"string","const":"v1"},"count":{"type":"integer"},"scope":{"type":"string","enum":["public","public_and_own"]},"records":{"type":"array","items":{"$ref":"#/components/schemas/PassportRecord"}}}},"PassportReceipt":{"type":"object","required":["id","passportId","documentSha256","verification","visibility","existing","links"],"properties":{"id":{"type":"string","format":"uuid"},"passportId":{"type":"string"},"payloadSha256":{"type":"string"},"documentSha256":{"type":"string"},"verification":{"type":"object","properties":{"valid":{"type":"boolean"},"signatureState":{"type":"string"}}},"visibility":{"type":"string","enum":["private","public"]},"organisation":{"type":"object","properties":{"slug":{"type":"string"},"name":{"type":"string"}}},"submittedAt":{"type":"string","format":"date-time"},"existing":{"type":"boolean","description":"True when the same bytes were already stored for this organisation."},"links":{"type":"object","properties":{"document":{"type":"string"},"verify":{"type":"string"}}}}},"PassportRejected":{"type":"object","required":["error","message","verification"],"properties":{"error":{"type":"string","enum":["passport_invalid","passport_incomplete"]},"message":{"type":"string"},"failedGates":{"type":"array","items":{"type":"string"}},"verification":{"type":"object","description":"The @moemodels/bench verification report; `issues` names every failing field.","additionalProperties":true}}},"PassportVerification":{"type":"object","required":["apiVersion","documentSha256","passportId","verifiedAt","verifier","bytesIntact","valid","signatureState","verification"],"properties":{"apiVersion":{"type":"string","const":"v1"},"documentSha256":{"type":"string"},"passportId":{"type":"string"},"verifiedAt":{"type":"string","format":"date-time"},"verifier":{"type":"object","properties":{"name":{"type":"string"},"version":{"type":"string"}}},"bytesIntact":{"type":"boolean","description":"The stored bytes still hash to `documentSha256`."},"recomputedDocumentSha256":{"type":"string"},"valid":{"type":"boolean"},"signatureState":{"type":"string","enum":["unsigned","self_signed","trusted","invalid"]},"storedVerdictAtSubmission":{"type":"boolean"},"verification":{"type":"object","additionalProperties":true,"nullable":true}}},"AccessRequest":{"type":"object","required":["organisation","email","hardwareClass","runtime"],"properties":{"organisation":{"type":"string","maxLength":200},"email":{"type":"string","format":"email","maxLength":320},"hardwareClass":{"type":"string","maxLength":200},"runtime":{"type":"string","maxLength":200},"note":{"type":"string","maxLength":2000}},"additionalProperties":false},"Registry":{"type":"object","required":["registryVersion","models","hardware","compatibility"],"properties":{"registryVersion":{"type":"string","const":"1.1.0"},"models":{"type":"array","items":{"type":"object","additionalProperties":true}},"hardware":{"type":"array","items":{"type":"object","additionalProperties":true}},"compatibility":{"type":"array","items":{"type":"object","additionalProperties":true}}},"additionalProperties":true},"FitResponse":{"type":"object","required":["apiVersion","registryVersion","model","hardware","input","fit"],"properties":{"apiVersion":{"type":"string","const":"v1"},"registryVersion":{"type":"string"},"fit":{"type":"object","description":"Calculated static checkpoint-residency result; never measured performance.","additionalProperties":true}},"additionalProperties":true},"PlanResponse":{"type":"object","required":["apiVersion","registryVersion","plan"],"properties":{"apiVersion":{"type":"string","const":"v1"},"registryVersion":{"type":"string"},"plan":{"type":"object","required":["schemaVersion","kind","readiness","validationGates"],"properties":{"schemaVersion":{"type":"string","const":"1.1.0"},"kind":{"type":"string","const":"deployment_validation_plan"},"readiness":{"type":"object","additionalProperties":true},"validationGates":{"type":"array","items":{"type":"object","additionalProperties":true}}},"additionalProperties":true}},"additionalProperties":true},"Error":{"type":"object","required":["error","message"],"properties":{"error":{"type":"string"},"message":{"type":"string"}},"additionalProperties":true}},"responses":{"Unauthorized":{"description":"The API key is missing, malformed, unknown or revoked.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"ServiceUnavailable":{"description":"The evidence service is not configured on this deployment, or its store did not answer.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"InvalidInput":{"description":"Invalid query input.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"NotFound":{"description":"The exact registry or evidence identity was not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}}