Overview

Forecasting
Foresight-v3
Setup
Get forecasts
API reference
Try it
Last updated

Last updated
pip install openai lightningrod-aifrom openai import OpenAI
client = OpenAI(
api_key="lightningrod-api-key",
base_url="https://api.lightningrod.ai/api/public/v1/openai"
)questions = [
"Will the Fed cut rates by 25bp in March 2026?",
"Will Apple announce a new Vision Pro model in 2026?",
"Will the S&P 500 close above 6000 by end of 2026?",
]
for q in questions:
response = client.chat.completions.create(
model="LightningRodLabs/foresight-v3",
messages=[
{"role": "system", "content": "Answer as a probability between 0 and 1."},
{"role": "user", "content": q}
]
)
print(f"Q: {q}")
print(f"A: {response.choices[0].message.content}\n")