{"authentication":{"enabled":true,"method":"X-API-Key header","note":"Include X-API-Key header with your API key"},"automation":{"upcoming_updates":{"disable_env":"UPCOMING_AUTO_ENABLED=false","enabled_by_default":true,"interval_minutes":"60","model_version":"1.0","window_hours":"48"}},"batch_prediction":{"description":"Efficient batch processing for historical analysis and live updates","request_format":{"end_date":"Optional: YYYY-MM-DD format (default: open-ended)","force_repredict":"Optional: Ignore existing predictions (default: false)","max_age_hours":"Optional: Re-predict if older than X hours (null = skip age check)","model_version":"Required: Version identifier for tracking","repredict_if_changed":"Optional: Re-predict if race data changed (default: true)","reverse":"Optional: Process newest races first (default: false)","start_date":"Optional: YYYY-MM-DD format (default: today)"},"usage_patterns":{"daily_run":"Use defaults with current model_version","gap_filling":"Set max_age_hours: null to only fill missing predictions","new_model":"Use force_repredict: true with reverse: true","smart_update":"Use repredict_if_changed: true with max_age_hours: 6"}},"endpoints":{"GET /config":"Get current prediction configuration (no auth required)","GET /health":"Health check (no auth required)","GET /predict/<race_id>":"Get win probability predictions for a specific race (auth required)","GET /predictions/history":"Get prediction history for races (no auth required)","GET /predictions/status":"Get status of current batch prediction job (no auth required)","GET /recent-races?days=N":"Get recent races (no auth required)","GET /simple-predict/<race_id>":"Get simple predictions (runner ID and win percentage) (auth required)","POST /config/reload":"Reload prediction configuration from file (auth required)","POST /predictions/cancel":"Cancel current batch prediction job (auth required)","POST /predictions/update":"Start batch prediction job (auth required)","POST /predictions/update-upcoming":"Update races in the next 48h window (auth required)","POST /reload-model":"Reload the transformer model from disk (auth required)"},"example_usage":{"batch_history":"/predictions/history?start_date=2024-01-01&limit=50","batch_status":"/predictions/status","batch_upcoming":"POST /predictions/update-upcoming","batch_update":"POST /predictions/update with JSON payload","predict_race":"/predict/rac_11639043","recent_races":"/recent-races?days=5","simple_predict":"/simple-predict/rac_11639043"},"model":{"available":true,"loaded":true,"type":"CanonicalFieldTransformer"},"model_details":{"advantages":["Processes entire race fields together","Learns competitive dynamics between horses","Fully customizable probability spreads via config file","No hardcoded modes - pure config-driven approach","Hot-reload settings without restarting API","Fine-grained control over amplification and separation","Efficient batch processing for large-scale analysis","Easy CPU/GPU switching for different deployment environments"],"configuration":{"config_file":"config/prediction_settings.json","current_target_spread":"15-30%","customizable_parameters":["Temperature scaling","Separation factors","Amplification factors","Power transformations","Anti-dominance thresholds","Minimum probabilities","Debug options","Device selection (CPU/GPU)"]},"description":"Win probability predictions using temporal sequence attention","device_control":{"description":"Control whether model runs on CPU or GPU","environment_variable":"FORCE_CPU","usage":{"auto_select":"export FORCE_CPU=false (default)","current_device":"cpu","current_setting":true,"force_cpu":"export FORCE_CPU=true"},"use_cases":{"automatic":"Leave FORCE_CPU unset for automatic GPU/CPU selection","cpu_only_deployment":"Set FORCE_CPU=true for servers without GPU","gpu_deployment":"Set FORCE_CPU=false to use GPU if available","testing_cpu_performance":"Set FORCE_CPU=true to test CPU inference speed"}},"features":["Field-aware competitive processing","Temporal sequence attention mechanisms","Config-driven probability distributions with customizable spreads","Data leakage protection","GPU acceleration support","Hot-reloadable configuration","Batch prediction with smart re-prediction logic","CPU/GPU device control via environment variable"]},"name":"Horse Racing Prediction API - CanonicalFieldTransformer","version":"2.0.0"}
