Skip to content

API Reference

All endpoints return JSON with a consistent format:

{"success": true, "data": {...}}
{"success": false, "error": {"code": "...", "message": "..."}}

Full interactive reference: http://your-server:5000/api/v1/docs

Endpoints

ActionMethodEndpoint
VersionGET/api/v1/version
List projectsGET/api/v1/projects
Create projectPOST/api/v1/projects
Project detailGET/api/v1/projects/<name>
Update settingsPATCH/api/v1/projects/<name>
Rename projectPOST/api/v1/projects/<name>/rename
Delete projectDELETE/api/v1/projects/<name>
Retry setupPOST/api/v1/projects/<name>/setup/retry
Start trainingPOST/api/v1/projects/<name>/training/start
Stop trainingPOST/api/v1/projects/<name>/training/stop
Check statusGET/api/v1/projects/<name>/training/status
Get logsGET/api/v1/projects/<name>/logs?tail=100
Episode analysisGET/api/v1/projects/<name>/logs/analysis
Get metricsGET/api/v1/projects/<name>/tensorboard/latest
Run historyGET/api/v1/projects/<name>/runs
List branchesGET/api/v1/projects/<name>/branches
Switch branchPOST/api/v1/projects/<name>/branch
Run artifactsGET/api/v1/projects/<name>/runs/<run_id|latest>/files
List filesGET/api/v1/projects/<name>/files
Download fileGET/api/v1/projects/<name>/files/<path>
Busy checkGET/api/v1/busy
System statsGET/api/v1/stats
CapacityGET/api/v1/capacity

Starting a Training Run

The /training/start endpoint accepts an optional branch parameter to override the project’s default branch:

Terminal window
curl -X POST http://your-server:5000/api/v1/projects/my-project/training/start \
-H 'Content-Type: application/json' \
-d '{"branch": "experiment/new-arch"}'

Training Status

The /training/status response includes a runs array, one entry per active run:

{
"success": true,
"data": {
"runs": [
{"run_id": 42, "branch": "main", "status": "running", "pid": 12345, "elapsed": 183.4}
]
}
}

TensorBoard Metrics Analysis

The /tensorboard/latest endpoint analyzes your training metrics and returns insights:

Terminal window
curl http://your-server:5000/api/v1/projects/my-project/tensorboard/latest?detail=medium

Which run is analyzed?

  • If training is running, it analyzes the current active run
  • If training is idle, it analyzes the most recent completed run
  • The response includes is_active: true/false to indicate which

To compare with past runs:

Terminal window
# List all runs
curl http://your-server:5000/api/v1/projects/my-project/runs
# Get metrics for a specific past run
curl http://your-server:5000/api/v1/projects/my-project/runs/3/metrics

Response Fields

FieldDescription
trendOverall direction: improving, stable, worsening, or unstable
recent_trendTrend of the last 20% of steps — computed on EMA-smoothed values
late_slope_pctSlope of the last 20% of training, normalized as % of total metric range
peak_valueBest smoothed value reached during the run
peak_stepStep at which the smoothed peak occurred
peak_reversal_pctHow far the metric has moved away from its peak, as % of total range
smoothed_final_valueEMA-smoothed value at the end of the run
convergedBoolean — has the metric stabilized?
anomaliesArray of unusual spikes or drops
summaryHuman-readable interpretation

Detail Levels

Use ?detail=low|medium|high:

  • low (default) — summary stats only
  • medium — adds smoothed_points: ~100 EMA-smoothed data points for plotting or trend interpretation
  • high — also adds raw sampled points

Peak detection uses EMA smoothing (alpha=0.9), matching TensorBoard’s heavy smoothing setting. peak_reversal_pct > 50 on a reward metric is a reliable signal that the model peaked and has meaningfully regressed.

Episode Analysis (Log-Based)

The /logs/analysis endpoint parses episode data directly from training logs — useful when TensorBoard isn’t configured:

Terminal window
curl http://your-server:5000/api/v1/projects/my-project/logs/analysis

Returns trend analysis, quartile breakdown, and recent averages for episode rewards.

Authentication

If auth is enabled, pass your API key as a header:

Terminal window
curl -H 'X-API-Key: your-api-key' http://your-server:5000/api/v1/projects

Generate and manage API keys from the Admin panel.