Complete guide for developers and AI agents
Train a model in 3 steps:
curl https://warpgbm.ai/healthz
curl -X POST https://warpgbm.ai/train \
-H "Content-Type: application/json" \
-d '{
"X": [[1,2,3], [4,5,6], [7,8,9]],
"y": [0, 1, 2],
"model_type": "lightgbm",
"objective": "multiclass",
"num_class": 3,
"num_trees": 100
}'
curl -X POST https://warpgbm.ai/predict_from_artifact \
-H "Content-Type: application/json" \
-d '{
"artifact_id": "<artifact_id_from_training>",
"X": [[2,3,4], [5,6,7]]
}'
Feature | MCP Service | Python Package |
---|---|---|
Install | None needed | pip install git+... |
GPU | Cloud (pay-per-use) | Your GPU (free) |
Features | Train, predict, upload | Full API + cross-val + feature importance |
Best For | Quick experiments | Production pipelines |
Check service health and GPU availability
List all available model backends (warpgbm, lightgbm)
Train a gradient boosting model. Returns a portable model artifact.
Required: X
, y
Optional: model_type
, objective
, num_trees
, learning_rate
, etc.
Make predictions using a trained model artifact.
Required: X
, and either artifact_id
or model_artifact
Upload CSV or Parquet files for training. Returns structured X and y arrays.
Required: file_content
(base64), file_format
, target_column
Submit feedback about the service (bugs, feature requests, etc.)
Required: feedback_type
, message
num_trees
, max_depth
, learning_rate
, num_bins
num_trees
, max_depth
, learning_rate
, num_leaves
For datasets too large to send as JSON arrays, use the data upload endpoint:
import base64
import requests
# Read your CSV file
with open('data.csv', 'rb') as f:
file_content = base64.b64encode(f.read()).decode()
response = requests.post(
'https://warpgbm.ai/upload_data',
json={
'file_content': file_content,
'file_format': 'csv',
'target_column': 'target',
'feature_columns': ['feat1', 'feat2', 'feat3'] # optional
}
)
# Response includes X, y arrays ready for training
data = response.json()
print(f"Loaded {data['num_samples']} samples, {data['num_features']} features")
This service supports X402 micropayments on Base network:
Payment is optional for demo/testing. See /.well-known/x402 for details.
For AI agents using the MCP protocol:
/mcp/sse
train
, predict_from_artifact
, list_models
, get_agent_guide