Api Key
go to your
Dashboard.
There are different ways to set up your API key. We provide some
examples below. A scematic is given below.
API Keys
of your Nixtla
dashboard.NixtlaClient
with your API key:Important This approach is considered unsecure, as your API key will be part of your source code.
NIXTLA_API_KEY
. This can be done (a) temporarily for a session
or (b) permanently, depending on your preference.NixtlaClient
class, the SDK will automatically look for the NIXTLA_API_KEY
environment variable and use it to authenticate your requests.
Important
The environment variable must be named exactly NIXTLA_API_KEY
, with
all capital letters and no deviations in spelling, for the SDK to
recognize it.
export
command to set NIXTLA_API_KEY
.
Set
command to
set NIXTLA_API_KEY
.
.env
file.env
file
located in the folder of your Python script. In this file, include the
following:
dotenv
package to load the .env
file and then instantiate the
NIXTLA_API_KEY
class. For example:
Important Remember, your API key is like a password - keep it secret, keep it safe!
API Keys
section of your
dashboard. To check the status of your API key, use the
validate_api_key
method of the
NixtlaClient
class. This method will return True
if the API key is valid and
False
otherwise.
TimeGPT
.
This function is provided for your convenience to ensure its validity.
For full access to TimeGPT
’s functionalities, in addition to a valid
API key, you also need sufficient credits in your account. You can check
your credits in the Usage
section of your
dashboard.