Part of DOIN Network ยท Open Source ยท MIT License

ML Predictions
as a Service.
Pay per request.

DOIN Forecast Provider is a decentralized ML prediction marketplace. Providers register models and earn per prediction. Clients access verified ML forecasts via REST API.

$ pip install prediction-provider click to copy

Three roles, one platform

A complete marketplace connecting ML model providers with prediction consumers.

๐Ÿ›ก๏ธ

Admin

Manage the platform, users, and billing.

  • User activation & role management
  • System configuration & monitoring
  • Billing oversight & API key management
  • Model approval & quality control
๐Ÿง 

Provider

Register your ML models and earn from predictions.

  • Register trained models (Keras, PyTorch, etc.)
  • Set pricing per prediction request
  • Monitor usage analytics & earnings
  • Update models with improved versions
๐Ÿ“ก

Client

Access verified ML predictions via API.

  • Browse available prediction models
  • Request predictions via REST API
  • Pay per request with transparent billing
  • Get confidence intervals & uncertainty estimates

Production-grade prediction serving

Built for reliability, security, and scale.

๐Ÿ”Œ

Plugin Architecture

Every component is a plugin: core, endpoints, feeder, pipeline, and predictor. Swap any part without touching the rest.

๐Ÿค–

Multi-Model Support

Run multiple ML models simultaneously. Keras, TensorFlow, PyTorch โ€” any framework through the predictor plugin interface.

๐Ÿ’ฐ

Per-Request Billing

Transparent pay-per-prediction billing. Providers set prices, clients pay per request. Full accounting trail.

๐Ÿงช

Noisy Ideal Testing

Validate model quality with synthetic noisy-ideal data. Ensures predictions meet accuracy thresholds before serving.

๐ŸŒ

REST API

Complete FastAPI-based REST API with OpenAPI docs. Authentication, prediction requests, user management, model registry.

๐Ÿ“Š

Monte Carlo Uncertainty

Confidence intervals via MC dropout sampling. Know not just the prediction, but how confident the model is.

๐Ÿ”

JWT Security

API key authentication, JWT tokens, role-based access control, user activation workflow. Production security out of the box.

โš™๏ธ

Configurable Logging

Fine-grained log levels via config, CLI, or PREDICTION_PROVIDER_QUIET=1 environment variable for silent operation.

Simple REST interface

Request predictions with a single API call.

# Authenticate curl -X POST http://localhost:8000/auth/token \ -d '{"username": "client1", "password": "secret"}' # Request a prediction curl -X POST http://localhost:8000/predictions/request \ -H "Authorization: Bearer <token>" \ -H "Content-Type: application/json" \ -d '{ "instrument": "EUR_USD", "prediction_horizon": 6, "model_id": "transformer_1h" }' # Response { "prediction": [1.0842, 1.0845, 1.0838, 1.0851, 1.0847, 1.0853], "confidence": 0.87, "uncertainty": [0.0012, 0.0015, 0.0018, 0.0021, 0.0024, 0.0027], "model": "transformer_1h_v3", "cost": 0.001 }

Running in 2 minutes

Install, configure, serve predictions.

# Clone and install git clone https://github.com/harveybc/prediction_provider.git cd prediction_provider pip install -e . # Run the server python -m app.main --host 0.0.0.0 --port 8000 # Run in quiet mode PREDICTION_PROVIDER_QUIET=1 python -m app.main # Or with a config file python -m app.main --load_config config.json --log_level WARNING # API docs available at open http://localhost:8000/docs

Serve predictions, earn rewards

Open source prediction marketplace, connected to the DOIN trading ecosystem.