Forecast
1 creditGET /api/premium/forecastThe forecast endpoint runs a linear least-squares fit over 7-90 days of historical price or benchmark data and projects 1-30 days forward with a 95% prediction interval. The response includes a confidence score and label (low/medium/high) so agents can ignore low-signal forecasts. Includes explicit "statistical inference, not a guarantee" disclaimers.
When to use this endpoint
When you need a planning estimate for where a price or benchmark is headed. Treat low-confidence forecasts as no signal rather than a directional call.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
| target* | query | string | price or benchmark |
| model* | query | string | Model id or display name |
| field | query | string | For price target: inputPrice, outputPrice, blended |
| benchmark | query | string | For benchmark target: swe_bench, mmlu_pro, etc. |
| lookback | query | integer | Days of history to fit on (7-90, default 30) |
| horizon | query | integer | Days to project forward (1-30, default 7) |
* required
Example response
{
"ok": true,
"target": "price", "model": "Claude Opus 4.7", "field": "blended",
"current_value": 36,
"trend": { "slope_per_day": -0.31, "r_squared": 0.78 },
"confidence": { "score": 0.7, "label": "high" },
"forecast": [
{ "date": "2026-04-28", "predicted": 35.69, "lower": 34.2, "upper": 37.18 }
],
"notes": ["Statistical inference, not a guarantee..."]
}Code samples
Python SDK
from tensorfeed import TensorFeed
tf = TensorFeed(token="tf_live_...")
f = tf.forecast(target="price", model="Claude Opus 4.7", field="blended")
print(f"Confidence: {f['confidence']['label']}")TypeScript SDK
import { TensorFeed } from 'tensorfeed';
const tf = new TensorFeed({ token: 'tf_live_...' });
const f = await tf.forecast({ target: 'price', model: 'Claude Opus 4.7', field: 'blended' });MCP tool
Available via the TensorFeed MCP server as forecast. Add npx -y @tensorfeed/mcp-server to your Claude Desktop or Claude Code MCP config.