Hugging Face

Integrate advanced NLP models for text analysis and generation.

Using the Hugging Face API with

You can use with any existing Node SDK or even just using fetch. Using io.runTask makes your Hugging Face background job resumable and appear in our dashboard.

  • Use io.runTask() and the official SDK or fetch.

  • Use our HTTP endpoint to subscribe to webhooks

  • Example code using Hugging Face

    Below are some working code examples of how you can use Hugging Face with These samples are open source and maintained by the community, you can copy and paste them into your own projects.

    import { TriggerClient } from "";
    import { createHash } from "crypto";
    // Go to Hugging Face Dashboard > Click on Profile > Settings
    // Go to Webhooks > Add a new webhook
    // Select yourself as the target
    // Add the webhook URL
    // Add the secret as "Test" (for example)
    // Create a model from the dashboard to trigger the webhook
    const huggingFace = client.defineHttpEndpoint({
    id: "hugging-face",
    source: "",
    icon: "huggingface",
    verify: async (request) => {
    if (
    request.headers.get("x-webhook-secret") ===
    return { success: true };
    return { success: false, reason: "Webhook Secret Match Failed" };
    id: "http-hugging-face",
    name: "HTTP Hugging Face",
    version: "1.0.0",
    enabled: true,
    trigger: huggingFace.onRequest(),
    run: async (request, io, ctx) => {
    const body = await request.json();
    await`Body`, body);