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