API Reference

REST API and Python SDK for programmatic fleet management. Base URL: https://api.mlsrvyn.com/v1. All requests require Authorization: Bearer <api-key>.

Models

GET /models

List all registered model endpoints in the workspace.

GET /models/{model_id}

Get current status, archetype, SLO compliance, and replica count for a single model.

PATCH /models/{model_id}/policy

Update scaling policy for a model. Accepts partial updates — only fields included in the request body are changed.

Metrics

GET /models/{model_id}/metrics

Time-series latency histogram and utilization data. Query params: start, end (Unix timestamps), resolution (1m/5m/1h).

GET /models/{model_id}/slo-status

Current SLO compliance status with p50/p90/p99 against configured targets.

Scaling Events

GET /models/{model_id}/events

Scaling event log: scale-up/down triggers with reason, timestamp, and replica delta. Paginated.

POST /models/{model_id}/scale

Manually trigger a scaling event. Body: {"target_replicas": N, "reason": "string"}. Useful for planned traffic events.

Python SDK example