# Ai Agents course error in running the Smolagent example

**URL:** <https://discuss.huggingface.co/t/ai-agents-course-error-in-running-the-smolagent-example/146061>\
**Category:** Course\
**Created:** [March 17, 2025, 4:41am UTC](https://discuss.huggingface.co/t/ai-agents-course-error-in-running-the-smolagent-example/146061 "2025-03-17T04:41:05Z")\
**Posts on this page:** 15\
**Page:** 1

<div class="post-metadata">

**Author:** ![abenari0](https://avatars.discourse-cdn.com/v4/letter/a/da6949/32.png) [@abenari0](https://discuss.huggingface.co/u/abenari0)\
**Post date:** [March 17, 2025, 4:41am UTC](https://discuss.huggingface.co/t/ai-agents-course-error-in-running-the-smolagent-example/146061/1 "2025-03-17T04:41:05Z")

</div>

Hello, following unit 1, in the AI agent course, running the given application built in smolagent below. The question is time in EST now?

Any ideas? what am I missing here.

**Final answer:**  
Error in generating final LLM output:  
422 Client Error: Unprocessable Entity for url: [https://api-inference.huggingface.co/models/Qwen/Qwen2.5-Coder-32B-Instruct/v1/chat/completions](https://api-inference.huggingface.co/models/Qwen/Qwen2.5-Coder-32B-Instruct/v1/chat/completions) (Request ID: Zji2Dy1jhRHQ\_jjXJLqQx)

Input validation error: `inputs` tokens + `max_new_tokens` must be \<= 32768. Given: 89942 `inputs` tokens and 2096 `max_new_tokens`  
Make sure ‘text-generation’ task is supported by the model.

---

<div class="post-metadata">

**Author:** ![John6666](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/john6666/32/27664_2.png) [@John6666](https://discuss.huggingface.co/u/John6666)\
**Post date:** [March 17, 2025, 5:43am UTC](https://discuss.huggingface.co/t/ai-agents-course-error-in-running-the-smolagent-example/146061/2 "2025-03-17T05:43:23Z")

</div>

> Input validation error: `inputs` tokens + `max_new_tokens` must be \<= 32768. Given: 89942 `inputs` tokens and 2096 `max_new_tokens`

The error message says that the input tokens are too large and exceed 32768 (-2096), so it can’t be processed, but if this is the result of following the course, then it’s a bug in the course in a broad sense…  
If possible, why not try changing the model?  
Or raising issue?

> **[huggingface/agents-course](https://github.com/huggingface/agents-course/issues)**
>
> This repository contains the Hugging Face Agents Course. - huggingface/agents-course

---

<div class="post-metadata">

**Author:** ![PriyankarSingha](https://avatars.discourse-cdn.com/v4/letter/p/a3d4f5/32.png) [@PriyankarSingha](https://discuss.huggingface.co/u/PriyankarSingha)\
**Post date:** [April 1, 2025, 7:17am UTC](https://discuss.huggingface.co/t/ai-agents-course-error-in-running-the-smolagent-example/146061/3 "2025-04-01T07:17:56Z")

</div>

I am having issues while running the agents using HfApiModel(). Following is the syntax and the error:  
from smolagents import CodeAgent, DuckDuckGoSearchTool, HfApiModel

# Initialize the search tool

search\_tool = DuckDuckGoSearchTool()

# Initialize the model

model = HfApiModel(hf\_model)

agent = CodeAgent(  
model = model,  
tools=[search\_tool]  
)

# Example usage

response = agent.run(  
“Search for luxury superhero-themed party ideas, including decorations, entertainment, and catering.”  
)  
print(response)

Error in generating model output:  
402 Client Error: Payment Required for url:  
[https://router.huggingface.co/hf-inference/models/Qwen/QwQ-32B/v1/chat/completions](https://router.huggingface.co/hf-inference/models/Qwen/QwQ-32B/v1/chat/completions) (Request ID:  
Root=1-67eb90ed-4dceeaaf55ae88031ef4b296;dc2390e1-cf09-4f27-b530-c55bff8d2db7)

You have exceeded your monthly included credits for Inference Providers. Subscribe to PRO to get 20x more monthly  
included credits.

I know that it is asking for upgrading HF subscription, but is there any way I can use it for free? I am a beginner at HF

---

<div class="post-metadata">

**Author:** ![John6666](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/john6666/32/27664_2.png) [@John6666](https://discuss.huggingface.co/u/John6666)\
**Post date:** [April 1, 2025, 8:17am UTC](https://discuss.huggingface.co/t/ai-agents-course-error-in-running-the-smolagent-example/146061/4 "2025-04-01T08:17:13Z")

</div>

That’s just a simple case of exceeding the usage limit, so it’s a bit difficult, but I think you could get around it by using a local model or using another company’s API.

> **[@julien-c on Hugging Face: "Important notice 🚨

For Inference Providers who...](https://huggingface.co/posts/julien-c/158943939527784)**
>
> We’re on a journey to advance and democratize artificial intelligence through open source and open science.

---

<div class="post-metadata">

**Author:** ![sabler](https://avatars.discourse-cdn.com/v4/letter/s/67e7ee/32.png) [@sabler](https://discuss.huggingface.co/u/sabler)\
**Post date:** [April 1, 2025, 9:02pm UTC](https://discuss.huggingface.co/t/ai-agents-course-error-in-running-the-smolagent-example/146061/5 "2025-04-01T21:02:23Z")

</div>

The only way I got around this was upgrading my HF account. I know that’s not the ideal solution, and not something that should be the easiest path forward, but I guess you can downgrade your account after the course is completed.

---

<div class="post-metadata">

**Author:** ![nskaidni](https://avatars.discourse-cdn.com/v4/letter/n/48db29/32.png) [@nskaidni](https://discuss.huggingface.co/u/nskaidni)\
**Post date:** [April 4, 2025, 12:07pm UTC](https://discuss.huggingface.co/t/ai-agents-course-error-in-running-the-smolagent-example/146061/6 "2025-04-04T12:07:31Z")

</div>

Yes, most of the errors disappeared once I upgraded my account. Looks like a capacity issue ( Token counts aren’t being properly returned from the model API).

Although, I did make some changes to the Gradio\_UI.py file to resolve some Type issues - similar to the below

# Before

total\_input\_tokens += agent.model.last\_input\_token\_count

# After (add safety check)

token\_count = agent.model.last\_input\_token\_count or 0  
total\_input\_tokens += token\_count

* * *

# Original line (line 115)

f" | Input-tokens:{step\_log.input\_token\_count:,} | Output-tokens:{step\_log.output\_token\_count:,}"

# Fixed version - add None handling

f" | Input-tokens:{step\_log.input\_token\_count or 0:,} | Output-tokens:{step\_log.output\_token\_count or 0:,}"

---

<div class="post-metadata">

**Author:** ![neomit](https://avatars.discourse-cdn.com/v4/letter/n/3bc359/32.png) [@neomit](https://discuss.huggingface.co/u/neomit)\
**Post date:** [April 24, 2025, 5:24pm UTC](https://discuss.huggingface.co/t/ai-agents-course-error-in-running-the-smolagent-example/146061/7 "2025-04-24T17:24:17Z")

</div>

"Error in generating model output:  
401 Client Error: Unauthorized for url: [https://router.huggingface.co/hf-inference/models/Qwen/Qwen2.5-Coder-32B-Instruct/v1/chat/completions](https://router.huggingface.co/hf-inference/models/Qwen/Qwen2.5-Coder-32B-Instruct/v1/chat/completions) (Request ID: Root=1-680a7e9b-5c2059aa6ca44bed59bec0bc;6c8ff9c7-6358-4d3f-bf84-f596010c2321)

Invalid username or password. Error generating answer"

How to fix this error ?

---

<div class="post-metadata">

**Author:** ![neomit](https://avatars.discourse-cdn.com/v4/letter/n/3bc359/32.png) [@neomit](https://discuss.huggingface.co/u/neomit)\
**Post date:** [April 24, 2025, 5:27pm UTC](https://discuss.huggingface.co/t/ai-agents-course-error-in-running-the-smolagent-example/146061/8 "2025-04-24T17:27:55Z")

</div>

updated the requirements file with smolagents

 ![image](https://us1.discourse-cdn.com/hellohellohello/original/3X/8/3/8331c8826cb42ceb91100825fdec669488334e1e.png)  
still same error

---

<div class="post-metadata">

**Author:** ![neomit](https://avatars.discourse-cdn.com/v4/letter/n/3bc359/32.png) [@neomit](https://discuss.huggingface.co/u/neomit)\
**Post date:** [April 24, 2025, 6:28pm UTC](https://discuss.huggingface.co/t/ai-agents-course-error-in-running-the-smolagent-example/146061/9 "2025-04-24T18:28:00Z")

</div>

Fixed the previous problem,  
Now

"Error in generating model output:  
401 Client Error: Unauthorized for url: [https://router.huggingface.co/hf-inference/models/Qwen/Qwen2.5-Coder-32B-Instruct/v1/chat/completions](https://router.huggingface.co/hf-inference/models/Qwen/Qwen2.5-Coder-32B-Instruct/v1/chat/completions) (Request ID: Root=1-680a7e9b-5c2059aa6ca44bed59bec0bc;6c8ff9c7-6358-4d3f-bf84-f596010c2321)

Invalid username or password."

How to fix this error ?

---

<div class="post-metadata">

**Author:** ![John6666](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/john6666/32/27664_2.png) [@John6666](https://discuss.huggingface.co/u/John6666)\
**Post date:** [April 25, 2025, 4:09am UTC](https://discuss.huggingface.co/t/ai-agents-course-error-in-running-the-smolagent-example/146061/10 "2025-04-25T04:09:47Z")

</div>

> Invalid username or password."

Based on this error message, it is possible that the token content is incorrect or that the token you are passing is different from the token that is actually being passed.

The most reliable method is to use **login()**, but in many cases, the issue can be resolved by configuring the **HF\_TOKEN** environment variable (Secrets).

> [@Error 401 Client Error: Unauthorized for url](https://discuss.huggingface.co/t/error-401-client-error-unauthorized-for-url/19714):
>
> When using model card of my private speech recognition model with LM, I got this error: 401 Client Error: Unauthorized for url: [https://huggingface.co/api/models/taliai/tali-asr-with-lm/revision/main](https://huggingface.co/api/models/taliai/tali-asr-with-lm/revision/main) while the same model without lm works fine. Is there anything wrong on my model or model card or … Any help is appreciated.

> <https://github.com/huggingface/huggingface_hub/issues/2586>
>
> \### Describe the bug
> 
> I got access to Llama-3.2 but when I tried to access the… model, I got the 401 Error.
> 
> \`\`\`
> OSError: You are trying to access a gated repo.
> Make sure to have access to it at https://huggingface.co/meta-llama/Llama-3.2-1B-Instruct.
> 401 Client Error. (Request ID: Root=1-66fc667a-79545df845c9253539ea509f;f6f84d32-d328-45e5-b78d-96461057d7d0)
> 
> Cannot access gated repo for url https://huggingface.co/meta-llama/Llama-3.2-1B-Instruct/resolve/main/config.json.
> Access to model meta-llama/Llama-3.2-1B-Instruct is restricted. You must have access to it and be authenticated to access it. Please log in.
> \`\`\`
> 
> Now this means either I don't have access to 3.2B or I am not logged in. I got approved access, so it's not the first one (more about this in Reproduction).
> 
> I added my HF token key using \`huggingface-cli login\`, but I am still facing the same issue after that.
> 
> I tried to debug and found that the command \`huggingface-cli whoami\` gives me this error - 
> \`Invalid user token. If you didn't pass a user token, make sure you are properly logged in by executing huggingface-cli login, and if you did pass a user token, double-check it's correct. {"error":"Invalid username or password."}\`
> 
> So, basically even if I login (either via CLI or in code), I am getting this error
> 
> \`\`\`
> from huggingface\_hub import login
> login(token = "xxx")
> \`\`\`
> 
> \*\*Note:\*\* The only change I made (from yesterday when Llama-2 is working to today) is to change some environment variables i.e
> \`\`\`
> export HF\_HOME=xxx
> export HF\_ASSETS\_CACHE=xxx
> export XDG\_CACHE\_HOME=xxx
> export HF\_TOKEN=xxx
> export HF\_HUB\_CACHE=xxx
> \`\`\`
> 
> \### Reproduction
> 
> I also experimented with \`Llama-2-7B\` (which I used till yesterday and it was fine) but was getting the same \`GatedError\`.
> 
> \`\`\`
> from transformers import AutoTokenizer
> import transformers
> import torch
> 
> from huggingface\_hub import login
> login(token = "xxx")
> 
> model = "meta-llama/Llama-2-7b-chat-hf"
> 
> tokenizer = AutoTokenizer.from\_pretrained(model)
> pipeline = transformers.pipeline(
> "text-generation",
> model=model,
> torch\_dtype=torch.float16,
> device\_map="auto",
> )
> 
> sequences = pipeline(
> 'I liked "Breaking Bad" and "Band of Brothers". Do you have any recommendations of other shows I might like?\\n',
> do\_sample=True,
> top\_k=10,
> num\_return\_sequences=1,
> eos\_token\_id=tokenizer.eos\_token\_id,
> max\_length=200,
> )
> for seq in sequences:
> print(f"Result: {seq\['generated\_text'\]}")
> \`\`\`
> \### Logs
> 
> \`\`\`
> The token has not been saved to the git credentials helper. Pass \`add\_to\_git\_credential=True\` in this function directly or \`--add-to-git-credential\` if using via \`huggingface-cli\` if you want to set the git credential as well.
> Token is valid (permission: fineGrained).
> Your token has been saved to /qumulo/satya/huggingface/token
> Login successful
> Traceback (most recent call last):
> File "/qumulo/satya/anaconda3/envs/prune\_llm/lib/python3.9/site-packages/huggingface\_hub/utils/\_http.py", line 406, in hf\_raise\_for\_status
> response.raise\_for\_status()
> File "/qumulo/satya/anaconda3/envs/prune\_llm/lib/python3.9/site-packages/requests/models.py", line 1021, in raise\_for\_status
> raise HTTPError(http\_error\_msg, response=self)
> requests.exceptions.HTTPError: 401 Client Error: Unauthorized for url: https://huggingface.co/meta-llama/Llama-2-7b-chat-hf/resolve/main/config.json
> 
> The above exception was the direct cause of the following exception:
> 
> Traceback (most recent call last):
> File "/qumulo/satya/anaconda3/envs/prune\_llm/lib/python3.9/site-packages/transformers/utils/hub.py", line 403, in cached\_file
> resolved\_file = hf\_hub\_download(
> File "/qumulo/satya/anaconda3/envs/prune\_llm/lib/python3.9/site-packages/huggingface\_hub/utils/\_deprecation.py", line 101, in inner\_f
> return f(\*args, \*\*kwargs)
> File "/qumulo/satya/anaconda3/envs/prune\_llm/lib/python3.9/site-packages/huggingface\_hub/utils/\_validators.py", line 114, in \_inner\_fn
> return fn(\*args, \*\*kwargs)
> File "/qumulo/satya/anaconda3/envs/prune\_llm/lib/python3.9/site-packages/huggingface\_hub/file\_download.py", line 1232, in hf\_hub\_download
> return \_hf\_hub\_download\_to\_cache\_dir(
> File "/qumulo/satya/anaconda3/envs/prune\_llm/lib/python3.9/site-packages/huggingface\_hub/file\_download.py", line 1339, in \_hf\_hub\_download\_to\_cache\_dir
> \_raise\_on\_head\_call\_error(head\_call\_error, force\_download, local\_files\_only)
> File "/qumulo/satya/anaconda3/envs/prune\_llm/lib/python3.9/site-packages/huggingface\_hub/file\_download.py", line 1854, in \_raise\_on\_head\_call\_error
> raise head\_call\_error
> File "/qumulo/satya/anaconda3/envs/prune\_llm/lib/python3.9/site-packages/huggingface\_hub/file\_download.py", line 1746, in \_get\_metadata\_or\_catch\_error
> metadata = get\_hf\_file\_metadata(
> File "/qumulo/satya/anaconda3/envs/prune\_llm/lib/python3.9/site-packages/huggingface\_hub/utils/\_validators.py", line 114, in \_inner\_fn
> return fn(\*args, \*\*kwargs)
> File "/qumulo/satya/anaconda3/envs/prune\_llm/lib/python3.9/site-packages/huggingface\_hub/file\_download.py", line 1666, in get\_hf\_file\_metadata
> r = \_request\_wrapper(
> File "/qumulo/satya/anaconda3/envs/prune\_llm/lib/python3.9/site-packages/huggingface\_hub/file\_download.py", line 364, in \_request\_wrapper
> response = \_request\_wrapper(
> File "/qumulo/satya/anaconda3/envs/prune\_llm/lib/python3.9/site-packages/huggingface\_hub/file\_download.py", line 388, in \_request\_wrapper
> hf\_raise\_for\_status(response)
> File "/qumulo/satya/anaconda3/envs/prune\_llm/lib/python3.9/site-packages/huggingface\_hub/utils/\_http.py", line 423, in hf\_raise\_for\_status
> raise \_format(GatedRepoError, message, response) from e
> huggingface\_hub.errors.GatedRepoError: 401 Client Error. (Request ID: Root=1-66fc6aa2-51edf73166f9906f2c6e4de2;44b58636-df14-4a1a-bb9c-4d83423f68ed)
> 
> Cannot access gated repo for url https://huggingface.co/meta-llama/Llama-2-7b-chat-hf/resolve/main/config.json.
> Access to model meta-llama/Llama-2-7b-chat-hf is restricted. You must have access to it and be authenticated to access it. Please log in.
> 
> The above exception was the direct cause of the following exception:
> 
> Traceback (most recent call last):
> File "/qumulo/satya/Compress\_Align/scratch\_code/pytorch\_test.py", line 15, in \<module\>
> tokenizer = AutoTokenizer.from\_pretrained(model)
> File "/qumulo/satya/anaconda3/envs/prune\_llm/lib/python3.9/site-packages/transformers/models/auto/tokenization\_auto.py", line 864, in from\_pretrained
> config = AutoConfig.from\_pretrained(
> File "/qumulo/satya/anaconda3/envs/prune\_llm/lib/python3.9/site-packages/transformers/models/auto/configuration\_auto.py", line 1006, in from\_pretrained
> config\_dict, unused\_kwargs = PretrainedConfig.get\_config\_dict(pretrained\_model\_name\_or\_path, \*\*kwargs)
> File "/qumulo/satya/anaconda3/envs/prune\_llm/lib/python3.9/site-packages/transformers/configuration\_utils.py", line 567, in get\_config\_dict
> config\_dict, kwargs = cls.\_get\_config\_dict(pretrained\_model\_name\_or\_path, \*\*kwargs)
> File "/qumulo/satya/anaconda3/envs/prune\_llm/lib/python3.9/site-packages/transformers/configuration\_utils.py", line 626, in \_get\_config\_dict
> resolved\_config\_file = cached\_file(
> File "/qumulo/satya/anaconda3/envs/prune\_llm/lib/python3.9/site-packages/transformers/utils/hub.py", line 421, in cached\_file
> raise EnvironmentError(
> OSError: You are trying to access a gated repo.
> Make sure to have access to it at https://huggingface.co/meta-llama/Llama-2-7b-chat-hf.
> 401 Client Error. (Request ID: Root=1-66fc6aa2-51edf73166f9906f2c6e4de2;44b58636-df14-4a1a-bb9c-4d83423f68ed)
> 
> Cannot access gated repo for url https://huggingface.co/meta-llama/Llama-2-7b-chat-hf/resolve/main/config.json.
> Access to model meta-llama/Llama-2-7b-chat-hf is restricted. You must have access to it and be authenticated to access it. Please log in.
> \`\`\`
> 
> \### System info
> 
> \`\`\`shell
> \- huggingface\_hub version: 0.25.1
> \- Platform: Linux-5.15.0-1065-nvidia-x86\_64-with-glibc2.35
> \- Python version: 3.9.19
> \- Running in iPython ?: No
> \- Running in notebook ?: No
> \- Running in Google Colab ?: No
> \- Running in Google Colab Enterprise ?: No
> \- Token path ?: /qumulo/satya/huggingface/token
> \- Has saved token ?: True
> \- Configured git credential helpers: 
> \- FastAI: N/A
> \- Tensorflow: N/A
> \- Torch: 2.4.1
> \- Jinja2: 3.1.4
> \- Graphviz: N/A
> \- keras: N/A
> \- Pydot: N/A
> \- Pillow: N/A
> \- hf\_transfer: N/A
> \- gradio: N/A
> \- tensorboard: N/A
> \- numpy: 1.26.4
> \- pydantic: 2.9.2
> \- aiohttp: 3.10.8
> \- ENDPOINT: https://huggingface.co
> \- HF\_HUB\_CACHE: /qumulo/satya/huggingface
> \- HF\_ASSETS\_CACHE: /qumulo/satya/huggingface
> \- HF\_TOKEN\_PATH: /qumulo/satya/huggingface/token
> \- HF\_HUB\_OFFLINE: False
> \- HF\_HUB\_DISABLE\_TELEMETRY: False
> \- HF\_HUB\_DISABLE\_PROGRESS\_BARS: None
> \- HF\_HUB\_DISABLE\_SYMLINKS\_WARNING: False
> \- HF\_HUB\_DISABLE\_EXPERIMENTAL\_WARNING: False
> \- HF\_HUB\_DISABLE\_IMPLICIT\_TOKEN: False
> \- HF\_HUB\_ENABLE\_HF\_TRANSFER: False
> \- HF\_HUB\_ETAG\_TIMEOUT: 10
> \- HF\_HUB\_DOWNLOAD\_TIMEOUT: 10
> \`\`\`

---

<div class="post-metadata">

**Author:** ![Aditya327](https://avatars.discourse-cdn.com/v4/letter/a/ad7895/32.png) [@Aditya327](https://discuss.huggingface.co/u/Aditya327)\
**Post date:** [June 1, 2025, 1:56am UTC](https://discuss.huggingface.co/t/ai-agents-course-error-in-running-the-smolagent-example/146061/11 "2025-06-01T01:56:47Z")

</div>

Hello @sabler I have paid for the Pro, still I am getting the error. Created a new token as well. What Permissions did you end setting for the token so that it could work

---

<div class="post-metadata">

**Author:** ![John6666](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/john6666/32/27664_2.png) [@John6666](https://discuss.huggingface.co/u/John6666)\
**Post date:** [June 1, 2025, 4:01am UTC](https://discuss.huggingface.co/t/ai-agents-course-error-in-running-the-smolagent-example/146061/12 "2025-06-01T04:01:28Z")

</div>

If you are unsure about token permissions, using a READ token makes it easy. Also, it seems that the key operation when copying and pasting may be the cause.

> [@Invalid token or no access to Hugging Face](https://discuss.huggingface.co/t/invalid-token-or-no-access-to-hugging-face/115807/3):
>
> Dont paste the token with ctrl+p, right click to paste it.

---

<div class="post-metadata">

**Author:** ![sabler](https://avatars.discourse-cdn.com/v4/letter/s/67e7ee/32.png) [@sabler](https://discuss.huggingface.co/u/sabler)\
**Post date:** [June 1, 2025, 7:13pm UTC](https://discuss.huggingface.co/t/ai-agents-course-error-in-running-the-smolagent-example/146061/13 "2025-06-01T19:13:20Z")

</div>

The token I’m using is set to WRITE, but like @John6666 said, you should be able to use READ just fine.

---

<div class="post-metadata">

**Author:** ![Aditya327](https://avatars.discourse-cdn.com/v4/letter/a/ad7895/32.png) [@Aditya327](https://discuss.huggingface.co/u/Aditya327)\
**Post date:** [June 2, 2025, 4:36pm UTC](https://discuss.huggingface.co/t/ai-agents-course-error-in-running-the-smolagent-example/146061/14 "2025-06-02T16:36:11Z")

</div>

Hello @John6666 and @sabler  
I have given write permission for the token, tried to recreate the token twice, but was not able access the model. Still getting 402 error.

---

<div class="post-metadata">

**Author:** ![John6666](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/john6666/32/27664_2.png) [@John6666](https://discuss.huggingface.co/u/John6666)\
**Post date:** [June 2, 2025, 11:53pm UTC](https://discuss.huggingface.co/t/ai-agents-course-error-in-running-the-smolagent-example/146061/15 "2025-06-02T23:53:21Z")

</div>

401 errors are often caused by mistakes or malfunctions, but 402 errors are usually caused by exceeding the monthly usage limit.

> [@Hugging Face Payment Error 402 & You've Exceeded Monthly Quota](https://discuss.huggingface.co/t/hugging-face-payment-error-402-youve-exceeded-monthly-quota/144968):
>
> Whenever I want generate a response from the api it shows payment error 402 and this link “[https://huggingface.co/api/inference-proxy/hf-inference/models/Qwen/QwQ-32B/v1/chat/completions](https://huggingface.co/api/inference-proxy/hf-inference/models/Qwen/QwQ-32B/v1/chat/completions)”. After tapping on the link it showing “Sorry, we can’t find the page you are looking for.” Also showing this promise error in console “You have exceeded your monthly included credits for Inference Providers. Subscribe to PRO to get 20x more monthly allowance.”, I haven’t use a bit. I create a new account for t…
