Quickstart
Learn how to use TimeGPT for accurate time series forecasting in just a few steps
TimeGPT is a production-ready generative pretrained transformer for time series. It can accurately predict domains such as retail, electricity, finance, and IoT with just a few lines of code. Get started below!
Implementation Guide
Create a TimeGPT account and generate your API key
• Visit dashboard.nixtla.io to activate your free trial and create an account.
• 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 using the button on the right.
Dashboard displaying TimeGPT API keys and controls.
Install Nixtla
Install the Nixtla library in your preferred Python environment:
Import the Nixtla TimeGPT client
Import the Nixtla client and instantiate it with your API key:
Verify the status and validity of your API key:
Important: For enhanced security practices, see our guide on Setting Up your API Key.
Start making forecasts!
1. Load the AirPassengers Dataset
We will use the classic AirPassengers
dataset to demonstrate forecasts.
2. Preview the Dataset
Quickly examine structures like timestamps and values before forecasting.
3. Plot the Time Series
Visualize historical data to understand trends or seasonality.
timestamp | value | |
---|---|---|
0 | 1949-01-01 | 112 |
1 | 1949-02-01 | 118 |
2 | 1949-03-01 | 132 |
3 | 1949-04-01 | 129 |
4 | 1949-05-01 | 121 |
Plot the dataset:
Historical AirPassengers data from 1949 to 1960.