Hugging Face hub

Hugging Face Models API

Search the model catalogue by task, library, size, licence and base model, with likes, downloads and tags on every row.

GET /v1/hugging-face/models

1 credit Failed requests are free

About this endpoint

GET /v1/hugging-face/models returns a page of repositories in results. Use query, author, pipelineTag, library, language, license and tags to narrow the list, baseModel with relation to find finetunes, adapters, merges or quantized builds, and gated or inferenceProvider to filter by access or hosted availability. minParameters and maxParameters take values such as 500M or 7B.

Each row carries id, url, author, likes, downloads, downloadsAllTime, trendingScore, pipelineTag, library, license, gated, parameters and the full tags list. Sort with sort and order, choose limit up to 1000, and pass page.nextCursor as cursor while page.hasMore is true.

Hugging Face Models API FAQ

How do I find models for a task such as text generation?

Set pipelineTag=text-generation. The list of task ids is available from GET /v1/hugging-face/tags with group=pipeline_tag.

Can I search by parameter count?

Yes. minParameters and maxParameters accept values like 500M or 7B, and a minimum above the maximum is refused with a 400 before any lookup.

How do I find finetunes of one model?

Set baseModel to a model id such as openai-community/gpt2 and relation to finetune, adapter, merge or quantized. relation without baseModel is refused.

How does paging work?

Results carry page.hasMore and page.nextCursor. Send page.nextCursor back as cursor with the same filters to get the next page.

How much does a search cost?

Pricing is documented on the operation in the API registry (shown on this page). Confirm on every response with meta.creditsCharged: that field is the billing source of truth. Each paginated page is a separate billed request.