# Quickstart

import {Stepper} from "zudoku/ui/Stepper";
import {
    Card,
    CardHeader,
    CardTitle,
    CardDescription,
    CardContent,
} from "zudoku/ui/Card";

## Prerequisites

<div className="not-prose grid sm:grid-cols-2 gap-3 mb-8">
    <a href="https://pvnode.com/auth/register"
       className="flex items-center gap-3 rounded-lg border border-border bg-card px-4 py-3 hover:border-primary/50 transition-all">
    <span
        className="inline-flex items-center justify-center w-8 h-8 rounded-lg bg-primary/10 border border-primary/20 text-primary">
      <svg className="w-4 h-4" fill="none" viewBox="0 0 24 24" strokeWidth="2" stroke="currentColor"><path
          strokeLinecap="round" strokeLinejoin="round"
          d="M15.75 6a3.75 3.75 0 11-7.5 0 3.75 3.75 0 017.5 0zM4.501 20.118a7.5 7.5 0 0114.998 0"/></svg>
    </span>
        <div>
            <div className="text-sm font-semibold">pvnode Account</div>
            <div className="text-xs text-muted-foreground">Sign up free at pvnode.com</div>
        </div>
    </a>
    <a href="https://pvnode.com/settings/api-keys"
       className="flex items-center gap-3 rounded-lg border border-border bg-card px-4 py-3 hover:border-primary/50 transition-all">
    <span
        className="inline-flex items-center justify-center w-8 h-8 rounded-lg bg-primary/10 border border-primary/20 text-primary">
      <svg className="w-4 h-4" fill="none" viewBox="0 0 24 24" strokeWidth="2" stroke="currentColor"><path
          strokeLinecap="round" strokeLinejoin="round"
          d="M15.75 5.25a3 3 0 013 3m3 0a6 6 0 01-7.029 5.912c-.563-.097-1.159.026-1.563.43L10.5 17.25H8.25v2.25H6v2.25H2.25v-2.818c0-.597.237-1.17.659-1.591l6.499-6.499c.404-.404.527-1 .43-1.563A6 6 0 1121.75 8.25z"/></svg>
    </span>
        <div>
            <div className="text-sm font-semibold">API Key</div>
            <div className="text-xs text-muted-foreground">Create one in your dashboard</div>
        </div>
    </a>
</div>

## Get your forecast

<Stepper>

    1. **Get your API key**

        Sign up at [pvnode.com](https://pvnode.com/auth/register) and create an API key in your
        [dashboard](https://pvnode.com/settings/api-keys).

    2. **Make your first forecast request**

        Install the `requests` library if you don't have it:

        ```bash
        pip install requests
        ```

        Then run this Python script:

        ```python title="forecast.py"
        import requests

        response = requests.get(
            "https://api.pvnode.com/v1/forecast",
            headers={"Authorization": f"Bearer YOUR_API_KEY"},
            params={
                "latitude": 51.0,
                "longitude": 10.0,
                "slope": 30.0,
                "orientation": 180.0,
                "pv_power_kw": 10
            }
        )

        data = response.json()
        print(f"Status: {response.status_code}")
        print(f"First entry: {data['values'][0]}")
        ```

        **Example response:**

        ```json title="Response (200 OK)"
        {
            "data": "forecast",
            "latitude": 51.0,
            "longitude": 10.0,
            "elevation": 378.0,
            "slope": 30.0,
            "orientation": 180.0,
            "data_timezone": "utc",
            "values": [
                {
                    "dtm": "2026-03-01 00:00:00",
                    "GHI": 0.0,
                    "DHI": 0.0,
                    "BNI": 0.0,
                    "spec_watts": 0.0,
                    "temp": 5.5,
                    "weather_code": 3
                },
                {
                    "dtm": "2026-03-01 00:15:00",
                    "GHI": 0.0,
                    "DHI": 0.0,
                    "BNI": 0.0,
                    "spec_watts": 0.0,
                    "temp": 5.3,
                    "weather_code": 3
                },
                {...}
            ]
        }
        ```

        :::tip
        The response contains 15-minute intervals with power output (`spec_watts` in W/kWp), irradiance (GHI, DHI, BNI), temperature, and weather codes by default. You can customize which fields are returned and configure dozens of additional parameters — see the [API Reference](/api) for the full list.
        :::

</Stepper>