> ## 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 solar site

> Create a new solar 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 and some settings about the forecasting models.

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

**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 solar 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`

**Assets** `assets`

* **Mount type** `mount`
  <br /> Specify the mount type. This parameter accepts one of the following values: `fixed`, `single_axis_tracking`, or `dual_axis_tracking`, representing fixed, single-axis tracking, and dual-axis tracking mounting configurations that determine how the panels are oriented and whether they follow the sun’s movement.
  <br /> Default value: `fixed`

* **Solar park capacity** `capacity`
  <br /> Specify the DC capacity of the solar park in kilowatts (kW). It is a positive number.
  <br /> Example: `1000`

* **Solar panels orientation** `azimuth`
  <br /> Specify the orientation (azimuth) of the PV panels in degrees. It is a positive number between 0 and 360 (0 N, 90 E, 180 S, 270 W). This parameter applies only to the Fixed mount type.
  <br /> Example: `180`

* **Solar panels inclination** `tilt`
  <br /> Specify the inclination (tilt) of the PV panels in degrees. It is a positive number between 0 and 90. This parameter applies only to the Fixed mount type.
  <br /> Example: `180`

* **Installation date** `install_date`
  <br /> Specify the date when the system was installed. It is a string with format: "YYYY-MM-DD".
  <br /> Example: `2020-01-01`

The following parameters are applicable only to the **single-axis tracking** mount type.

* **Axis tilt** `axis_tilt`
  <br /> Specify the axis inclination (tilt). It is a positive number between 0 and 90. 0 means that the rotation axis is horizontal.
  <br /> Example: `0`

* **Axis azimuth** `axis_azimuth`
  <br /> Specify the axis orientation (azimuth). It is a positive number between 0 and 180 degrees and defines the plane about which the panels rotate to follow the sun. An azimuth of 0 or 180 indicates a north–south axis, where panels track the sun from east to west throughout the day. An azimuth of 90 indicates an east–west axis, where panels track from north to south.
  <br /> Example: `180`

* **Axis maximum rotation angle** `max_angle`
  <br /> Specify the maximum rotation angle of the single-axis tracking system. It is a positive number between 0 and 90 degrees and defines the maximum tilt from the horizontal that the tracker can reach. The system will not rotate beyond this limit in either direction.
  <br /> Example: `45`

* **Backtrack** `backtrack`
  <br /> Controls whether the tracker has the capability to backtrack to avoid row-to-row shading. `false` denotes no backtrack capability. `true` denotes backtrack capability.
  <br /> Example: `true`

* **Ground coverage ratio** `gcr`
  <br /> Specify the ground coverage ratio. It is a decimal number between 0 and 1 and defines the ratio between the PV array surface area to the total ground area.
  <br /> Default value: `0.2857`

**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). This setting is useful when the inverter’s rated output power is lower than the DC capacity of the solar panels, or when a grid export limit restricts how much power can be delivered. 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`

* **Use physical models** `usePhysicalModels`
  <br /> Specify if physical models should be enabled. No training data are required for physical models to work. It takes one of the following values: `true` or `false`

### Create solar sites examples

<CodeGroup>
  ```python Single-asset solar site theme={null}
  import requests

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

  payload = {
  	"type": "solar",
  	"name": "My solar site",
  	"latitude": 52.5,
  	"longitude": 13.4,
  	"settings": {
  		"model_resolution": "15min",
  		"forecast_max_value": 800, # e.g. inverter rated power or grid export limit
  		"usePhysicalModels": True,
  		"trainNearTermModels": False,
  		"trainLongTermModels": False
  	},
  	"assets": [
  		{
  			"azimuth": 180,
  			"tilt": 30,
  			"capacity": 1000, # DC capacity
  			"install_date": "2020-01-01"
  		}
  	]
  }

  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()
  ```

  ```python Multi-asset solar site theme={null}
  import requests

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

  payload = {
  	"type": "solar",
  	"name": "My solar site",
  	"latitude": 52.5,
  	"longitude": 13.4,
  	"settings": {
  		"model_resolution": "15min",
  		"usePhysicalModels": True,
  		"trainNearTermModels": False,
  		"trainLongTermModels": False
  	},
  	"assets": [
  		{
  			"azimuth": 180,
  			"tilt": 30,
  			"capacity": 10, # DC capacity
  			"install_date": "2020-01-01"
  		},
  		{
  			"azimuth": 90,
  			"tilt": 25,
  			"capacity": 5, # DC capacity
  			"install_date": "2020-01-01"
  		}		
  	]
  }

  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()
  ```

  ```python Single-axis tracking theme={null}
  import requests

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

  payload = {
  	"type": "solar",
  	"name": "My solar site",
  	"latitude": 52.5,
  	"longitude": 13.4,
  	"settings": {
  		"model_resolution": "15min",
  		"usePhysicalModels": True,
  		"trainNearTermModels": False,
  		"trainLongTermModels": False
  	},
  	"assets": [
  		{
  			"mount": "single_axis_tracking",
  			"axis_tilt": 0,
  			"axis_azimuth": 180,
  			"max_angle": 45,
  			"backtrack": true,
  			"gcr": 0.2857,
  			"capacity": 1000, # DC capacity
  			"install_date": "2020-01-01"
  		}
  	]
  }

  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()
  ```

  ```python Dual-axis tracking theme={null}
  import requests

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

  payload = {
  	"type": "solar",
  	"name": "My solar site",
  	"latitude": 52.5,
  	"longitude": 13.4,
  	"settings": {
  		"model_resolution": "15min",
  		"usePhysicalModels": True,
  		"trainNearTermModels": False,
  		"trainLongTermModels": False
  	},
  	"assets": [
  		{
  			"mount": "dual_axis_tracking",
  			"capacity": 1000, # DC capacity
  			"install_date": "2020-01-01"
  		}
  	]
  }

  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()
  ```
</CodeGroup>

The API response contains the ID of the new site.

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