API Reference
GoServe provides a REST API for model management and inference.
Server Information
GET /
Returns information about the server.
Response:
{
"name": "GoServe",
"version": "0.1.0-dev",
"message": "Welcome to GoServe - Fast ML Model Server"
}
Health Checks
GET /health
Liveness check. Returns 200 OK if the server is running.
GET /ready
Readiness check. Returns 200 OK if the server is ready to accept requests.
Monitoring
GET /metrics
Exposes Prometheus metrics.
Response: Prometheus text format.
Model Management
GET /v1/models
Lists all loaded models.
Response:
{
"models": [
{
"name": "fraud_detector",
"path": "models/fraud_detector.onnx",
"input_nodes": ["float_input"],
"output_nodes": ["label", "probabilities"]
}
]
}
POST /v1/models
Loads a new model.
Request Body:
Inference
POST /v1/models/{model_name}/infer
Executes inference using the specified model.
Current Limitation (WIP)
Currently, the inference engine is optimized for the Credit Card Fraud Detection model (XGBoost/ONNX). - Inputs: Expects a batch of 30 float32 features. - Outputs: Optimized for binary classification probabilities (batch x 2).
Work is in progress to support generic ONNX models with arbitrary input/output shapes and types.
Request Body:
Response: