Public API & Data Contracts

Machine-readable REST API endpoints, OpenAPI 3.1 specification, and M31A autonomous agent contract

M31A Autonomous Agent Contract

The canonical TOML registry publishes a deterministically derived JSON representation at /data/m31a-models.json directly compatible with the M31A autonomous agent runtime cache (~/.config/m31a/models_cache.json). Newly discovered models appear automatically with zero frontend or client code modifications.

Available HTTP Endpoints (v1)

GET/api/v1/models

Query, search, filter, and paginate through canonical NVIDIA models.

Parameters: query, publisher, modality, access, capability, minContext, maxContext, priceOnly, probeEligibleOnly, page, pageSize, sort, order
GET/api/v1/models/[id]

Retrieve full specifications, pricing, and observed status for a specific model.

Parameters: id (path parameter, e.g. nvidia/nemotron-4-340b-instruct or meta/llama-3.3-70b-instruct)
GET/api/v1/models/[id]/status

Retrieve derived public status, probe success rate, and average response latency.

Parameters: id (path parameter)
GET/api/v1/models/[id]/history

Retrieve historical synthetic probe time-series (latency, TTFT, throughput).

Parameters: id (path parameter), limit (query parameter, default: 50)
GET/api/v1/status

System health summary with operational status distributions and recent probe cycles.

Parameters: None
GET/api/v1/catalog

Export the complete validated canonical catalog metadata.

Parameters: None
GET/api/v1/health

Service health check and database persistence status.

Parameters: None
POST/api/v1/ingest

Protected internal endpoint for monitoring workers to submit batch probe results.

Parameters: Authorization: Bearer <INGESTION_SECRET>, JSON body adhering to IngestionPayloadSchema

Client Query Examples

cURL Query Models
# Search models with reasoning capability
curl "https://models.m31a.tonmoyinfrastructure.org/api/v1/models?capability=reasoning&pageSize=10"
Python Fetch Status
import requests

resp = requests.get("https://models.m31a.tonmoyinfrastructure.org/api/v1/status")
print(resp.json())