Error 402 while using smolagents with a valid token

Hello,

I have an entreprise hub license and was completing the agent training (well done by the way).
I started building an agent for the final assignment and set up the token accordingly.
Unfortunately, I always get an error 402 even if I still have some credits. Could you please support on that?

Regards
Eric

1 Like

Maybe this?

Thanks, I tried adding the bill_to keyword as proposed in Pricing and Billing.

Unfortunately, I got an error message.

1 Like

Try:

pip install -U huggingface_hub

Hi John6666,

unfortunately, this doesn’t solve the issue.

1 Like

@meganariley Enterprise token issue…

Hi, we have some examples to set up this attribute for the JavaScript and Python InferenceClient here: Pricing and Billing. If you’re still seeing issues, can you please share a screenshot of the code snippet?

1 Like

Hi, the link you showed is the documentation I followed.
Please find attached the code snippet (organization name is masked but declared as a regular string in the code).

1 Like