Hugging Face Hosted Models API
Models served by hosted inference providers, with price per million tokens, context length and speed.
GET /v1/hugging-face/inference-providers/models1 credit Failed requests are free
About this endpoint
GET /v1/hugging-face/inference-providers/models returns models. Each model has id, url, owner, createdAt, inputModalities, outputModalities and a providers list. Each provider entry has provider, status, contextLength, inputPricePerMillionTokens, outputPricePerMillionTokens, isFree, supportsTools, supportsStructuredOutput, firstTokenLatencyMs, tokensPerSecond and isModelAuthor.
Use query to keep models whose id contains a text and provider to keep one provider. This is a priced catalogue, so it is the right call before choosing where to run a model rather than a model search.
Hugging Face Hosted Models API FAQ
Are prices per token or per million tokens?
Per million tokens, in US dollars, separately for input and output. isFree tells you when a provider charges nothing.
Can I compare providers for one model?
Yes. Read the model's providers list and compare inputPricePerMillionTokens, outputPricePerMillionTokens, contextLength, firstTokenLatencyMs and tokensPerSecond.
Does this list every model on the platform?
No. It lists models that hosted inference providers serve. Use the models search for the full catalogue.
How much does the catalogue 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.
Other Hugging Face endpoints
- Search modelsGET /v1/hugging-face/models
- Get modelGET /v1/hugging-face/models/{owner}/{name}
- Search datasetsGET /v1/hugging-face/datasets
- Get datasetGET /v1/hugging-face/datasets/{owner}/{name}
- Search SpacesGET /v1/hugging-face/spaces
- Get SpaceGET /v1/hugging-face/spaces/{owner}/{name}
- READMEGET /v1/hugging-face/repos/{repoType}/{owner}/{name}/readme
- FilesGET /v1/hugging-face/repos/{repoType}/{owner}/{name}/files