Assistance with 401 Unauthorized Error for API Access

I get the same 401 error when trying to connect to HF inference endpoints with any model, and I have a paid subscription.

danielbyrne@Daniels-MacBook-Pro FunctionalNetworksSFT % curl -s https://huggingface.co/api/whoami -H “Authorization: Bearer $HF_TOKEN”
{“error”:“Invalid credentials in Authorization header”}

1 Like