{"openapi":"3.1.0","info":{"title":"Hugging Face (BYOK) API","version":"0.1.0","description":"Hugging Face (BYOK) lets an AI assistant read your own Hugging Face data through the Hugging Face API with a key you supply (access token (read scope is enough)). Read-only: 9 tools (whoami, search_models, search_datasets, search_spaces, get_model_info, get_user_overview, list_user_likes, list_trending, list_daily_papers). The BYOK key travels with each request, is used for that one call only and...\n\nEvery operation is read-only or compute-only. The same tools are available over MCP (streamable HTTP) at https://byok-huggingface.connectorbay.com/mcp.","contact":{"name":"Unify Dynamics LLC","email":"agent@connectorbay.com","url":"https://connectorbay.com/byok-huggingface/docs"},"termsOfService":"https://connectorbay.com/byok-huggingface/terms"},"servers":[{"url":"https://byok-huggingface.connectorbay.com"}],"externalDocs":{"url":"https://connectorbay.com/byok-huggingface/docs"},"security":[{"upstreamKey":[]}],"components":{"securitySchemes":{"bearer":{"type":"http","scheme":"bearer","description":"Optional. A Pro API key raises rate limits; no credentials are required."},"upstreamKey":{"type":"apiKey","in":"header","name":"X-Upstream-Key","description":"Your own key for the service this connector wraps (bring your own key). Used for that one call only; never stored, logged or cached."}},"schemas":{"Error":{"type":"object","properties":{"ok":{"const":false},"error":{"type":"object"}}}}},"paths":{"/v1/tools/whoami":{"post":{"operationId":"whoami","summary":"Show the Hugging Face account the token belongs to: name, type, Pro status, the token's role and the organizations the a","description":"Show the Hugging Face account the token belongs to: name, type, Pro status, the token's role and the organizations the account belongs to. Use for \"Which Hugging Face account is my token connected to\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{},"title":"whoamiArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}},"/v1/tools/search_models":{"post":{"operationId":"search_models","summary":"Search Hugging Face models by a text in the model id, with optional author, tag or pipeline task filter, sorted by downl","description":"Search Hugging Face models by a text in the model id, with optional author, tag or pipeline task filter, sorted by downloads, likes, recency or trend. Use for \"Find the most downloaded text-classification models with 'bert' in the name\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"search":{"anyOf":[{"maxLength":200,"type":"string"},{"type":"null"}],"default":null,"description":"Text that must appear in the model id, for example 'bert'.","title":"Search"},"author":{"anyOf":[{"maxLength":100,"type":"string"},{"type":"null"}],"default":null,"description":"Only models of this user or organization, for example 'google'.","title":"Author"},"filter":{"anyOf":[{"maxLength":100,"type":"string"},{"type":"null"}],"default":null,"description":"A single tag to require, such as a library, language or task tag, for example 'text-classification' or 'gguf'.","title":"Filter"},"pipeline_tag":{"anyOf":[{"maxLength":100,"type":"string"},{"type":"null"}],"default":null,"description":"Only models of this task, for example 'summarization' or 'text-generation'.","title":"Pipeline Tag"},"sort":{"anyOf":[{"enum":["downloads","likes","lastModified","createdAt","trendingScore"],"type":"string"},{"type":"null"}],"default":null,"description":"Order by downloads, likes, lastModified, createdAt or trendingScore (highest or newest first).","title":"Sort"},"limit":{"anyOf":[{"maximum":100,"minimum":1,"type":"integer"},{"type":"null"}],"default":20,"description":"How many results to return (1 to 100).","title":"Limit"}},"title":"search_modelsArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}},"/v1/tools/search_datasets":{"post":{"operationId":"search_datasets","summary":"Search Hugging Face datasets by a text in the dataset id, with optional author and tag filters, sorted by downloads, lik","description":"Search Hugging Face datasets by a text in the dataset id, with optional author and tag filters, sorted by downloads, likes, recency or trend. Use for \"Find popular datasets about sentiment analysis\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"search":{"anyOf":[{"maxLength":200,"type":"string"},{"type":"null"}],"default":null,"description":"Text that must appear in the dataset id, for example 'sentiment'.","title":"Search"},"author":{"anyOf":[{"maxLength":100,"type":"string"},{"type":"null"}],"default":null,"description":"Only datasets of this user or organization, for example 'stanfordnlp'.","title":"Author"},"filter":{"anyOf":[{"maxLength":100,"type":"string"},{"type":"null"}],"default":null,"description":"A single tag to require, for example 'task_categories:text-classification' or 'language:en'.","title":"Filter"},"sort":{"anyOf":[{"enum":["downloads","likes","lastModified","createdAt","trendingScore"],"type":"string"},{"type":"null"}],"default":null,"description":"Order by downloads, likes, lastModified, createdAt or trendingScore.","title":"Sort"},"limit":{"anyOf":[{"maximum":100,"minimum":1,"type":"integer"},{"type":"null"}],"default":20,"description":"How many results to return (1 to 100).","title":"Limit"}},"title":"search_datasetsArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}},"/v1/tools/search_spaces":{"post":{"operationId":"search_spaces","summary":"Search Hugging Face Spaces (hosted demo apps) by a text in the Space id, with optional author and tag filters, sorted by","description":"Search Hugging Face Spaces (hosted demo apps) by a text in the Space id, with optional author and tag filters, sorted by likes, recency or trend. Use for \"Find popular Spaces for image generation demos\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"search":{"anyOf":[{"maxLength":200,"type":"string"},{"type":"null"}],"default":null,"description":"Text that must appear in the Space id, for example 'diffusion'.","title":"Search"},"author":{"anyOf":[{"maxLength":100,"type":"string"},{"type":"null"}],"default":null,"description":"Only Spaces of this user or organization.","title":"Author"},"filter":{"anyOf":[{"maxLength":100,"type":"string"},{"type":"null"}],"default":null,"description":"A single tag to require, for example 'gradio'.","title":"Filter"},"sort":{"anyOf":[{"enum":["likes","lastModified","createdAt","trendingScore"],"type":"string"},{"type":"null"}],"default":null,"description":"Order by likes, lastModified, createdAt or trendingScore.","title":"Sort"},"limit":{"anyOf":[{"maximum":100,"minimum":1,"type":"integer"},{"type":"null"}],"default":20,"description":"How many results to return (1 to 100).","title":"Limit"}},"title":"search_spacesArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}},"/v1/tools/get_model_info":{"post":{"operationId":"get_model_info","summary":"Get one model repository: owner, latest commit hash, downloads, likes, task, library, tags, gating and dates. Use for \"H","description":"Get one model repository: owner, latest commit hash, downloads, likes, task, library, tags, gating and dates. Use for \"How many downloads and likes does the model google/gemma-2-2b have\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"namespace":{"description":"User or organization that owns the model, for example 'google'.","maxLength":200,"title":"Namespace","type":"string"},"repo":{"description":"Model name without the owner, for example 'gemma-2-2b'.","maxLength":200,"title":"Repo","type":"string"}},"required":["namespace","repo"],"title":"get_model_infoArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}},"/v1/tools/get_user_overview":{"post":{"operationId":"get_user_overview","summary":"Get the public overview of a Hugging Face user: name, Pro status and counts of models, datasets, Spaces, papers, likes a","description":"Get the public overview of a Hugging Face user: name, Pro status and counts of models, datasets, Spaces, papers, likes and followers. Use for \"How many models and followers does the Hugging Face user 'julien-c' have\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"username":{"description":"The user's Hugging Face username, for example 'julien-c'.","maxLength":200,"title":"Username","type":"string"}},"required":["username"],"title":"get_user_overviewArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}},"/v1/tools/list_user_likes":{"post":{"operationId":"list_user_likes","summary":"List the public repositories (models, datasets, Spaces) a user has liked, newest like first, with a cursor for the next ","description":"List the public repositories (models, datasets, Spaces) a user has liked, newest like first, with a cursor for the next page. Use for \"What models has the Hugging Face user 'julien-c' liked\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"username":{"description":"The user's Hugging Face username.","maxLength":200,"title":"Username","type":"string"},"limit":{"anyOf":[{"maximum":100,"minimum":1,"type":"integer"},{"type":"null"}],"default":20,"description":"How many likes to return (1 to 100).","title":"Limit"},"cursor":{"anyOf":[{"maxLength":500,"type":"string"},{"type":"null"}],"default":null,"description":"Opaque cursor from an earlier answer to get the next page.","title":"Cursor"}},"required":["username"],"title":"list_user_likesArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}},"/v1/tools/list_trending":{"post":{"operationId":"list_trending","summary":"List the currently trending repositories on Hugging Face (models, datasets or Spaces) with likes and downloads. Use for ","description":"List the currently trending repositories on Hugging Face (models, datasets or Spaces) with likes and downloads. Use for \"What models are trending on Hugging Face right now\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"type":{"anyOf":[{"enum":["all","model","space","dataset"],"type":"string"},{"type":"null"}],"default":"all","description":"Which repositories: all, model, space or dataset.","title":"Type"},"limit":{"anyOf":[{"maximum":20,"minimum":1,"type":"integer"},{"type":"null"}],"default":10,"description":"How many repositories to return (1 to 20).","title":"Limit"}},"title":"list_trendingArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}},"/v1/tools/list_daily_papers":{"post":{"operationId":"list_daily_papers","summary":"List the papers featured on Hugging Face Daily Papers with title, upvotes, publish date and linked GitHub repository. Us","description":"List the papers featured on Hugging Face Daily Papers with title, upvotes, publish date and linked GitHub repository. Use for \"What are the top daily papers on Hugging Face\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"sort":{"anyOf":[{"enum":["publishedAt","trending"],"type":"string"},{"type":"null"}],"default":"publishedAt","description":"Order by publishedAt (newest) or trending.","title":"Sort"},"limit":{"anyOf":[{"maximum":100,"minimum":1,"type":"integer"},{"type":"null"}],"default":20,"description":"How many papers to return (1 to 100).","title":"Limit"},"p":{"anyOf":[{"maximum":10000,"minimum":0,"type":"integer"},{"type":"null"}],"default":0,"description":"Page number, starting at 0.","title":"P"}},"title":"list_daily_papersArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}}}}