Skip to main content

TimeGPT-2 Family of Foundation Models

TimeGPT-2 and TimeGPT-2.1 are the latest versions of our enterprise-grade models, built to reliably solve mission-critical time-series problems. The TimeGPT-2 family of models is optimized for enterprise needs, prioritizing accuracy and stability with a privacy-first approach and full support for self-hosted and on-premises deployments.

Set Up TimeGPT-2 family of models for Python Time Series Forecasting

Step 1: Confirm Access and get an API Key

  • Confirm with support@nixtla.io that your account has access to these latest models.
  • Get your API key from dashboard. Note that you can also use your existing keys as long as your account has access to these latest models (Step 1 above).
    • Sign in using Google, GitHub, or your email.
    • Navigate to API Keys in the menu and select Create New API Key.
    • Your new API key will appear on the screen. Copy this key and save it in a safe place for use later.
Dashboard for TimeGPT API keys

TimeGPT dashboard showing API key management interface for Python forecasting

Step 2: Install Nixtla

Install the Nixtla library in your preferred Python environment. In order to use the TimeGPT-2 family of models, the client version must be >= 0.7.4.
You can verify the client version installed using the following code. It should return a version >= 0.7.4

Step 3: Import the Nixtla TimeGPT client

Import the Nixtla client and instantiate it with your API key and base URL for TimeGPT-2 family:
Verify the status and validity of your API key:

Forecasting with TimeGPT-2 family

Load your time series data

Generate the forecast

Forecast the next 12 months using the SDK’s forecast method. You can switch the model to any of the TimeGPT-2 family of models - timegpt-2-pro, timegpt-2-lab, timegpt-2-mini, timegpt-2.1

Plot the forecast

Forecasted Plot

TimeGPT 12-month forecast visualization with confidence intervals for AirPassengers dataset

Summary

Using the TimeGPT-2 family of models is similar to using the TimeGPT-1 family with the following changes. In order to use TimeGPT-2 family of models
  • Make sure that your account has access to these models
  • Install the latest Nixtla client (>= 0.7.4)
  • Make sure you use the right base_url while instantiating the client along with your API key.
Happy forecasting!