> For the complete documentation index, see [llms.txt](https://docs.lightningrod.ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.lightningrod.ai/forecasting/quickstart.md).

# Quickstart

Lightning Rod's **Foresight** models return calibrated probability forecasts for any forward-looking question through an OpenAI-compatible API.

### Your first prediction

To get started, [get an API key](https://dashboard.lightningrod.ai/sign-up?redirect=/api) in our dashboard and configure the `api_key` and `base_url` of any [OpenAI API client](https://developers.openai.com/api/docs/libraries) or query [our REST API](https://docs.lightningrod.ai/api-reference) directly.

> **Building an agent?** Get an API key and credits with no signup or dashboard by paying a top-up over MPP (from $1) — see [Agentic Payments](/forecasting/agentic-payments.md).

Minimal example code using Python:

```python
from openai import OpenAI

client = OpenAI(
    api_key="your-api-key",
    base_url="https://api.lightningrod.ai/v1/openai",
)

response = client.chat.completions.create(
    model="foresight-v4",
    messages=[
        {"role": "user", "content": "Will any company operate a commercial AI data center in space before January 1, 2028?"},
    ],
)
print(response.choices[0].message.content)
```

### Available Models

| Model        | Model ID       | Description                 |
| ------------ | -------------- | --------------------------- |
| Foresight v4 | `foresight-v4` | Latest forecasting model.   |
| Foresight v3 | `foresight-v3` | Previous forecasting model. |

### Structured Prediction

The unstructured result is useful when the response message consumer is a human or an LLM, but for programmatic use you'll probably want a structured prediction response.

We offer a custom `answer_type` extension parameter to achieve exactly that. We recommend using our [SDK](/forecasting/sdk.md) to automatically parse the responses, but if you want to use a standard OpenAI client please refer to [our answer format guide](/forecasting/openai.md).

### Prediction Context

By default, none of the models have access to external sources - they are limited by the context they were trained on.

To achieve accurate and useful prediction results, you should always provide relevant context alongside your question. There are currently two ways of doing that:

1. provide your own custom-aggregated context (this is the "secret sauce" that can give you an edge)
2. use our built-in "research mode" to automatically gather relevant context from trusted sources like Perplexity or Google News

See how you can configure research mode using [OpenAI clients](/forecasting/openai.md) or our [Python SDK](/forecasting/sdk.md).

### Custom Models

Need forecasting models tailored to your domain? Use the [enterprise platform](/platform-enterprise/overview.md) to generate datasets, fine-tune models, and evaluate performance.

[Book a call](https://calendly.com/d/ctq4-7gd-nyq/lightning-rod-demo) to talk through your use case.

### Next steps

* [OpenAI](/forecasting/openai.md) - how to effectively use our OpenAI API
* [SDK](/forecasting/sdk.md) - Python wrapper on top of the OpenAI API for ease of use
* [Recipes](/forecasting/recipes.md) — writing good forecasting prompts
* [Enterprise Platform](/platform-enterprise/overview.md) — generate datasets and fine-tune your own forecasting models
