it's free*.ai

Hugging Face

Hugging Face Inference Providers 是挡在众多主机前面的路由器。一个 HF_TOKEN、一个 router.huggingface.co/v1 地址,免费账户每月 $0.10 赠款。线上路由列出 135 个模型 id,不是固定的免费七个。

Hugging Face Inference Providers 是挡在众多主机前面的路由器。一个 HF_TOKEN、一个 router.huggingface.co/v1 地址,免费账户每月 $0.10 赠款。线上路由列出 135 个模型 id,不是固定的免费七个。

路由会替你挑供应商。在模型 id 后附加 :provider 可固定某一家,免得实际执行调用的主机让你意外。OpenAI 兼容路径只覆盖 chat;嵌入等其他能力走 Hugging Face 客户端。

免费模型
135
最大上下文
131K
免费额度
每月 $0.10 赠款
注册要求
只要邮箱,不要卡

端点

接口地址https://router.huggingface.co/v1
环境变量HF_TOKEN
速率限制$0.10 of credits per month

代码示例

npm install openai
import 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)

值得注意

你能免费使用的模型135