Skip to content
Hugging Face logo

Connectors / AI · HTTP Connector

Automate Hugging Face with Tray.ai

Create a repository, create a branch and create a discussion in Hugging Face, and start a workflow when Hugging Face sends “Repo created”.

What can you do with Hugging Face on Tray.ai?

Hugging Face is a hub where teams host, share and version machine learning models, datasets and demo apps, with community discussions on each repository. Tray.ai connects to Hugging Face through the HTTP Connector, so your workflows can call the Hugging Face API alongside the rest of your stack.

  • When Hugging Face sends “New commit or tag”, start a model evaluation in your CI pipeline.
  • When Hugging Face sends “Discussion created”, post it to the ML team's chat channel.
  • Commit files to a dataset repository after your data pipeline finishes its nightly export.
  • Ask a reviewer in team chat to take a look when Hugging Face sends “Pull request created”.
Connects through
HTTP Connector
Authentication
A bearer token
Base URL
https://huggingface.co

Set it up

Connect Hugging Face to Tray.ai

Each step uses Hugging Face's own API details, from its documentation.

Step 1

Save Hugging Face's API token

Save the token Hugging Face issues as a Tray.ai authentication. The HTTP Client sends it as a bearer token on every call. The token stays out of the workflow and out of the logs.

Step 2

Point the HTTP Client at the API

Add an HTTP Client step and use https://huggingface.co as the base URL. Or paste a cURL example from Hugging Face's API docs, and Tray.ai fills in the method, URL, and headers.

Step 3

Start with “List discussions”

It's one of 20 documented actions, under Discussions. The response comes back as data the next step can map into your other apps.

Step 4

Start workflows from Hugging Face events

Give Hugging Face the URL of a Tray.ai webhook trigger. “Repo created” can then start a workflow, and so can 7 other events.

Give your AI agents Hugging Face tools

Build an MCP server on Hugging Face in Agent Gateway and choose which actions your agents can call. Every call runs with access control and an audit trail. How Agent Gateway works

  • Create a repository
  • Create a branch
  • List discussions
  • List collections
  • List webhooks
  • Move a repository
  • Update repository settings
  • Commit files

What the Hugging Face API covers

5 resources and 20 documented actions, each one a call the HTTP Connector can make from a Tray.ai workflow. Connecting it takes a few clicks: here's how.

Repositories

  • Create a repository
  • Move a repository
  • Update repository settings
  • Commit files

Branches and tags

  • Create a branch
  • Delete a branch
  • Create a tag
  • Delete a tag

Discussions

  • List discussions
  • Create a discussion
  • Get discussion details
  • Add a comment

Collections

  • List collections
  • Create a collection
  • Update a collection
  • Add an item

Webhooks

  • List webhooks
  • Create a webhook
  • Update a webhook
  • Delete a webhook

Events Hugging Face can send to a Tray.ai webhook trigger

  • Repo created
  • Repo updated
  • Repo deleted
  • New commit or tag
  • Repo settings changed
  • Discussion created
  • Pull request created
  • Comment created

Checked against Hugging Face's own documentation on 2026-10-22

huggingface.co/docs/hub/api

Frequently asked questions

What can a Tray.ai workflow do in Hugging Face?

+

The Hugging Face API documents 20 actions across 5 resources (Repositories, Branches and tags, Discussions, Collections, Webhooks). For example: Create a repository; Create a branch; List discussions. A workflow can make any documented call through the HTTP Connector.

How does Tray.ai authenticate with Hugging Face?

+

The Hugging Face API uses a bearer token. You save it once as a Tray.ai authentication, and the HTTP Connector adds it to every request.

Which Hugging Face events can start a Tray.ai workflow?

+

Hugging Face sends 8 events to a webhook URL, for example: Repo created; Repo updated; Repo deleted; New commit or tag; Repo settings changed; Discussion created; Pull request created; Comment created. A Tray.ai webhook trigger receives them and starts a workflow.

See Hugging Face working against your stack.

We'll walk through a tailored demo with your systems plugged in.

Great — a couple more details

This helps us connect you with the right person. Optional, and you can skip it.