← All integrations

AI & Models · Integration

Embed a Hugging Face integration in your product

Add Hugging Face to your product for your customers, and give your AI agents governed access to it.

Hugging Face is a hub and a hosting platform at once, so a Hugging Face integration touches hosted models you call for inference, the dedicated inference endpoints a customer deploys for themselves, and the model repositories, datasets and spaces their token is allowed to see. The behavior to design around is the cold start. An endpoint that has been idle can be scaled down to nothing, and the first request after that pays for the model to load, which is seconds rather than milliseconds and is not a failure. Anything user-facing therefore needs a timeout that expects it and something to show while it happens. Private repositories add a second axis, since visibility differs per customer. fastn holds each account's token per customer and monitors the integration, proposing a fix for your review when Hugging Face changes its API.

In your product

Embedded for your customers. Per-tenant auth, customized per customer, monitored by fastn.

  • Let each customer bring their own Hugging Face token so inference runs on their account and against their quota.
  • Call a customer's dedicated inference endpoint from your product, treating the first slow request as a normal path rather than an error.
  • List during onboarding which model repositories and datasets a customer's token can genuinely reach, private ones included.
  • Let a customer point your product at a specific model revision or space instead of a default you picked for them.

For your AI agents

Governed, audited access for the agents you build, through the MCP server.

  • An agent runs inference on the model a customer selected and cites which endpoint answered it.
  • An agent reads a model card before it recommends that model for a job.
  • An agent checks whether an endpoint is already warm before promising a fast answer.

Example prompt

Is this inference endpoint warm right now, and which model revision is it serving?

Set up Hugging Face in 4 steps

  1. 01Enable the Hugging Face connector from your fastn dashboard.
  2. 02Have each customer authorize their own Hugging Face account, so calls run under their credentials rather than a shared key.
  3. 03Decide which models, requests and outputs your product needs, map those fields, then enable the actions and triggers you want.
  4. 04Call it from your product and expose it to your agents through the same governed integration.

Hugging Face connector reference: actions, triggers and auth

Why teams use the Hugging Face integration

  • Ship a Hugging Face integration without building it. Your customers connect their own Hugging Face account inside your product and work their models, requests and outputs there, and nothing lands on your team.
  • Handle the part that actually costs time: per-customer keys, quotas and cost attribution matter more than schema here, because every call is billed. fastn handles the auth, token refresh, rate limits and pagination, and when Hugging Face changes, its maintainer agent proposes a tested fix, so a Hugging Face update does not start in your backlog.

Used by these teams

Hugging Face integration FAQ

Can AI agents use this Hugging Face integration?

Yes, through the fastn MCP gateway, scoped per customer and audited. An agent runs inference on the model a customer selected and cites which endpoint answered it. For example: "Is this inference endpoint warm right now, and which model revision is it serving?"

Whose Hugging Face API key and quota does each call use?

Each customer authorises their own Hugging Face account, so usage, rate limits and cost land on the customer that caused them. You are not metering a shared key and re-billing it, and one heavy customer cannot exhaust another's quota.

Are inputs and outputs auditable?

Yes. Every call is logged per tenant with the call, the input and the result, so an output can be traced back to what produced it. That matters more here than in most integrations, because a generated answer or an extracted field cannot be reconstructed from the request alone.

What can I build with the Hugging Face integration?

A common starting point: let each customer bring their own Hugging Face token so inference runs on their account and against their quota. The use cases above list the rest.

Add Hugging Face to your product

Start free with 3 customer connections. No sales call required, and no per-customer integration code.