---
title: "Run prediction (forward inference) on a trained model over a date range"
method: POST
path: "/api/v1/predict"
tags: ["Prediction"]
---

# Run prediction (forward inference) on a trained model over a date range

`POST /api/v1/predict`

## Request

- Base URL: `https://api.quantifyme.ai`
- URL: `https://api.quantifyme.ai/api/v1/predict`
- Auth: API key in header `X-API-Key`

## Request body

- PredictRequest
  - `end_date` string, date
  - `model_name` string, required
  - `start_date` string, date

## Response `200`

Successful response

- PredictResponse
  - `n_signals` integer
  - `pnl` number
  - `signals` object[]
    - `close` number
    - `confidence` number: Deprecated alias of `score` (bridge templates read it). Classification only.
    - `predicted_return` number: Regression only: predicted forward return in decimal units (0.0018 = +0.18%). Not a score and not a probability.
    - `score` number: Classification only: raw predict_proba cutoff value. NOT a calibrated probability.
    - `task` 'classification' | 'regression'
    - `time` string
    - `type` string
  - `stats` TradeStats
    - `avg` number: Avg trade return (decimal pct)
    - `best` number
    - `expect` number: Expectancy ($/trade)
    - `losses` integer
    - `mdd` number: Max drawdown (decimal pct, signed)
    - `n` integer: Total trades
    - `np` number: Net profit ($)
    - `pf` number: Profit factor (gross wins / gross losses)
    - `ret` number: Total return (decimal pct)
    - `rr` number: Risk:Reward (avg win / avg loss)
    - `wins` integer
    - `worst` number
    - `wr` number: Win rate (0-1)
  - `win_rate` number

## Other responses

- `400`: Bad request
- `401`: Invalid or missing API key
- `429`: Rate limit exceeded, or insufficient credits (body carries credits_remaining and credits_required)

---

[API](https://skmtc.dev/quantifyme/apis/quantifyme-api.md) · [All operations](https://skmtc.dev/quantifyme/apis/quantifyme-api/llms.txt) · [OpenAPI document](https://skmtc.dev/quantifyme/apis/quantifyme-api/revisions/089d1cee1ec5?raw)
