Hugging Face Inference API
Access thousands of open-source models — from LLMs to image recognition — without self-hosting.
About this API
Hugging Face is the GitHub of AI models — 500,000+ models, mostly open-source. The Inference API runs them remotely with no installation. Especially useful for niche models (Hebrew, medical, legal) that don't exist at OpenAI. Free tier is limited but good for development.
Who it's for
Researchers and academics
Hebrew-specific models
Open-source-only projects
POCs and experiments
How to use it
- 1Create an account at huggingface.co and grab an API token.
- 2Pick a model (e.g. 'dicta-il/dictalm2.0' for Hebrew).
- 3POST to api-inference.huggingface.co/models/<model>.
Installation & setup
`npm install @huggingface/inference` or `pip install huggingface_hub`. Store the token as HF_TOKEN.
Code examples
import { HfInference } from "@huggingface/inference";
const hf = new HfInference(process.env.HF_TOKEN);
const out = await hf.textGeneration({
model: "dicta-il/dictalm2.0",
inputs: "שלום, מה שלומך היום?",
});
console.log(out.generated_text);Sample response
[
{
"generated_text": "שלום, מה שלומך היום? טוב מאוד, תודה ששאלת…"
}
]FAQ
Yes — DictaLM, AlephBERT, Hebrew-Mistral and many others.
Tips & pitfalls
Filter models by language=hebrew at huggingface.co/models.
Don't rely on serverless in production. Use a dedicated endpoint or self-host.