[UPDATE] Clarify API Cost Risks when using Secrets in Public Hugging Face Spaces (Unit 1)

Open Beginner friendly
#604 1 comment 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
76/100
Issue type
Documentation
Clarity
Mostly clear
Activity status
Active
Tech stack
huggingface
Domain
documentation

Research direction

Start with the Unit 1 tutorial page linked in the issue, especially the step where the Hugging Face Space Secret is added. Verify the cost implications of public Spaces using an owner's paid API token, then add a concise warning immediately after that step; done means students can clearly understand the potential for unexpected charges.

Written by the indexing model from the issue text.

Description

documentation
  1. If you want to add a full section or a new unit, please describe precisely what you want to add before starting to write it so that we can review the idea, validate it or not, and guide you through the writing process.

  2. If there's a typo, you can directly open a PR.

Hi team,

I was going through Unit 1 in the section "Let’s Create Our First Agent Using smolagents," (specifically, this page: https://huggingface.co/learn/agents-course/unit1/tutorial) where we set up our Hugging Face Space and add our API token as a Secret for the agent to use.

I had a quick question/suggestion about the cost implications when a Space is made public.

My understanding is that if a user makes their Space public, every person who interacts with that demo will trigger API calls that are authenticated using the owner's token.

If that token is for a paid service (like OpenAI or a paid Hugging Face Inference tier), that public usage could potentially start racking up costs for the owner of the token.

If this understanding is correct, I think it would be really helpful to add a small note or warning right after the step where we add the secret. It would be a great way to prevent students from getting any surprise bills down the road.

Dominant language
MDX
Stars
32.7k
Forks
2.3k
PR merge metrics
No merged PRs in 30d

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from huggingface/agents-course

All issues in huggingface/agents-course

Similar issues

More Documentation issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.