Developer Reference

API Documentation

Talivio Seismic Platform REST API — FastAPI · OpenAPI 3.1

🔓 Authentication: Free usage is subject to an IP-based rate limit (60 req/min). Paid API key raises the limit to 1,000 req/hour. Key: Authorization: Bearer tvio_... or ?api_key=tvio_...
Prediction Endpoints
POST /api/v1/predict/bands Multi-band ML prediction (M4-5, M5-6, M6-7, M7+)
POST /api/v1/predict Legacy single-score prediction (backwards compatibility)
Pydantic Schemas

Data Models

BandPrediction
bandstrM4-5 / M5-6 / M6-7 / M7+
risk_scorefloat0.0 – 1.0
risk_percentfloat0.0 – 100.0
risk_labelstrLow / Medium / High / Critical
algorithmstrWinning algorithm name
roc_aucfloatTest set ROC-AUC
MultiBandPredictRequest
latfloatRequired
lonfloatRequired
datestr?YYYY-MM-DD, optional
save_forecastboolDefault false
ForecastRecord
idintPrimary key
bandstrMagnitude band
risk_scorefloatScore at prediction time
outcomestrpending / hit / miss / expired
created_atdatetimeRecord timestamp
CelestialResponse
datestrYYYY-MM-DD
tidal_stressfloat0–1 normalised tidal stress
full_indexfloatComposite celestial index
is_high_riskboolAbove threshold?
moon_phasestrMoon phase name
Ready-to-use Examples

cURL Examples

# Multi-band prediction — Istanbul
curl -X POST "https://earthquake.talivio.com/api/v1/predict/bands" \
  -H "Content-Type: application/json" \
  -d '{"lat": 41.01, "lon": 28.97, "date": "2026-04-07"}'

# Multi-band prediction — Tokyo (save forecast)
curl -X POST "https://earthquake.talivio.com/api/v1/predict/bands" \
  -H "Content-Type: application/json" \
  -d '{"lat": 35.69, "lon": 139.69, "save_forecast": true}'

# Celestial stress components — today
curl "https://earthquake.talivio.com/api/v1/celestial/2026-04-07"

# Recent USGS earthquakes last 7 days (M5+)
curl "https://earthquake.talivio.com/api/v1/data/usgs/recent?days=7&min_mag=5.0"

# Band model status
curl "https://earthquake.talivio.com/api/v1/ml/bands/status"

# Verify pending forecasts against USGS
curl -X POST "https://earthquake.talivio.com/api/v1/forecasts/verify" \
  -H "Content-Type: application/json" -d '{}'

# System health check
curl "https://earthquake.talivio.com/api/v1/health"

# Request with API key (header)
curl -H "Authorization: Bearer tvio_YOUR_KEY_HERE" \
  "https://earthquake.talivio.com/api/v1/predict/bands" \
  -X POST -H "Content-Type: application/json" \
  -d '{"lat": 41.01, "lon": 28.97}'

# Verify API key
curl -H "Authorization: Bearer tvio_YOUR_KEY_HERE" \
  "https://earthquake.talivio.com/api/v1/apikey/verify"

# Usage statistics
curl "https://earthquake.talivio.com/api/v1/apikey/usage?api_key=tvio_YOUR_KEY_HERE"