← Developer Hub
Planning
Financial Forecasting
Generate and retrieve explainable, backtested FinanceGPT forecasts.
Version: v2
Stability: stable
Sandbox: Available
Production: Entitlement required
Target latency: ≤ 1,200 ms
POST
/api/v2/planning/forecastsRuns FinanceGPT planning intelligence with recorded model selection, forecast revision lineage and error metrics. It does not guarantee future outcomes.
Required scope:
planning:forecast:createTry it in the FinanceGPT sandbox
The playground uses deterministic isolated sandbox fixtures. It never queries production workspace data and does not require you to paste an API secret into the browser.
Sign in to runExample response
{
"data": {
"metric": "revenue",
"selected_method": "linear_trend",
"confidence": "medium",
"mape": 8.4000000000000003552713678800500929355621337890625
}
}Code examples
curl
curl -X POST \
https://financegpt.dev/api/v2/planning/forecasts \
-H "Authorization: Bearer $FINANCEGPT_API_KEY" \
-H "Content-Type: application/json" \
-d '{"metric":"revenue"}'python
import os, requests
url = "https://financegpt.dev/api/v2/planning/forecasts"
headers = {"Authorization": f"Bearer {os.environ['FINANCEGPT_API_KEY']}"}
payload = {
"metric": "revenue"
}
response = requests.request("POST", url, headers=headers, json=payload)
response.raise_for_status()
print(response.json())javascript
const response = await fetch('https://financegpt.dev/api/v2/planning/forecasts', {
method: 'POST',
headers: { Authorization: `Bearer ${process.env.FINANCEGPT_API_KEY}`, 'Content-Type': 'application/json' },
body: JSON.stringify({"metric":"revenue"})
});
if (!response.ok) throw new Error(`FinanceGPT ${response.status}`);
console.log(await response.json());php
<?php
$ch = curl_init('https://financegpt.dev/api/v2/planning/forecasts');
curl_setopt_array($ch, [CURLOPT_RETURNTRANSFER => true, CURLOPT_CUSTOMREQUEST => 'POST', CURLOPT_HTTPHEADER => ['Authorization: Bearer '.getenv('FINANCEGPT_API_KEY'), 'Content-Type: application/json'], CURLOPT_POSTFIELDS => '{\"metric\":\"revenue\"}']);
$response = curl_exec($ch);
if (curl_getinfo($ch, CURLINFO_HTTP_CODE) >= 400) throw new RuntimeException($response);
echo $response;Versions & changelog
v2 published
M15 publication of this governed FinanceGPT API operation.
Ready to build?
Explorer gives immediate isolated sandbox access. Production plans require a commercial entitlement.
Create account