min read

Toucan API: unleash your power potential with our new forecasting tool

In our previous power forecasting blog post, we introduced to the world our latest AI-based solution for power forecasting. In this article we will show you our service for delivering the forecasts, Toucan API.

Opting for an API based solution

While developing Toucan, we had envisioned a tool that was simple to use, and that provided the end user with an easy and straightforward way to get our model’s power forecasts in an independent way. That is why we opted for an API solution. With access to an API, our customers can request forecasts however they want (e.g., cURL command, python script) whenever they want, with full autonomy.

However, while an API is a great tool to give more freedom to our users, it requires a web connection to be executed. As such, we needed to have in mind the following aspects: speed, resilience, and security.


Speed-wise, we wanted to make sure that our API could be integrated in any system and not be the root of a major time bottleneck. The two most time consuming operations are: the call to fetch the weather forecasts and the model inference. To reduce the time of these two processes, we have in place heavy parallelisation methods to retrieve multiple weather forecasts and several strategies to optimise model’s operations, such as data loading. With these implementations, a request for the day ahead forecast takes under 4 seconds to be completed.


In terms of resilience, a high availability is as essential as having the best possible predictions. Everyday, renewables players need to deliver hourly power forecasts for the day ahead energy market. That is why it’s essential to ensure that our API is not causing any kind of instability (i.e., sudden crashes) so that the teams can meet their deadlines. We tackle this problem by taking into account a set of actions:

  • Missing input (i.e., missing weather variables): Our models can run with entire numerical weather prediction (NWP) providers missing;
  • Network issues: Automatic retries, to ensure occasional networking downtimes are handled;
  • Server downtimes: Even in the extreme case of having no NWPs available, if the weather server is down, we have a backup statistical model that is capable of delivering satisfactory results;
  • Monitoring 24/7: We have a monitoring system that alerts if any unexpected error occurs for a quick problem mitigation.


As for security, we implemented an authentication system so each customer has their own unique API Key. This way, we can verify the identity of the user and control unauthorised accesses. We also validate the input to prevent injection attacks, thus only expected data is processed, reducing the risk of malicious data being executed. On top of all these measures, our monitoring system helps us detect suspicious activity and security threats, enabling a fast response

Figure 1: End-to-end Toucan API pipeline

From raw data to a powerful output

Now, let’s look at our entire pipeline system in action. First off, we receive the information about the renewables energy farm (i.e., location and SCADA data), and start to evaluate and prepare the data (i.e., Exploratory Data Analysis and Data Cleaning). After that, we proceed to gather the historical NWPs of the farm’s site that will serve as input for our models.

Next up, is the training our ML models. Based on state-of-the-art deep learning architectures, our models utilise the features of multiple weather providers (e.g., wind speed, temperature, pressure) to learn patterns in the data and leverage the importance of the most accurate features while ignoring the non-relevant ones.

Following this stage, the model is validated and deployed, and the customer will gain access to Toucan API through unique credentials. Now that all is set, the API can start receiving power forecasts requests right away!

Also, as an important feature, our API is capable of forecasting past dates, enabling the opportunity for the user to benchmark our forecasts against entire years of past production!

Our current power forecasting pipeline is able to make a full deployment of an entire farm in a few hours (and with almost full automation). As a result, we can deliver a scalable service with low costs for the end user.

Figure 2: Model life-cycle deployment

Powering the Future

With our new power forecasting service, we aim to empower renewable energy players with an easy to use tool that is capable of providing the best possible power forecasts through the power of our machine learning models. If you are interested with a more in-depth explanation of how our models are built, check out this article. We would love to show you our solution in action, so if you want to test it out, give us a ping so we can provide you with a free trial!

Manuel Santos

Machine Learning Engineer

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Suspendisse varius enim in eros elementum tristique. Duis cursus, mi quis viverra ornare, eros dolor interdum nulla, ut commodo diam libero vitae erat. Aenean faucibus nibh et justo cursus id rutrum lorem imperdiet. Nunc ut sem vitae risus tristique posuere.

Back to blogs