Hugging Face
Hugging Face Inference Providers es un router frente a muchos hosts. Un HF_TOKEN, una URL router.huggingface.co/v1, y $0.10 de crédito al mes en la cuenta gratuita. El router en vivo lista 135 ids de modelos, no una fija de siete gratuitos.
Hugging Face Inference Providers es un router frente a muchos hosts. Un HF_TOKEN, una URL router.huggingface.co/v1, y $0.10 de crédito al mes en la cuenta gratuita. El router en vivo lista 135 ids de modelos, no una fija de siete gratuitos.
El router elige proveedor por ti. Añade :provider al id del modelo para fijar uno, sin sorpresas sobre quién ejecutó realmente la llamada. La ruta compatible con OpenAI cubre solo chat; los embeddings y el resto van por el cliente de Hugging Face.
- Modelos gratuitos
- 135
- Contexto máximo
- 131K
- Nivel gratuito
- $0.10 de crédito al mes
- Requisito
- Cuenta de correo, sin tarjeta
Punto de conexión
URL base
https://router.huggingface.co/v1Variable de entorno
HF_TOKENLímite de tasa
$0.10 of credits per month- Compatible con OpenAI
- SDK nativo: Hugging Face Inference
- texto
- código
Ejemplos de código
npm install openaiimport OpenAI from 'openai'
const client = new OpenAI({
baseURL: 'https://router.huggingface.co/v1',
apiKey: process.env.HF_TOKEN
})
const response = await client.chat.completions.create({
model: 'zai-org/GLM-5.3-Flash',
messages: [{ role: 'user', content: 'Explain closures in one paragraph.' }]
})
console.log(response.choices[0].message.content)pip install openaiimport os
from openai import OpenAI
client = OpenAI(
base_url="https://router.huggingface.co/v1",
api_key=os.environ["HF_TOKEN"],
)
response = client.chat.completions.create(
model="zai-org/GLM-5.3-Flash",
messages=[{"role": "user", "content": "Explain closures in one paragraph."}],
)
print(response.choices[0].message.content)curl https://router.huggingface.co/v1/chat/completions \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $HF_TOKEN" \
-d '{
"model": "zai-org/GLM-5.3-Flash",
"messages": [{"role": "user", "content": "Explain closures in one paragraph."}]
}'npm install @huggingface/inferenceimport { InferenceClient } from '@huggingface/inference'
const client = new InferenceClient(process.env.HF_TOKEN)
const response = await client.chatCompletion({
model: 'zai-org/GLM-5.3-Flash',
messages: [{ role: 'user', content: 'Explain closures in one paragraph.' }]
})
console.log(response.choices[0].message.content)pip install huggingface_hubimport os
from huggingface_hub import InferenceClient
client = InferenceClient(token=os.environ["HF_TOKEN"])
response = client.chat_completion(
model="zai-org/GLM-5.3-Flash",
messages=[{"role": "user", "content": "Explain closures in one paragraph."}],
)
print(response.choices[0].message.content)Vale la pena saber
- El router elige proveedor por ti; añade :provider al id del modelo para fijar uno.
- La parte gratuita es un crédito mensual de $0.10 sobre todo el router, no una lista fija de 7 modelos.
Modelos que obtienes gratis135
- GLM 5.3 Flash
zai-org/GLM-5.3-Flash - GLM 5.3
zai-org/GLM-5.3 - Qwen 3.8 27B
Qwen/Qwen3.8-27B - Kimi K3
moonshotai/Kimi-K3 - DeepSeek V4 Flash 0731
deepseek-ai/DeepSeek-V4-Flash-0731 - Granite 4.2 30B
ibm-granite/granite-4.2-30b - GLM 5.3 Flash BF16
zai-org/GLM-5.3-Flash-BF16 - Muse Glimmer 30B
meta-models/Muse-Glimmer-30B - Gemma 4 31B
google/gemma-4-31B-it - Granite 4.2 3B
ibm-granite/granite-4.2-3b - Llama 3.1 8B
meta-llama/Llama-3.1-8B-Instruct - Granite 4.2 8B
ibm-granite/granite-4.2-8b - GLM 5.3 BF16
zai-org/GLM-5.3-BF16 - Qwen 3.8 2.4T A95B
Qwen/Qwen3.8-2.4T-A95B - DeepSeek V4 Pro 0813
deepseek-ai/DeepSeek-V4-Pro-0813 - DeepSeek V4 Flash
deepseek-ai/DeepSeek-V4-Flash - Qwen 3.5 9B
Qwen/Qwen3.5-9B - Inkling Small
thinkingmachines/Inkling-Small - Qwen 3.6 35B A3B
Qwen/Qwen3.6-35B-A3B - Gemma 4 26B A4B
google/gemma-4-26B-A4B-it - Hy3
tencent/Hy3 - GLM 5.2
zai-org/GLM-5.2 - Inkling
thinkingmachines/Inkling - Ling 3.0 Flash
inclusionAI/Ling-3.0-flash - GPT-OSS 20B
openai/gpt-oss-20b - GPT-OSS 120B
openai/gpt-oss-120b - MiniMax M3
MiniMaxAI/MiniMax-M3 - DeepSeek V4 Pro
deepseek-ai/DeepSeek-V4-Pro - Ternary Bonsai 27B Gguf
prism-ml/Ternary-Bonsai-27B-gguf - GLM 4.7 Flash
zai-org/GLM-4.7-Flash - DeepSeek R1
deepseek-ai/DeepSeek-R1 - Qwen 3 8B
Qwen/Qwen3-8B - Llama 3.3 70B
meta-llama/Llama-3.3-70B-Instruct - Qwen 2.5 Coder 7B
Qwen/Qwen2.5-Coder-7B-Instruct - NVIDIA Nemotron 3 Ultra 550B A55B NVFP4
nvidia/NVIDIA-Nemotron-3-Ultra-550B-A55B-NVFP4 - Qwen 3 Coder Next
Qwen/Qwen3-Coder-Next - NVIDIA Nemotron 3.5 Lightning 30B A3B BF16
nvidia/NVIDIA-Nemotron-3.5-Lightning-30B-A3B-BF16 - Qwen 3 Coder 30B A3B
Qwen/Qwen3-Coder-30B-A3B-Instruct - Qwen 3 4B 2507
Qwen/Qwen3-4B-Instruct-2507 - Qwen 3.5 35B A3B
Qwen/Qwen3.5-35B-A3B - Qwen 3.6 27B
Qwen/Qwen3.6-27B - MiMo V2.5
XiaomiMiMo/MiMo-V2.5 - Qwen 2.5 Coder 32B
Qwen/Qwen2.5-Coder-32B-Instruct - Apertus V1.5 8B
swiss-ai/Apertus-v1.5-8B - Qwen 3 14B
Qwen/Qwen3-14B - Kimi K2.6
moonshotai/Kimi-K2.6 - GLM 5.2 FP8
zai-org/GLM-5.2-FP8 - Kimi K2.7 Code
moonshotai/Kimi-K2.7-Code - Phi 4
microsoft/phi-4 - Gemma 3 4B
google/gemma-3-4b-it - Qwen 3 235B A22B 2507
Qwen/Qwen3-235B-A22B-Instruct-2507 - Apertus V1.5 70B
swiss-ai/Apertus-v1.5-70B - L3 8B Stheno V3.2
Sao10K/L3-8B-Stheno-v3.2 - Qwen 3 30B A3B
Qwen/Qwen3-30B-A3B - Step 3.7 Flash
stepfun-ai/Step-3.7-Flash - Qwen 3 Next 80B A3B
Qwen/Qwen3-Next-80B-A3B-Instruct - DeepSeek V3.2
deepseek-ai/DeepSeek-V3.2 - MiMo V2.5 Pro
XiaomiMiMo/MiMo-V2.5-Pro - Llama 4 Scout 17B 16E
meta-llama/Llama-4-Scout-17B-16E-Instruct - Qwen 3 32B
Qwen/Qwen3-32B - Qwen 3.5 397B A17B
Qwen/Qwen3.5-397B-A17B - Qwen 3 235B A22B
Qwen/Qwen3-235B-A22B - Kimi K2.5
moonshotai/Kimi-K2.5 - Gemma 3 27B
google/gemma-3-27b-it - Qwen 3.5 27B
Qwen/Qwen3.5-27B - Qwen 3.5 122B A10B
Qwen/Qwen3.5-122B-A10B - Qwen 3 235B A22B Thinking 2507
Qwen/Qwen3-235B-A22B-Thinking-2507 - Tiny Aya Global
CohereLabs/tiny-aya-global - GLM 5
zai-org/GLM-5 - Gemma 3 12B
google/gemma-3-12b-it - Hermes 3 Llama 3.1 70B
NousResearch/Hermes-3-Llama-3.1-70B - Tiny Aya Water
CohereLabs/tiny-aya-water - GLM 5.1
zai-org/GLM-5.1 - Llama Guard 4 12B
meta-llama/Llama-Guard-4-12B - Qwen 2.5 72B
Qwen/Qwen2.5-72B-Instruct - GLM 5.1 FP8
zai-org/GLM-5.1-FP8 - Apertus 8B 2509
swiss-ai/Apertus-8B-Instruct-2509 - DeepSeek V3
deepseek-ai/DeepSeek-V3 - GLM 4.7
zai-org/GLM-4.7 - DeepSeek V3 0324
deepseek-ai/DeepSeek-V3-0324 - DeepSeek R1 Distill Llama 8B
deepseek-ai/DeepSeek-R1-Distill-Llama-8B - WizardLM 2 8x22B
alpindale/WizardLM-2-8x22B - ERNIE 4.5 VL 424B A47B Base PT
baidu/ERNIE-4.5-VL-424B-A47B-Base-PT - DeepSeek V3.2 Exp
deepseek-ai/DeepSeek-V3.2-Exp - GLM 4.6V Flash
zai-org/GLM-4.6V-Flash - AutoGLM Phone 9B Multilingual
zai-org/AutoGLM-Phone-9B-Multilingual - Ternary Bonsai 27B AWQ 4bit
prism-ml/Ternary-Bonsai-27B-AWQ-4bit - L3 8B Lunaris V1
Sao10K/L3-8B-Lunaris-v1 - Gemma SEA LION V4 27B
aisingapore/Gemma-SEA-LION-v4-27B-IT - Llama 4 Maverick 17B 128E FP8
meta-llama/Llama-4-Maverick-17B-128E-Instruct-FP8 - Qwen 3 VL 235B A22B
Qwen/Qwen3-VL-235B-A22B-Instruct - DeepSeek R1 Distill Llama 70B
deepseek-ai/DeepSeek-R1-Distill-Llama-70B - Apertus 70B 2509
swiss-ai/Apertus-70B-Instruct-2509 - GLM 4.5V
zai-org/GLM-4.5V - Qwen 3 VL 30B A3B
Qwen/Qwen3-VL-30B-A3B-Instruct - GLM 4 32B 0414
zai-org/GLM-4-32B-0414 - Qwen SEA LION V4 32B
aisingapore/Qwen-SEA-LION-v4-32B-IT - Qwen 3 VL 235B A22B Thinking
Qwen/Qwen3-VL-235B-A22B-Thinking - Qwen 2.5 Coder 3B
Qwen/Qwen2.5-Coder-3B-Instruct - MiniMax M1 80k
MiniMaxAI/MiniMax-M1-80k - Bielik 11B V3.0
speakleash/Bielik-11B-v3.0-Instruct - Qwen 2.5 VL 72B
Qwen/Qwen2.5-VL-72B-Instruct - DeepSeek R1 Distill Qwen 7B
deepseek-ai/DeepSeek-R1-Distill-Qwen-7B - Kimi K2
moonshotai/Kimi-K2-Instruct - DeepSeek R1 0528
deepseek-ai/DeepSeek-R1-0528 - GLM 4.5
zai-org/GLM-4.5 - DeepSeek R1 Distill Qwen 14B
deepseek-ai/DeepSeek-R1-Distill-Qwen-14B - GLM 4.5 Air
zai-org/GLM-4.5-Air - DeepSeek V3.1
deepseek-ai/DeepSeek-V3.1 - GLM 4.6 FP8
zai-org/GLM-4.6-FP8 - Qwen 3 4B Thinking 2507
Qwen/Qwen3-4B-Thinking-2507 - Qwen 3 Coder 480B A35B
Qwen/Qwen3-Coder-480B-A35B-Instruct - DeepSeek V3.1 Terminus
deepseek-ai/DeepSeek-V3.1-Terminus - C4ai Command R 08 2024
CohereLabs/c4ai-command-r-08-2024 - GLM 4.6
zai-org/GLM-4.6 - Kimi K2 0905
moonshotai/Kimi-K2-Instruct-0905 - Step 3.5 Flash
stepfun-ai/Step-3.5-Flash - Aya Expanse 32B
CohereLabs/aya-expanse-32b - GLM 4.7 FP8
zai-org/GLM-4.7-FP8 - MiniMax M2
MiniMaxAI/MiniMax-M2 - MiniMax M2.7
MiniMaxAI/MiniMax-M2.7 - C4ai Command R7B 12 2024
CohereLabs/c4ai-command-r7b-12-2024 - MiniMax M2.1
MiniMaxAI/MiniMax-M2.1 - GLM 4.5V FP8
zai-org/GLM-4.5V-FP8 - C4ai Command R7B Arabic 02 2025
CohereLabs/c4ai-command-r7b-arabic-02-2025 - MiniMax M2.5
MiniMaxAI/MiniMax-M2.5 - GLM 4.6V
zai-org/GLM-4.6V - C4ai Command A 03 2025
CohereLabs/c4ai-command-a-03-2025 - Aya Vision 32B
CohereLabs/aya-vision-32b - GLM 4.6V FP8
zai-org/GLM-4.6V-FP8 - GPT-OSS Safeguard 20B
openai/gpt-oss-safeguard-20b - Command A Reasoning 08 2025
CohereLabs/command-a-reasoning-08-2025 - Command A Translate 08 2025
CohereLabs/command-a-translate-08-2025 - Tiny Aya Earth
CohereLabs/tiny-aya-earth - Tiny Aya Fire
CohereLabs/tiny-aya-fire