TimeGPT is a production-ready, generative pretrained transformer for time series. It can make accurate predictions in just a few lines of code across domains like retail, electricity, finance, and IoT.

1

Create a TimeGPT Account and Generate an API Key

  1. Visit dashboard.nixtla.io
  2. Sign in with Google, GitHub, or email
  3. Select API Keys in the menu, then click Create New API Key
  4. Copy your generated API key using the provided button

TimeGPT dashboard with API key management

2

Install Nixtla

install-nixtla
pip install nixtla
3

Import and Validate Your Nixtla Client

client-setup
from nixtla import NixtlaClient

# Instantiate the NixtlaClient
nixtla_client = NixtlaClient(
    api_key='my_api_key_provided_by_nixtla'
)

# Validate the API key
nixtla_client.validate_api_key()

For enhanced security, check Setting Up your API Key.

4

Make Forecasts with Polars

Key Takeaways

  • TimeGPT can forecast short to long horizons easily.
  • Minimal setup is required—just an API key and your dataset!
  • Data validation helps ensure accurate forecasts.

You are now ready to harness TimeGPT for quick and reliable time series forecasting using Polars!