> ## Documentation Index
> Fetch the complete documentation index at: https://docs.rebase.energy/llms.txt
> Use this file to discover all available pages before exploring further.

# How to create a load site

> Create a new electricity demand site to forecast in the Rebase Platform.

## What data do I need to create a new site

You will need to provide some data about the site, its assets and some settings about the forecasting models.

**Type of the site** `type`
<br /> Specify the type of the site. For a load site it should be: `load`.

**Name of the site** `name`
<br /> Specify a name for the site. It is used to easily recognize the site. It is a string.
<br /> Example: `My load site`

**Latitude of the site location** `latitude`
<br /> Specify the latitude of the site location. It takes a value between -90 and 90.
<br /> Example: `52.5`

**Longitude of the site location** `longitude`
<br /> Specify the longitude of the site location. It takes a value between -180 and 180.
<br /> Example: `13.4`

**Settings** `settings`

* **Model resolution** `model_resolution`
  <br /> Specify how frequently the forecasts will be updated. It can be every 15 minutes, 30 minutes, 1 hour or daily.
  It takes one of the following values: `15min`, `30min`, `1h` or `1d`.

* **Forecast max value** `forecast_max_value`
  <br /> Specify an upper limit for the forecasts in kilowatts (kW). It is a positive number. If null no cap is applied.

* **Train long-term models** `trainLongTermModels`
  <br /> Specify if a model based on typical meteorological year should be trained for long-term forecasting. It takes one of the following values: `true` or `false`

* **Train near-term models** `trainNearTermModels`
  <br /> Specify if a model based on recent power observations should be trained for short-term forecasting. Power observations should be available in real time in this case. It takes one of the following values: `true` or `false`

* **Additional locations** `additional_points`
  <br /> Add more locations to be considered for the weather inputs of the forecasting models. This is useful when creating a model to predict the load in a wider area. The additional points are provided by their longitude and latitude.

### Create load sites examples

```python Create load site theme={null}
import requests

api_key = "Your API key" # Set your API key

payload = {
	"type": "load",
	"name": "My load site",
	"latitude": 52.5,
	"longitude": 13.4,
	"settings": {
		"model_resolution": "1h",
        "additional_points": [
            {
                "name": "Extra location 1",
                "latitude": 53.5,
                "longitude": 14.4
            },
            {
                "name": "Extra location 2",
                "latitude": 51.5,
                "longitude": 12.4
            }			
        ],
		"trainNearTermModels": False,
		"trainLongTermModels": False
	}
}

url = "https://api.rebase.energy/platform/v2/sites"

headers = {"Authorization": api_key, "Content-Type": "application/json"}

response = requests.post(url, headers=headers, json=payload)
response.raise_for_status()
response = response.json()
```

The API response contains the ID of the new site.

```python Response example theme={null}
{
    "site_id": "a923653c-26f1-1b29-955d-ffde5d182276"
}
```
