Further Insights on Token Issue with /models Endpoint

Thank you for the initial responses and support so far. To summarize the issue:

  1. I receive a 401 Unauthorized error when attempting to access the /models endpoint using curl and a valid token.
  2. I have tried the following:
  • Generating both fine-grained and read-only tokens with appropriate permissions.
  • Using the Connection: close header to ensure the connection is terminated after the request.
  • Testing the token immediately after creation to rule out expiration issues.
  • Confirming that other endpoints like individual model queries also fail.
  1. A fellow community member, John, confirmed the same issue on his setup using his own token.

It seems this issue might not be specific to my account or setup but rather a broader issue with token validation for the /models endpoint.

Could you clarify:

  • Is there any restriction on accessing the /models endpoint with the current API tokens?
  • Are there known issues with token validation at the moment?
  • Should I be using a specific token type or account tier to access this functionality?

If this requires deeper investigation, could you direct me to the appropriate Hugging Face support channel or escalation path?

Thank you again for your time and assistance. I look forward to your guidance.

Best regards,
Miguel

1 Like

@not-lain At first glance, it looks like an environment-dependent network error, but it can’t be fixed using the usual methods.