Closed adham closed 1 week ago
Hey.
print(os.environ['NIXTLA_API_KEY'])
do you see your API key?Hey @jmoralez
Can you try running the following on your terminal?
export NIXTLA_API_KEY="your_api_key"
curl -XPOST -H "Authorization: Bearer $NIXTLA_API_KEY" https://dashboard.nixtla.io/api/validate_token
That may give us more information.
@jmoralez
200! Interesting!
{"status":200,"data":{"detail":"Happy Forecasting! :)"},"message":"success","details":"request successful","code":"B10","support":"If you have questions or need support, please email ops@nixtla.io sharing this response and ID: ZZ6R3VUFKM","requestID":"ZZ6R3VUFKM"}%
But running
from nixtla import NixtlaClient
NixtlaClient().validate_api_key()
returns False
?
If it does, can you try manually setting your api key in the constructor? e.g.
client = NixtlaClient(api_key="your_api_key")
client.validate_api_key()
Yes you are right.
No matter how I pass the API key, it returns False
.
I just checked on a google Colab notebook and everything works fine which means there's a problem with my local dev env. Apologies for raising the issue and taking your time. You can close the issue now.
Cheers
Another possible source would be the base url, do you have the NIXTLA_BASE_URL
env variable set?
do you have the NIXTLA_BASE_URL env variable set?
No I don't. What should I set it to?
It's ok not setting it, if it isn't set it defaults to the url I sent in the curl command, so it's very strange that it works on the terminal but not on the python client.
Closing since you were able to run it somewhere else, feel free to reopen if you're unable to fix it locally.
Hi
I recently signed up for the Early Adopter Special trial of TimeGPT and have an active account with sufficient credits. I've also created an API key and followed the provided instructions to set up the NixtaClient object.
However, I'm encountering an issue where the NixtaClient object does not validate the API key, despite the account being active and having enough credits.
Here's a screenshot of my active account for reference:
and here is the code
I've double-checked the API key and the setup instructions, and everything seems to be in order. I'm unsure what could be causing this issue.
And as the result, client.forecast() doesn't work.![image](https://github.com/Nixtla/nixtla/assets/1778128/554ebabb-b37b-47bb-b11c-4fbca7cf24e9)
Could you please assist me in resolving this problem? Any guidance would be greatly appreciated.
Thank you, Adham